Architecture:MediaWiki/entity layer

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.

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.

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

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.

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