Architecture:MediaWiki/behavior layer

The behavior layer is the heart of MediaWiki. It's where the application logic lives, where the "verbs" of the domain are defined.

Status: As per April 2020, most application logic is still entangled with either the interaction layer or the persistence layer. As code in these layers is refactored to reduce coupling, more code will be identified as belonging to the behavior layer.

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

Dependencies: Code in the behavior layer may depend on code in layers below it, such as the storage layer and the entity layer, where the "nouns" of the domain are defined.

Typical patterns: The definition of domain verbs typically makes use of the business action pattern.

Example: An exampel of behavior layer code is the class.