Architecture Repository/Artifacts/What is MediaWiki?

From mediawiki.org

‎

Wikimedia logo Wikimedia Architecture Repository
Home | Artifacts | Process | Patterns

What is MediaWiki?[edit]

This is an opinion document seeking to answer the question: what is MediaWiki? It defines basic concepts and then presents the defining characteristics and fundamental functionality of the current state of the MediaWiki platform. It also documents functionality that exists to support those key aspects of the platform.

Last updated: 2023-06-14 by CCicalese (WMF)
Status: v1 published

Introduction[edit]

MediaWiki is extensible FLOSS[1] wiki[2] software with a multilingual interface for versioned content on the web.

This is an opinion document seeking to answer the question: what is MediaWiki? It defines basic concepts and then presents the defining characteristics and fundamental functionality of the current state of the MediaWiki platform. It also documents functionality that exists to support those key aspects of the platform.

This document intentionally does not address issues of implementation. Most of the functionality discussed currently resides in MediaWiki core, but some is in MediaWiki extensions. For the purposes of this document, the distinction between core and extensions is not considered.

Basic Concepts[edit]

The basic concepts of MediaWiki are content, pages, revisions, and actors:

Content The fundamental reason for being for MediaWiki is to manage user-editable, versioned content. The default representation of this content is long form text written in wikitext, but other types of content are possible as well.
Page Content is arranged into pages that are each addressable by a unique title. The title contains a namespace followed by a text string that is unique per namespace. Pages are not just the "unit of consumption", but also the "unit of curation". They can be edited, protected, deleted, etc, but perhaps most importantly, they can be watched.
Revision Each time the content on a page is edited and saved, a new revision of the page is stored containing the updated content. This allows content to be versioned. It is possible to have multiple pieces of content of different content types associated with a single revision of a page.
Actor Each revision of a page is associated with the actor who created it. The actor may be an authenticated user or other persistent identifier that allows contributions to be tracked.

Defining Characteristics[edit]

Following are the defining characteristics of MediaWiki, resulting from design decisions in the core platform.

Editable Consistent with its nature as wiki software, content managed by MediaWiki can be edited by its end users. While it is possible to protect certain content, the default behavior is that all content is editable.
Versioned It is possible to view old versions of content, which is fundamental to transparency, revealing the provenance of content. Further, it is possible to revert to previous versions, which is important to the anti-vandalism properties of the wiki.
Reversible It is easier to undo changes than to make them, reducing the fear associated with making a change as well as making it simple to revert vandalism.
Organized Editors are able to curate not only individual pieces of content, but  also the relationships between content by adding links, templates, categories, Wikidata links, etc.
Discussible All content pages come with associated pages which contain discussion about the content.
Suppressible It is possible to remove content and/or parts of the history from public view. Regular vandalism is reverted but still visible in the history, but things like doxxing, death threats, etc have to be hidden from almost all users.
Observable Users who care about the content on a page can register to watch the page to be notified when that page content changes. This allows them to defend against vandalism and to engage with other contributors, especially new contributors. Since pages can transclude content from other pages, especially to compose the presentation of the page, it is also useful to watch the transcluded pages. There are also special pages that allow all changes across the wiki to be viewed.
Transparent All important user actions are logged and can be reviewed. Everything that can be public is public.
Extensible - core platform The MediaWiki core platform can be extended to add new functionality, customized behavior, alternative skinning, or non-wikitext content.
Extensible - networked API MediaWiki content is accessible through a networked API to enable creation of new user interfaces or supplementary tools. It also supports delegation of some functionality through external API, such as possible delegation of authorization to OAuth.
Extensible - end user scriptability It is possible to create and maintain tools on-wiki (e.g. through scripts, gadgets, modules, and parser functions), which democratizes the process of building the end user experience. This allows users to produce extended user experiences in wiki pages as well as highly customized behavior for their personal wiki experience. This includes both the reading experience as well as highly specific content creation and curation workflows for power users. Some of this functionality may be long lived while some may be experimental, with the intent that if these tools become more widely desired or accepted, they could eventually migrate into core functionality.
Scalable MediaWiki is scalable to be able to handle high numbers of concurrent viewers and concurrent editors. This is generally provided through caching of content. Some of this caching is done within MediaWiki itself, while some is done in the surrounding infrastructure.
Localization and Internationalization MediaWiki supports a multilingual user interface supported by interface messages with translation support from translatewiki as well as a namespace for editing interface messages from the front end. In addition, there is support through extensions for multilingual content.
Multi-platform MediaWiki is served by a web UI on both desktop and mobile platforms. Specialized interfaces can be created outside of MediaWiki using the networked API or content dumps for optimized experiences on different form factors.
FLOSS MediaWiki is an open source project. As such, it is both a consumer of other open source software as well as being distributed as open source for use by third parties.
Privacy Friendly By default, identifying information of users (such as their real name and email address) are kept private. This allows users to interact pseudonymously on the platform.
Independent MediaWiki has few platform requirements aside from a web server, PHP, and a database server. It is meant to be able to run in a variety of environments. This has both positive and negative consequences upon the platform.

Fundamental Functionality[edit]

The fundamental functionality provided by the MediaWiki platform, which provides its unique style of wiki capabilities and satisfies the defining characteristics above, is as follows:

Viewing content The content on a page may be viewed by end users with the appropriate permissions.
Browsing content End users can navigate through the content, clicking on links to navigate through the wiki from page to page.
Editing content The content on a page may be edited by end users with the appropriate permissions. Several editing interfaces exist, including a wikitext editor and a WYSIWYG editor that incorporates forms for editing templated content.
Reverting edits Vandalism can be quickly reverted by end users with the appropriate permissions.
Viewing changes Users can reliably assess the impact of changes by viewing the differences between two revisions of the same page.
Patrolling Users are able to browse all changes across the wiki in order to review changes for vandalism.
Linking pages The content on a page may contain links to other pages. The page’s title provides its address. The end user can see which other pages link to the current page. If the wiki is federated, links can be created to pages on other wikis in the federation.
Composition The content on a page may be reused as a template in other pages. Parameters may be supplied for substitution into the included content. Basic programming constructs can be used to customize the included content.
Modeling knowledge Knowledge can be modeled in user-defined ways to create repeatable patterns and consistent structures. This can include reuse through composition to build content from generic structures as well as support for editing through forms to guide the user. With the use of extensions, semantic information can also be associated with wiki content.
History Old revisions of the content on a page are retained and are viewable by end users, including diffs of changed content.
Attribution Each revision of a page indicates which actor made the edit and is timestamped, thus providing provenance for the content. Contributions associated with a given actor may be listed.
Watchlist It is possible for an end user to maintain a list of pages they are watching and to be notified when the content of a page on their watchlist is changed. This is an important mechanism for defending against vandalism as well as fostering collaboration between users working on the same or similar content.
Notifications Users will be notified of important events on the wiki, such as edits to pages they are watching, communication from other wiki users, or editing milestones.
Localization and Internationalization of UI messages The user interface (UI) text may exist in multiple languages. The end user can select in which language to view the user interface. Translators can provide translations of interface messages. Translations can be overridden by users.
Talk pages For each content page, an associated talk page exists. The talk page is used for meta conversation about the content on the page with which it is associated.
Citations End users can add and manage references to material supporting the content of the wiki.
Categorization End users can assign pages to user-defined categories, which is a powerful tool for content curation. The end user can view which pages are assigned to a given category.
Curation A set of tools are available to help site administrators curate content. Some of these exist in special pages, and some require administrative access.
Files Files can be uploaded to the platform. A page is created in the File namespace for each uploaded file. This allows image files to be referenced in the content of other pages. There is support for image processing features such as scaling images to smaller sizes.
Search A search interface can be used to find and access content within the wiki.
Import/Export Content can be exported to a file and imported from a file. This facilitates creating dumps of content as well as migration of content from one wiki to another.
Scriptability Users can create and maintain programs as part of the wiki content and using APIs. These programs can interact with the wiki content. This enables the automation of workflows.
Content transformation Wikitext is the storage format, but generally is not the rendered format of the content. Typically content is rendered as HTML, although other rendered formats are possible. There is a need to be able to transform between wikitext and those formats.

Operational Functionality[edit]

When implementing a wiki, these functionalities are used to support the implementation and operation of the fundamental functionality.

Authentication It must be possible to determine the identity of logged in users. An external identity provider may be used to authenticate the user, providing the identity to the platform.
Shared Identity It is possible to share a user identity across multiple wikis in a wiki federation. This can include sharing some permissions/group memberships across the federated wikis.
Authorization To restrict access to specific features of the platform to authorized users, role based access control is provided. It is possible to block individual users from key functionality to limit repeated vandalism.
Caching To provide acceptable performance, especially in highly scaled configurations, caching is provided in the core platform. It is also possible to provide additional caching outside the core platform.
Event handling The core platform can emit events that can be consumed by other services.
Structured logging Important events are logged in a structured way so the events can be examined in context.
Database replication The core platform differentiates between the primary database server, which is used for writes, and replicas that can be used for reads.
Async processing (jobs) To provide reasonable response times in the user interface, some processing in response to requests is performed in asynchronous jobs.
User preferences The user interface is customizable based upon user configurable preferences.
Installation/upgrade/maintenance A set of scripts exist for installation, upgrade, and maintenance of the software.

References[edit]

  1. ↑ Per https://en.wikipedia.org/wiki/Free_and_open-source_software, “Free and open-source software (FOSS) is a term used to refer to groups of software consisting of both free software and open-source software where anyone is freely licensed to use, copy, study, and change the software in any way, and the source code is openly shared so that people are encouraged to voluntarily improve the design of the software… The free software movement and the open-source software movement are online social movements behind widespread production and adoption of FOSS, with the former preferring to use the terms FLOSS or free/libre.”
  2. ↑ Per https://en.wikipedia.org/wiki/Wiki, a wiki is “an online hypertext publication collaboratively edited and managed by its own audience, using a web browser.”