Architecture:MediaWiki/entity layer

From mediawiki.org
Jump to navigation Jump to search

The entity layer is the foundation of MediaWiki. It's where the central concepts are modeled, where the "nouns" of the domain are defined.

Status:
As per August 2020, most domain concepts are still entangled with the behavior layer or the storage layer. As code in these layers is refactored to reduce coupling, more code will be identified as belonging to the entity layer.

Constraints:
Code in the behavior layer should not make use of code in layers above it, such as the behavior layer or the storage layer.

Dependencies:
Code entity layer should not depend on any code in any other layer, since it provides the basic vocabulary that the other layers use.

Typical patterns:
The definition of domain nouns typically makes use of the data object pattern.

Example:
An example of entity layer code are the UserIdentity interface and the TitleValue class.