Applied Semantic MediaWiki SMWCon Spring 2011 Tutorial #42011.04.28
Who Are WeJesse Jiaxin WangSr. Software Architect, Vulcan Inc.http://semantic-mediawiki.org/wiki/User:JesseNing HuSr. Software Developer, TeamMersion LLCWil SmithSoftware Engineer, Vulcan Inc.
About Vulcan3Vulcan Inc. was established in 1986 by investor and philanthropist Paul G. Allen, co-founder of Microsoft, to manage his business and philanthropic efforts. Allen is chairman of Vulcan and his sister, Jody Allen, is president and CEO.
Agenda
Jumpstart
Using a BundleSemantic Bundle http://www.mediawiki.org/wiki/Semantic_BundleFeatures: (Pros and Cons)A set of author-selected extensionsA fixed set of extensions, few customization optionsSimplified download and configuration processStill need manual configurationUsually up-to-date and work well togetherCommunity tested and supported
Installation PackageSMW+ Package http://smwforum.ontoprise.com/smwforum/index.php/Help:SMW%2BFeatures:A set of (fixed) company selected extensionsSimplifies installation and configurationWindows installer and VM images are greatAnd they just became free!You may still be curious about what it does…Professionally documented and testedUsually weeks after major release of latest SMW
Real-world DeploymentWhen you want a set of custom extensions, you wantYour OWN deployment mechanism!
Deployment PracticesYour own codebase, with checkpointsSVN or Git to get the base, and thenCustomize the wikiScript or Manual or MixedA third-party deployment framework and repositoryOntoprise: http://smwforum.ontoprise.com/smwforum/index.php/Help:Deployment_FrameworkRPI: http://code.google.com/p/smwbp/wiki/setup_wikiReferata: http://smw.referata.com/wiki/Category:Packages
Build SystemYou own it!Your own selection of extensionsAnd versions of themOwn patches, scripts and templatesVulcan: Internal GIT repositories of completed buildVersioning and branches between projectsOther examples:RPI Best Practice (Google code)Hudson build (PNNL)
Wish ListA public wiki installation repositorywith lots of packagesIncluding necessary dataSemantically marked upWell documented (or even reviewed)Easy to find and useFederated wiki package store (Wiki AppStore)
Customize
What to CustomizeSkinsExtensionsSchema and DataTemplates and formsAnything else you can code… 
SkinsHow to customize a skinCreate your skin file in /skins folder within your wiki directory, like  Ontoskin.phpFinish this skin files following Ontoskin.php skin filesThere are two classes in this skin files:Inherit from SkinTemplate, set the CSS and template filter.Inherit from QuickTemplate, set the UI styleCreate skin folder with your skin name in /skinsCopy  image and CSS files to your skin folderUse your own skinIn LocalSettings.php set$wgDefaultSkin = 'wiking_skin'
Seahawk Video Skin
Skin Customization ExampleVulcan Development Wiki and Seahawk wiki.  We have customized these two skins for our projects and the key is the method of QuickTemplate. In this method, you can decide what to show and how it shows on your wikiYou can customize wiki site like menu links, page titles, CSS and JavaScript files in the data properties of QuickTemplateFor example, show wiki side bar in your skin<?phpforeach ($this->data['sidebar'] as $bar => $cont) { ?>  <li>    <a href="#"><h5><?php $out = wfMsg( $bar );></h5></a>    <ul>      <?phpforeach($cont as $key => $val) { ?>              <li id="<?php echo $val['id'] ?>" >              	<a href="<?php echo $val['href'] ?>"><?php echo $val['text'] ?></a>              </li>      <?php } ?>    </ul>  </li><?php } ?>
Personalized SkinSkin supports customization via __USERNAME__User can have personalized styles within a skinhttp://www.mediawiki.org/wiki/Manual:Skin_configuration#User_CSSTip: A way to turn off Wikipedia banner ad:http://en.wikipedia.org/wiki/User:Jesseone/vector.css
Schema and Data“Just do it!”Easy to startFlat, large ontology, at beginningMany properties only valid in certain casesBut it’ll get better!“Designer” OntologyProfessionally generated (Protégé)More data (restriction) than necessaryData importer isn’t powerful to fully support all OWL features“The middle road” practical schema design: think, adapt, evolve
N-ary RelationsType:RecordFrom 1.5 + supports Semantic SearchStill no “Allowed values”, no unit, and no other visual customizationsSemantic Internal Object extensionAdding an object in the middleUsing parameterized  (patterned) propertiesUsing a triple store (external)
ExtensionsWhere to find extensionshttp://www.mediawiki.org/wiki/Extension_MatrixBy supported version (1.16, 1.17, …)By status (beta, stable, …)By type (API, AJAX, hook, user rights…)By new-ness (sort by most recently created time)By talk page new-ness…By most updated versions…
Get the Extensions!Some essential ones!http://semantic-mediawiki.org/wiki/Help:MediaWiki_extensionsSemantic MediaWiki extensions are quite a few:http://semantic-mediawiki.org/wiki/Help:SMW_extensionsFind what you want Not exactly? Then patch it!Nothing close? Then build it!Or find people to build it 
Our ExperiencesWe built several wikis (2008-2011)The most useful extension (SF) often needed patchesAuto-completionFixed set of allowed valuesAll values in a categoryAll values having a specific propertyAll values from a queryMore parameters support (default values, UID, etc.)New functionality in other extensions or SMW CoreAggregation (average, max, sum, etc.)e.g. > and < comparison
Security ExtensionsKnow thyself! – What you want, really.Often customers don’t know what they really wantMany choices = nothing is perfectFrom basic to advanced:MediaWiki built-in securitySimple Security (Page Security)HaloACLFeaturesRestrictions
A Short StoryProposal Management System (Wiki)Users (including privileged users) submit proposalsReviewers (privileged users) rate and review themReviewers discuss and make decision and assignWhat security extension should it employ?HaloACL?SimpleSecurity?MediaWiki built-in groups?
How to Select | TestInclusion / transclusionSpecial:ExportAton/RSS feed, Watch pageListing and SearchingSpecial:SearchRecentChanges, AllPagesDiff and Revision URLAction links (raw, render)API (???)Action=query? 3rd party APIsAuthor backdoor?Caching?Files and Images?Redirects?Other extensions?
Visualization: Our Path2008: SRF used to only have few options 2009: Exhibit seemed coolPorted webitFixed some bugs and enhanced features Runway, TimePlot, multiple rows in Map view etc.2010: Open Flash ChartMore bars, pies, lines, scatter plot…InteractionRicher information display
Comparing SRF OptionsGoogle Charts (pie and bar)Google does it! (G gets your data, no offline choice…)Static bar and pie, no color options…ExhibitMore choices (timeline, map, facet, runway…)Browser compatibility issuesOFC (Open Flash Chart)Many bars, charts, plots, even scattered plotsFlash required
Sidebar CustomizationBasic: MediaWiki:SidebarEnhanced: semantic queries, and tree viewsAdvanced: use variables together with queriesCustom: Using an extension: DynamicSidebarCustomize your own sidebar at User:<username>/Sidebarhttp://www.mediawiki.org/wiki/Extension:DynamicSidebarExample: http://wiking.vulcan.com/dev/
Current Sprint in Sidebar*Current sprint{{#ask: [[Category:Project sprints]][[Sprint start date::<{{CURRENTYEAR}}/{{CURRENTMONTH}}/{{CURRENTDAY}}]][[Sprint end date::>{{CURRENTYEAR}}/{{CURRENTMONTH}}/{{CURRENTDAY}}]]|format=template|template=Sidebar query template|link=none|}}
My Active Sprint Tasks in Sidebar*My tasks{{#ask: [[Category:Project tasks]][[Project task owner::<q>[[User alias::{{CURRENTUSER}}]]</q>]][[Project story::<q>[[Project sprint::<q>[[Category:Project sprints]][[Sprint start date::<{{CURRENTYEAR}}/{{CURRENTMONTH}}/{{CURRENTDAY}}]][[Sprint end date::>{{CURRENTYEAR}}/{{CURRENTMONTH}}/{{CURRENTDAY}}]]</q>]]</q>]][[Project task status::In progress||Not started]]|format=template|template=Sidebar query template|link=none|}}
More Extension ExamplesTwitter Feedhttp://www.mediawikiwidgets.org/Twitter_Search (example)Flickr Feedhttp://www.mediawikiwidgets.org/FlickrAmazon Carouselhttps://widgets.amazon.com/Amazon-Carousel-Widget/Google Analyticshttp://www.mediawiki.org/wiki/Extension:Google_AnalyticsOptify Analyticshttp://www.optify.net/
Templates and FormsMediaWiki template is essential for its structured data handlingEditing, especially Template editing, is not trivialSemantic Forms extension greatly lowers the barCustomizing templates and forms can provide very visually appealing pages
Form with a Stylehttp://www.thethirdturn.com/w/index.php?title=Form:Driver&action=edit
Forms with autocompletionAdvanced Auto-Completion on Customized Query ResultsBasic Auto-Completion on Category Values
Story TemplateTo have a field (form link) for users to quickly create tasks that belong to the story (parameter preset){{#forminput:Project Task|45||Create a new task|Project Task[story]={{PAGENAME}}&Project Task[owner]=__USERNAME__&Project Task[status]=Not started}}http://wiking.vulcan.com/dev/index.php/Prepare_for_SMWCon_Spring_2011
Example: Daily ReportWe want to achieve “burn-down” chart in our sprint overviewWe need:Daily new tasks (created, but not started yet)Daily in-progress tasks (started by not done yet)Daily finished tasks (completed)Task ownership and completion timelineAnd similar things for bugs (other analysis)
Quiz #1:How do you specify Today, Tomorrow in query?
Date Magic and TemplatesMagic words: CURRENTYEAR/MONTH/DAYSome MediaWiki  date-related templates to use DATEDIFF, DATECOMP, …NEXTDAY, NEXTDAYDATE, …http://en.wikipedia.org/wiki/Category:Date-computing_templateshttp://en.wikipedia.org/wiki/Category:ISO_date_templates
Quiz #2:How do you do strictly “less than” or “greater than”?(Before 2010.03)
Strict ComparisonDate query : how to do “In progress” with a finish date “>” today?Extra markup would reduce usabilitySemantic MediaWiki did NOT support it until 2010.11We patched Semantic MediaWiki CoreNow (as of SMW  1.5.3 + ) we have < and > implemented Use ≤ and ≥ (on ASCII keyboard 242 and 243)And a configuration to turn it on
Quiz #3:What if “Today” changes to “Tomorrow” or later dates in your query template?{{CURRENTYEAR}}/{{CURRENTMONTH}}/{{CURRENTDAY}}
Freeze the TimeSubclusion is your friend!Subclusion = Substitute + inclusionToday's newly started # tasks: [[Report start task count::{{subst:#ask: [[Category:Project tasks]][[Project task start date::{{{date|}}}]]| format=count|}}]]
More CustomizationOut there in the Wild Wiki World
Integration
StepsKnow what to buildCustomers, customers, customers!Get your collection of extensions…Customize your wiki (template, forms)Handle the data (schema, query, API, …)
Case 1. Proper WikiFocus on Skin, Form and TemplateSteps:Pick a (default) skinDesign some formsAnd templates (queries) behind the formsBuild starter pages and Go!
Biology Ontology WikiPeople need discuss about the details related to construct a biology ontologyClasses (categories)PropertiesRelationsTextbook analysisDiscussionForms necessary to keep content tidy
Ex: Property Form
Forms on Namespacehttp://www.mediawiki.org/wiki/Extension:Semantic_Forms#Based_on_namespace“Easy-peazy, lemons squeezy” ?
Case 2: Simple Workflow AppIdea: go from one form to another formNeed form links in the templateMay need user rights management
Proposal Review Workflow ExampleUser submits a proposal via a formFill in basic information about the proposalSet a field in the form to be, say, “New”User doesn’t see further information about “Reviewer” or “Owner”, etc.Semantic notification (email and RSS feed) facilitates communicationReviewer finds the form in a canned queryReviewer changes the status to, say, “Approved”Reviewer field (say “Reviewed by”) is (automatically) setThen reviewer assigns the proposal to a owner, say, “Alice”The owner  (“Alice”) now sees it and can start work on itChanges the status to “Active”Adds a start date or maybe an estimated end date too
Ways to Handle WorkflowAdd a link to open another formForce edit “review” using another form (e.g. reviewer form) When saving the new form, the category is changedNow we have a different category  a different default formChange a value to include or exclude to another templateMay need #if (or #switch) statement in template to change (or include/exclude) template valuesUse “Page has default form” property (Semantic Forms extension)
Case 3: WikingDev WikiOur project management wikiWe use it for *all* things it can do:Proposals, ideas, email messages, features, bugsAgile development: milestones, sprints, stories, tasksCode/Feature association: SVN mapped to tasks/bugsProgress analysis: burn-down charts, work calendarCollaboration, Documentation, Demonstration
Examples of Data I/OWiking Development Wiki  An Imported emailhttp://wiking.vulcan.com/dev/index.php/Demo_scenariosAn email imported as a Project Bughttp://wiking.vulcan.com/dev/index.php/Issue_11886_Insert_a_single_propertyA task uploaded via Outlook with multiple commitshttp://wiking.vulcan.com/dev/index.php/WikiTags_Release_Structure
Microsoft Office ConnectorLeverage Microsoft Office applications and technologyBring SMW info to Office applications on-demandAPI for data I/O: add and modify wiki data within Microsoft Office Utilize semantics to improve relevanceSmart actions for semantic propertiesAPIAPIConnectionsSmartJesse Wang | SemTech 2010
Our Agile Project Management (Scrum)57WikingJesse Wang | SMWCon Amsterdam 2010
Wiki Data I/OWiking development wiki has two external applications Subversion integrationMicrosoft Office integrationExtensions to support itSemantic WikitagsSemantic Connector
Data I/O ExtensionsMediaWiki API – very basic read/writePage Object ModelFirst Data I/O extension to allow access some wiki structure data (links, title, basic template field)SMWWriterBased on POM, support annotations (semantic properties)Data API extension in SMW+Semantic WikiTags and Semantic ConnectorWiki Object ModelA powerful and comprehensive object model (Data API)Read/write at finer object level (sentences, template parameters)
Wiki Object ModelPrevious wiki data API efforts are not good enough to build applications There are strong needs for access the structured data and unstructured data in the wiki as a data storeFrom internal and external applications’ point of view A DOM-like approach is reasonable choiceXpath is a great tool and standardGranularity offers flexibility and powerPeople like to operate on known objects rather than parsing and handling wiki textsAPIs provide access to both internal and external apps
Wiki Object Model ObjectsCategoryLinkPropertyTextMagic wordHTML tagSentenceWord*Image61PageSectionParameterParameter valueTemplateTemplate fieldParser functionList itemTableTable cell* Not yet  implemented as of April 2011
Demo of WOMDemo at http://wiking.vulcan.com/dev_sandbox/
Demo 1: APIs
The API is part of MediaWiki API, with our additions to allow get and set (read/write) the content of a wiki page
http://wiking.vulcan.com/dev/index.php/Extension:Wiki_Object_Model/Apis
Demo 2: Inline Editor
A simple inline editor (AJAX styled) to let user modify a specific portion of the wiki page
Based on http://wiking.vulcan.com/dev/index.php/Extension:Wiki_Object_Model/Functions62
4. Final Case StudyStanford University CS 227 Car WikiDeveloped for Masters level CS class for assignment in “Knowledge Representation Within a Social Context” Over 40 students created pages populating an ontology, created a personal page documenting their automobile, and compiled site statistics into group pagesExtra credit was offered to the entire class as a group upon initial wiki population assignment
“Dream Car” Wiki OntologyThe ontology was left intentionally incomplete and students were encouraged to update the ontologyCar manufacturer pagesCar make & model pagesPersonal “Licensed Car” PageCustom properties added to ontology and personal pages

Smwcon spring2011 tutorial applied semantic mediawiki

  • 1.
    Applied Semantic MediaWikiSMWCon Spring 2011 Tutorial #42011.04.28
  • 2.
    Who Are WeJesseJiaxin WangSr. Software Architect, Vulcan Inc.http://semantic-mediawiki.org/wiki/User:JesseNing HuSr. Software Developer, TeamMersion LLCWil SmithSoftware Engineer, Vulcan Inc.
  • 3.
    About Vulcan3Vulcan Inc.was established in 1986 by investor and philanthropist Paul G. Allen, co-founder of Microsoft, to manage his business and philanthropic efforts. Allen is chairman of Vulcan and his sister, Jody Allen, is president and CEO.
  • 4.
  • 5.
  • 6.
    Using a BundleSemanticBundle http://www.mediawiki.org/wiki/Semantic_BundleFeatures: (Pros and Cons)A set of author-selected extensionsA fixed set of extensions, few customization optionsSimplified download and configuration processStill need manual configurationUsually up-to-date and work well togetherCommunity tested and supported
  • 7.
    Installation PackageSMW+ Packagehttp://smwforum.ontoprise.com/smwforum/index.php/Help:SMW%2BFeatures:A set of (fixed) company selected extensionsSimplifies installation and configurationWindows installer and VM images are greatAnd they just became free!You may still be curious about what it does…Professionally documented and testedUsually weeks after major release of latest SMW
  • 8.
    Real-world DeploymentWhen youwant a set of custom extensions, you wantYour OWN deployment mechanism!
  • 9.
    Deployment PracticesYour owncodebase, with checkpointsSVN or Git to get the base, and thenCustomize the wikiScript or Manual or MixedA third-party deployment framework and repositoryOntoprise: http://smwforum.ontoprise.com/smwforum/index.php/Help:Deployment_FrameworkRPI: http://code.google.com/p/smwbp/wiki/setup_wikiReferata: http://smw.referata.com/wiki/Category:Packages
  • 10.
    Build SystemYou ownit!Your own selection of extensionsAnd versions of themOwn patches, scripts and templatesVulcan: Internal GIT repositories of completed buildVersioning and branches between projectsOther examples:RPI Best Practice (Google code)Hudson build (PNNL)
  • 11.
    Wish ListA publicwiki installation repositorywith lots of packagesIncluding necessary dataSemantically marked upWell documented (or even reviewed)Easy to find and useFederated wiki package store (Wiki AppStore)
  • 12.
  • 13.
    What to CustomizeSkinsExtensionsSchemaand DataTemplates and formsAnything else you can code… 
  • 14.
    SkinsHow to customizea skinCreate your skin file in /skins folder within your wiki directory, like Ontoskin.phpFinish this skin files following Ontoskin.php skin filesThere are two classes in this skin files:Inherit from SkinTemplate, set the CSS and template filter.Inherit from QuickTemplate, set the UI styleCreate skin folder with your skin name in /skinsCopy image and CSS files to your skin folderUse your own skinIn LocalSettings.php set$wgDefaultSkin = 'wiking_skin'
  • 15.
  • 16.
    Skin Customization ExampleVulcanDevelopment Wiki and Seahawk wiki. We have customized these two skins for our projects and the key is the method of QuickTemplate. In this method, you can decide what to show and how it shows on your wikiYou can customize wiki site like menu links, page titles, CSS and JavaScript files in the data properties of QuickTemplateFor example, show wiki side bar in your skin<?phpforeach ($this->data['sidebar'] as $bar => $cont) { ?> <li> <a href="#"><h5><?php $out = wfMsg( $bar );></h5></a> <ul> <?phpforeach($cont as $key => $val) { ?> <li id="<?php echo $val['id'] ?>" > <a href="<?php echo $val['href'] ?>"><?php echo $val['text'] ?></a> </li> <?php } ?> </ul> </li><?php } ?>
  • 17.
    Personalized SkinSkin supportscustomization via __USERNAME__User can have personalized styles within a skinhttp://www.mediawiki.org/wiki/Manual:Skin_configuration#User_CSSTip: A way to turn off Wikipedia banner ad:http://en.wikipedia.org/wiki/User:Jesseone/vector.css
  • 18.
    Schema and Data“Justdo it!”Easy to startFlat, large ontology, at beginningMany properties only valid in certain casesBut it’ll get better!“Designer” OntologyProfessionally generated (Protégé)More data (restriction) than necessaryData importer isn’t powerful to fully support all OWL features“The middle road” practical schema design: think, adapt, evolve
  • 19.
    N-ary RelationsType:RecordFrom 1.5+ supports Semantic SearchStill no “Allowed values”, no unit, and no other visual customizationsSemantic Internal Object extensionAdding an object in the middleUsing parameterized (patterned) propertiesUsing a triple store (external)
  • 20.
    ExtensionsWhere to findextensionshttp://www.mediawiki.org/wiki/Extension_MatrixBy supported version (1.16, 1.17, …)By status (beta, stable, …)By type (API, AJAX, hook, user rights…)By new-ness (sort by most recently created time)By talk page new-ness…By most updated versions…
  • 21.
    Get the Extensions!Someessential ones!http://semantic-mediawiki.org/wiki/Help:MediaWiki_extensionsSemantic MediaWiki extensions are quite a few:http://semantic-mediawiki.org/wiki/Help:SMW_extensionsFind what you want Not exactly? Then patch it!Nothing close? Then build it!Or find people to build it 
  • 22.
    Our ExperiencesWe builtseveral wikis (2008-2011)The most useful extension (SF) often needed patchesAuto-completionFixed set of allowed valuesAll values in a categoryAll values having a specific propertyAll values from a queryMore parameters support (default values, UID, etc.)New functionality in other extensions or SMW CoreAggregation (average, max, sum, etc.)e.g. > and < comparison
  • 23.
    Security ExtensionsKnow thyself!– What you want, really.Often customers don’t know what they really wantMany choices = nothing is perfectFrom basic to advanced:MediaWiki built-in securitySimple Security (Page Security)HaloACLFeaturesRestrictions
  • 24.
    A Short StoryProposalManagement System (Wiki)Users (including privileged users) submit proposalsReviewers (privileged users) rate and review themReviewers discuss and make decision and assignWhat security extension should it employ?HaloACL?SimpleSecurity?MediaWiki built-in groups?
  • 25.
    How to Select| TestInclusion / transclusionSpecial:ExportAton/RSS feed, Watch pageListing and SearchingSpecial:SearchRecentChanges, AllPagesDiff and Revision URLAction links (raw, render)API (???)Action=query? 3rd party APIsAuthor backdoor?Caching?Files and Images?Redirects?Other extensions?
  • 26.
    Visualization: Our Path2008:SRF used to only have few options 2009: Exhibit seemed coolPorted webitFixed some bugs and enhanced features Runway, TimePlot, multiple rows in Map view etc.2010: Open Flash ChartMore bars, pies, lines, scatter plot…InteractionRicher information display
  • 27.
    Comparing SRF OptionsGoogleCharts (pie and bar)Google does it! (G gets your data, no offline choice…)Static bar and pie, no color options…ExhibitMore choices (timeline, map, facet, runway…)Browser compatibility issuesOFC (Open Flash Chart)Many bars, charts, plots, even scattered plotsFlash required
  • 29.
    Sidebar CustomizationBasic: MediaWiki:SidebarEnhanced:semantic queries, and tree viewsAdvanced: use variables together with queriesCustom: Using an extension: DynamicSidebarCustomize your own sidebar at User:<username>/Sidebarhttp://www.mediawiki.org/wiki/Extension:DynamicSidebarExample: http://wiking.vulcan.com/dev/
  • 30.
    Current Sprint inSidebar*Current sprint{{#ask: [[Category:Project sprints]][[Sprint start date::<{{CURRENTYEAR}}/{{CURRENTMONTH}}/{{CURRENTDAY}}]][[Sprint end date::>{{CURRENTYEAR}}/{{CURRENTMONTH}}/{{CURRENTDAY}}]]|format=template|template=Sidebar query template|link=none|}}
  • 31.
    My Active SprintTasks in Sidebar*My tasks{{#ask: [[Category:Project tasks]][[Project task owner::<q>[[User alias::{{CURRENTUSER}}]]</q>]][[Project story::<q>[[Project sprint::<q>[[Category:Project sprints]][[Sprint start date::<{{CURRENTYEAR}}/{{CURRENTMONTH}}/{{CURRENTDAY}}]][[Sprint end date::>{{CURRENTYEAR}}/{{CURRENTMONTH}}/{{CURRENTDAY}}]]</q>]]</q>]][[Project task status::In progress||Not started]]|format=template|template=Sidebar query template|link=none|}}
  • 32.
    More Extension ExamplesTwitterFeedhttp://www.mediawikiwidgets.org/Twitter_Search (example)Flickr Feedhttp://www.mediawikiwidgets.org/FlickrAmazon Carouselhttps://widgets.amazon.com/Amazon-Carousel-Widget/Google Analyticshttp://www.mediawiki.org/wiki/Extension:Google_AnalyticsOptify Analyticshttp://www.optify.net/
  • 33.
    Templates and FormsMediaWikitemplate is essential for its structured data handlingEditing, especially Template editing, is not trivialSemantic Forms extension greatly lowers the barCustomizing templates and forms can provide very visually appealing pages
  • 34.
    Form with aStylehttp://www.thethirdturn.com/w/index.php?title=Form:Driver&action=edit
  • 35.
    Forms with autocompletionAdvancedAuto-Completion on Customized Query ResultsBasic Auto-Completion on Category Values
  • 36.
    Story TemplateTo havea field (form link) for users to quickly create tasks that belong to the story (parameter preset){{#forminput:Project Task|45||Create a new task|Project Task[story]={{PAGENAME}}&Project Task[owner]=__USERNAME__&Project Task[status]=Not started}}http://wiking.vulcan.com/dev/index.php/Prepare_for_SMWCon_Spring_2011
  • 37.
    Example: Daily ReportWewant to achieve “burn-down” chart in our sprint overviewWe need:Daily new tasks (created, but not started yet)Daily in-progress tasks (started by not done yet)Daily finished tasks (completed)Task ownership and completion timelineAnd similar things for bugs (other analysis)
  • 38.
    Quiz #1:How doyou specify Today, Tomorrow in query?
  • 39.
    Date Magic andTemplatesMagic words: CURRENTYEAR/MONTH/DAYSome MediaWiki date-related templates to use DATEDIFF, DATECOMP, …NEXTDAY, NEXTDAYDATE, …http://en.wikipedia.org/wiki/Category:Date-computing_templateshttp://en.wikipedia.org/wiki/Category:ISO_date_templates
  • 40.
    Quiz #2:How doyou do strictly “less than” or “greater than”?(Before 2010.03)
  • 41.
    Strict ComparisonDate query: how to do “In progress” with a finish date “>” today?Extra markup would reduce usabilitySemantic MediaWiki did NOT support it until 2010.11We patched Semantic MediaWiki CoreNow (as of SMW 1.5.3 + ) we have < and > implemented Use ≤ and ≥ (on ASCII keyboard 242 and 243)And a configuration to turn it on
  • 42.
    Quiz #3:What if“Today” changes to “Tomorrow” or later dates in your query template?{{CURRENTYEAR}}/{{CURRENTMONTH}}/{{CURRENTDAY}}
  • 43.
    Freeze the TimeSubclusionis your friend!Subclusion = Substitute + inclusionToday's newly started # tasks: [[Report start task count::{{subst:#ask: [[Category:Project tasks]][[Project task start date::{{{date|}}}]]| format=count|}}]]
  • 44.
    More CustomizationOut therein the Wild Wiki World
  • 45.
  • 46.
    StepsKnow what tobuildCustomers, customers, customers!Get your collection of extensions…Customize your wiki (template, forms)Handle the data (schema, query, API, …)
  • 47.
    Case 1. ProperWikiFocus on Skin, Form and TemplateSteps:Pick a (default) skinDesign some formsAnd templates (queries) behind the formsBuild starter pages and Go!
  • 48.
    Biology Ontology WikiPeopleneed discuss about the details related to construct a biology ontologyClasses (categories)PropertiesRelationsTextbook analysisDiscussionForms necessary to keep content tidy
  • 49.
  • 50.
  • 51.
    Case 2: SimpleWorkflow AppIdea: go from one form to another formNeed form links in the templateMay need user rights management
  • 52.
    Proposal Review WorkflowExampleUser submits a proposal via a formFill in basic information about the proposalSet a field in the form to be, say, “New”User doesn’t see further information about “Reviewer” or “Owner”, etc.Semantic notification (email and RSS feed) facilitates communicationReviewer finds the form in a canned queryReviewer changes the status to, say, “Approved”Reviewer field (say “Reviewed by”) is (automatically) setThen reviewer assigns the proposal to a owner, say, “Alice”The owner (“Alice”) now sees it and can start work on itChanges the status to “Active”Adds a start date or maybe an estimated end date too
  • 53.
    Ways to HandleWorkflowAdd a link to open another formForce edit “review” using another form (e.g. reviewer form) When saving the new form, the category is changedNow we have a different category  a different default formChange a value to include or exclude to another templateMay need #if (or #switch) statement in template to change (or include/exclude) template valuesUse “Page has default form” property (Semantic Forms extension)
  • 54.
    Case 3: WikingDevWikiOur project management wikiWe use it for *all* things it can do:Proposals, ideas, email messages, features, bugsAgile development: milestones, sprints, stories, tasksCode/Feature association: SVN mapped to tasks/bugsProgress analysis: burn-down charts, work calendarCollaboration, Documentation, Demonstration
  • 55.
    Examples of DataI/OWiking Development Wiki An Imported emailhttp://wiking.vulcan.com/dev/index.php/Demo_scenariosAn email imported as a Project Bughttp://wiking.vulcan.com/dev/index.php/Issue_11886_Insert_a_single_propertyA task uploaded via Outlook with multiple commitshttp://wiking.vulcan.com/dev/index.php/WikiTags_Release_Structure
  • 56.
    Microsoft Office ConnectorLeverageMicrosoft Office applications and technologyBring SMW info to Office applications on-demandAPI for data I/O: add and modify wiki data within Microsoft Office Utilize semantics to improve relevanceSmart actions for semantic propertiesAPIAPIConnectionsSmartJesse Wang | SemTech 2010
  • 57.
    Our Agile ProjectManagement (Scrum)57WikingJesse Wang | SMWCon Amsterdam 2010
  • 58.
    Wiki Data I/OWikingdevelopment wiki has two external applications Subversion integrationMicrosoft Office integrationExtensions to support itSemantic WikitagsSemantic Connector
  • 59.
    Data I/O ExtensionsMediaWikiAPI – very basic read/writePage Object ModelFirst Data I/O extension to allow access some wiki structure data (links, title, basic template field)SMWWriterBased on POM, support annotations (semantic properties)Data API extension in SMW+Semantic WikiTags and Semantic ConnectorWiki Object ModelA powerful and comprehensive object model (Data API)Read/write at finer object level (sentences, template parameters)
  • 60.
    Wiki Object ModelPreviouswiki data API efforts are not good enough to build applications There are strong needs for access the structured data and unstructured data in the wiki as a data storeFrom internal and external applications’ point of view A DOM-like approach is reasonable choiceXpath is a great tool and standardGranularity offers flexibility and powerPeople like to operate on known objects rather than parsing and handling wiki textsAPIs provide access to both internal and external apps
  • 61.
    Wiki Object ModelObjectsCategoryLinkPropertyTextMagic wordHTML tagSentenceWord*Image61PageSectionParameterParameter valueTemplateTemplate fieldParser functionList itemTableTable cell* Not yet implemented as of April 2011
  • 62.
    Demo of WOMDemoat http://wiking.vulcan.com/dev_sandbox/
  • 63.
  • 64.
    The API ispart of MediaWiki API, with our additions to allow get and set (read/write) the content of a wiki page
  • 65.
  • 66.
  • 67.
    A simple inlineeditor (AJAX styled) to let user modify a specific portion of the wiki page
  • 68.
  • 69.
    4. Final CaseStudyStanford University CS 227 Car WikiDeveloped for Masters level CS class for assignment in “Knowledge Representation Within a Social Context” Over 40 students created pages populating an ontology, created a personal page documenting their automobile, and compiled site statistics into group pagesExtra credit was offered to the entire class as a group upon initial wiki population assignment
  • 70.
    “Dream Car” WikiOntologyThe ontology was left intentionally incomplete and students were encouraged to update the ontologyCar manufacturer pagesCar make & model pagesPersonal “Licensed Car” PageCustom properties added to ontology and personal pages
  • 71.
    Extensions for CarWikiStandard SMW extension suite downloaded from SMW+ code repositoryCustom Semantic Results Formatter used with Open Flash ChartsWidgets extension included for creating custom JavaScript APIs to other social frameworks
  • 72.
    Forms and TemplatesSemanticForms for creating company, car, and personal vehicleTemplates for presenting your car and linking the make & model to Widget templates for social links
  • 73.
    Demo of CarWikiOntologySample Car Manufacturer : AudiSample Car Make & Model : Audi A6/A7Sample Licensed Cars : William_A6, William_A7Final Chart of Completed Assignment
  • 74.
    A Wiki ina WeekOntology, Code Installation and Sample Page Population Completed within a DaySMW+ with core extensionsMinimal Updating and Bug Fixing of Components Taken from Other Wiki ProjectsCustom widgets and result formattersFinal Population of Wiki Articles Completed Over the Course of a Week Long Assignment
  • 75.
    SummaryJumpstartDeployment of yourbundle/suite/packageCode, pseudo-code/meta-data, and dataCustomizeSkins, StylesExtension choicesIntegrate Know the requirements and dataPut everything together and evolve
  • 76.

Editor's Notes

  • #4 ----- Meeting Notes (3/24/11 15:29) -----Vulcan is the MothershipProviding funds and supportPaul Allen successful
  • #29 Counter information overload with visualizations
  • #57 WikiTags is here to bridge semantic wikis with more potential users, such as users of Microsoft Word, Outlook and Excel, with Microsoft SmartTag technology.