Help:SMW

From DUNE
Revision as of 20:33, 23 October 2014 by BrettViren (talk | contribs)
Jump to navigation Jump to search

Use of Semantic MediaWiki extensions in this wiki

General

SMW adds the idea of named properties to MediaWiki. These are generally organized into a "class" similar in concept to a class in the Object-Oriented programming paradigm. A class consists of:

  • A set of associated parameters making up the "object" instance of a class
  • A form to create and edit instances
  • A category to collect all instances of a particular class
  • Some views into of a subset of a classes parameters and possibly across a collection of objects

Creating a class

In this wiki, creating a class is done by an admin. Go to Special:SpecialPages and find the link for creating a class. The convention is to name *fields* with noun-like names like "something" and *properties* with verb-like names "Has something" or "Is something.

The field names are what are used when calling the template that defines the object instance of the class. The property names are what are used later to query these objects.

Pick the same name for the template, form and category and do not check the box about including multiple times on the page. Pick a default output format as seems best suited.

When naming and populating the fields and properties, keep in mind how instances of this class may relate to others that exist or are expected in the future. Following consistent naming conventions helps. In particular, reuse existing property names if they match conceptually.

Properties

A property is like a generalized form of a category. A property has a page which contains a special property written like [[Has type::THE TYPE NAME]]. When creating properties through the class mechanism above this is all taken care of for you but if you wish to add new properties you need to know this detail.