Difference between revisions of "Wikispooks:SMW Best Practice"

From Wikispooks
Jump to navigation Jump to search
(link)
m (Text replacement - "WikiSpooks" to "Wikispooks")
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{HelpSection|image=SMW.png}}
 
{{HelpSection|image=SMW.png}}
 
SMW is new on Wikispooks so editors and administrators are learning as they go, but some best practices are emerging:
 
SMW is new on Wikispooks so editors and administrators are learning as they go, but some best practices are emerging:
 +
 +
==No Loose Markup==
 +
Wikispooks is following the SMW recommendation of ''strongly'' discouraging loose pieces of inline markup. For reasons of future-proofing and maintenance, '''SMW properties should be assigned through [[Wikispooks:Semantic Templates|Semantic Templates]]'''. By using templates to add the semantic properties, it is easy to adjust them as needed. Inline data should be assigned instead through an appropriate semantic object (see below).
  
 
==Object Orientation==
 
==Object Orientation==
A set of objects is being co-developed with a matching set of properties. Each of these correspond to high level structures such as Event, Person, Group etc. and should consist of matching set or ''properties'', ''semantic template'' and  ''semantic form''.
+
{{FA|Wikispooks:Semantic Objects}}
 +
Each Wikispooks page in the {{NS|main}} should be assigned a single object template, according to its content. The current choice is: {{#ask: [[Has objectClass::SMWObject]] |format=list}}. If you are unsure which one to use, then use [[concept]], since this is a catch-all that will probably be split into different objects in due course.
  
==No loose markup==
+
==Presenting SMW Data==
Wikispooks is following the SMW recommendation of strongly discouraging loose pieces of inline markup. For reasons of future-proofing and maintenance, '''SMW properties should be assigned through [[WikiSppoks:Semantic Templates|Semantic Templates]]'''. By using templates to add the semantic properties, it is easy to adjust them as needed. The main semantic template to use for replacing inline semantic data is [[Template:SMWData]].
+
SMW querying is the recommended way to present large data tables inline in pages, since this is easier in terms of reuse. The main semantic template for displaying semantic data is [[Template:SMWDocs]], which is a kind of 'catch all' for relevant data. When inserted in a page manually, it should be used just before the "References" section.
  
==Presenting SMW Data==
+
==Updating existing data==
SMW querying is the recommended way to present large data tables inline in pages, since this is easier in terms of reuse. The main semantic template for displaying semantic data is [[Template:SMWDocs]], which is a kind of 'catch all' for relevant data. When inserted in a page manually, it should usually be used just before the "References" section.
+
Wikispooks has been evolving over the years, and has made extensive use of SMW only since December 2013, so many pages still contain legacy data and the SMW structure is not rich enough to express all the information which wikispooks pages contain. ''Use of 'hardcoded' data is deprecated'', although it may still make sense to expand existing formats or even introduce new hardcoded data sections if no SMW format exists which can tidily express the data.
 +
 
 +
===Hardcoded Lists and Tables===
 +
Several hardcoded lists and tables exist. (i.e. the data is intermingled with the presentation in a form that is hard to unpick or modify). For example, [[World War I/Key Players]] or [[US Efforts to Suppress Democracy since 1945]]. ''As a matter of general principle, hardcoded data tables and lists should be replaced where practical by a [[Wikispooks:Semantic Templates|semantic template]]''. Such tables have two main advantages over the existing method:
 +
# They are easier to edit/upgrade (since the source data is much cleaner, and separate from the markup method, which is in a template)
 +
# The semantic data they generate are available for use elsewhere (be that on Wikispooks or beyond)
 +
 
 +
Currently, the set of [[Wikispooks:Semantic Properties|Semantic Properties]] is still too limited to allow elegant representation of a lot of the information in hard-coded data tables. New properties are being created which should allow for most of the existing hardcoded data to be represented instead by {{SMW}}. See the [[:Category:Pages with hardcoded data tables and lists]] for a list of such pages.
  
==Updating existing Data==
+
==="See Also"===
Until the basic structures are fixed, the process of updating the data is complicated by the fact that the target formats is still evolving. In particular
+
Quite a lot of Wikispooks pages have a "See also" section, copying [[Wikipedia]]. This is ''not'' recommended, since SMW offers a more precise way to define relationships between pages and topics. Instead of having a separate section, it is usually preferable to make a hyperlink in from the body of the text. Another alternative is to use SMW to automatically create a list.
  
 
===Descriptions===
 
===Descriptions===
'''Every Wikispooks page needs a description. Since this format is fixed, it provides an easy way to start helping the transition to an SMW-based site'''. Note that the description should:
+
''Every Wikispooks page needs a [[property:description|description]].'' This is an easy way to start helping the transition to an SMW-based site. Descriptions should:
* Make sense when viewed in isolation (One of the main uses will be to describe links in from other pages)
+
* Be <500 characters (i.e ~4 lines at most)
* Be a single paragraph of plaintext (no wiki formatting)
+
* Be a single paragraph of plaintext without wiki formatting or carriage returns (<big>↵</big>)
* Be <500 characters (i.e ~4 lines at most)  
+
* Make sense when viewed in isolation (The main use is for describing links in from other pages)
  
===Dates===
+
==Importing RDF Vocabularies==
''These should be input as a single field'', although some legacy data has separate fields for year, month, day.
+
Semantic Mediawiki allows importing of RDF vocabularies so that Wikispooks properties can be equated to properties from other vocabularies. This is recommended where possible.
  
{{WikiSpooks Footer/Semantic Mediawiki}}
+
{{Wikispooks Footer/Semantic Mediawiki}}
 
[[Category:Semantic Mediawiki]]
 
[[Category:Semantic Mediawiki]]

Latest revision as of 17:18, 14 October 2018

SMW.png

SMW is new on Wikispooks so editors and administrators are learning as they go, but some best practices are emerging:

No Loose Markup

Wikispooks is following the SMW recommendation of strongly discouraging loose pieces of inline markup. For reasons of future-proofing and maintenance, SMW properties should be assigned through Semantic Templates. By using templates to add the semantic properties, it is easy to adjust them as needed. Inline data should be assigned instead through an appropriate semantic object (see below).

Object Orientation

Full article: Wikispooks:Semantic Objects

Each Wikispooks page in the main: namespace should be assigned a single object template, according to its content. The current choice is: Concept, Decade, Document, Employment, Event, Group, Person, Place, Property, Publication, Quotation, Video, Website, Year. If you are unsure which one to use, then use concept, since this is a catch-all that will probably be split into different objects in due course.

Presenting SMW Data

SMW querying is the recommended way to present large data tables inline in pages, since this is easier in terms of reuse. The main semantic template for displaying semantic data is Template:SMWDocs, which is a kind of 'catch all' for relevant data. When inserted in a page manually, it should be used just before the "References" section.

Updating existing data

Wikispooks has been evolving over the years, and has made extensive use of SMW only since December 2013, so many pages still contain legacy data and the SMW structure is not rich enough to express all the information which wikispooks pages contain. Use of 'hardcoded' data is deprecated, although it may still make sense to expand existing formats or even introduce new hardcoded data sections if no SMW format exists which can tidily express the data.

Hardcoded Lists and Tables

Several hardcoded lists and tables exist. (i.e. the data is intermingled with the presentation in a form that is hard to unpick or modify). For example, World War I/Key Players or US Efforts to Suppress Democracy since 1945. As a matter of general principle, hardcoded data tables and lists should be replaced where practical by a semantic template. Such tables have two main advantages over the existing method:

  1. They are easier to edit/upgrade (since the source data is much cleaner, and separate from the markup method, which is in a template)
  2. The semantic data they generate are available for use elsewhere (be that on Wikispooks or beyond)

Currently, the set of Semantic Properties is still too limited to allow elegant representation of a lot of the information in hard-coded data tables. New properties are being created which should allow for most of the existing hardcoded data to be represented instead by SMW. See the Category:Pages with hardcoded data tables and lists for a list of such pages.

"See Also"

Quite a lot of Wikispooks pages have a "See also" section, copying Wikipedia. This is not recommended, since SMW offers a more precise way to define relationships between pages and topics. Instead of having a separate section, it is usually preferable to make a hyperlink in from the body of the text. Another alternative is to use SMW to automatically create a list.

Descriptions

Every Wikispooks page needs a description. This is an easy way to start helping the transition to an SMW-based site. Descriptions should:

  • Be <500 characters (i.e ~4 lines at most)
  • Be a single paragraph of plaintext without wiki formatting or carriage returns ()
  • Make sense when viewed in isolation (The main use is for describing links in from other pages)

Importing RDF Vocabularies

Semantic Mediawiki allows importing of RDF vocabularies so that Wikispooks properties can be equated to properties from other vocabularies. This is recommended where possible.


Wikispooks logo.png Policy.png Wikispooks to do.png Tools2.png SMW.png
Semantic
Mediawiki
Help.png