|Found errors or typos? Just edit the page or leave a message on the talk page.|
The English language documentation is canonical and most up to date.
|Describes some parts of the software architecture of Semantic MediaWiki|
|Table of Contents|
This page explains the software architecture of Semantic MediaWiki on a high level. It is intended to help developers to get started with SMW development by understanding the main concepts. Another important goal of this page is to clarify the architectural choices that are underlying the PHP implementation.
Due to the nature of PHP code and extension development, the actual source code may make it difficult to separate architecture (deliberate, essential design decisions) from implementation (pragmatic, opportunistic realization decisions). This page tries to fix at least the main concepts.
The source code repository should be consulted for details on the code described below. While general architecture decisions are fairly stable, this page can still become outdated.
Source code documentation contains an auto-generated doxygen styled code browser.
Information found in the Architecture notes section have not yet been finalized.
Core concepts (Datamodel)
Datamodel contains the most essential architectural choice of SMW is in its data model. This specifies the way in which semantic information is represented within the system – actually it specifies what semantic information is in SMW.
The "system perspective" describes on how to directly manipulate data on database level in order for them to be managed, stored, and queried. This section describes the basic software components that are involved in representing those data.
The "user perspective" incorporates the basic data model and its technical realization through the use of dataitems and SemanticData containers and adds a representation layer (which is the user facing input/output) in form of datavalues.
- Help:Datatype values are organized in datatypes that define how user inputs are interpreted and how data is presented in outputs.
The user-visible functions of SMW can roughly be divided into the following main groups:
- Data input (annotation, writing)
- Data inspection and output (browsing, special pages)
- Query answering and query formatting
- Data export
- Maintenance tools (scripts and special pages used by site admins)
Naturally, this is only a rough user view, and some features may belong to more than one group. Each of these units has dedicated code, but all of this code is based on a common data model that provides a unified internal presentation of handling semantic data. This is the core of the SMW architecture, explained in more detail below. Moreover, there are additional facilities for internationalization that are relevant throughout the code.
The core deploys two different store implementations:
- SQLStore, SQLStore and data diffs, Database and database schema
- SPARQLStore and repository connectors
Setup and extensions
- Setup and the use of $wgExtensionFunctions sketches out the setup, required processes, and the involvement of $wgExtensionFunctions.
- Hooks lists extension points provided by Semantic MediaWiki
- A short introduction on how to extend a
Internationalization manged by Translatewiki.net together with encapsulation contained in
- The initial review of this page was in Feb 2011, SMW 1.5.5.
- Up to 2016-01 the first parts already reflected the status in SMW 1.6.0.
- 2016-01 the page is starting to be updated to SMW 2.4 state