Architecture:MediaWiki/Technical layers

The MediaWiki code base can be conceptually structured into the layers listed below. As per version 1.35, this layering is aspirational. That is, the layering described here does not describe current reality, but is intended as a guide for creating new code and for improving existing code.

Layers:

Installer Layer

edit

The installer layer is responsible for packaging the software and providing a means for users to install it on their systems. This layer typically includes scripts, configuration files, and any necessary dependencies to ensure a smooth installation process.


Entry Point Layer

edit

The entry point layer serves as the initial interface through which users or other systems interact with the application. This layer often includes the main function or method that starts the application and directs traffic to the appropriate components.


Wiring Layer

edit

The wiring layer is responsible for connecting different components of the application. It manages the dependencies and interactions between various layers, ensuring that data flows correctly and that components can communicate effectively.


Maintenance Layer

edit

The maintenance layer focuses on the ongoing support and updates of the software. This includes monitoring performance, applying patches, and making improvements to ensure the software remains functional and relevant over time.


User Interface Layer

edit

The user interface layer is where users interact with the application. This layer encompasses all visual elements, including buttons, forms, and menus, and is crucial for providing a positive user experience.


API Layer

edit

The API layer allows different software systems to communicate with each other. It defines the methods and protocols for accessing the application's functionality, enabling integration with other services and applications.


Behavior Layer

edit

The behavior layer encapsulates the business logic of the application. It defines how the application responds to user inputs and system events, ensuring that the application behaves as expected under various conditions.


Processing Layer

edit

The processing layer handles the core computations and data manipulations required by the application. This layer is responsible for executing algorithms, processing data, and performing any necessary calculations.


Storage Layer

edit

The storage layer is responsible for data persistence. It manages how data is stored, retrieved, and updated, often interfacing with databases or file systems to ensure data integrity and availability.


Entity Layer

edit

The entity layer defines the core data structures and models used within the application. This layer represents the fundamental objects and their relationships, serving as the foundation for data manipulation and business logic.


Instrumentation Layer

edit

The instrumentation layer provides tools for monitoring and logging the application's performance. This layer is essential for diagnosing issues, understanding user behavior, and ensuring the application runs smoothly.


Library Layer

edit

The library layer consists of reusable code and components that can be utilized across different parts of the application. This layer promotes code reuse and modularity, allowing developers to leverage existing solutions rather than reinventing the wheel.

Orthogonal domain view

edit

Layers are orthogonal to domain modules: each domain module may have code in some or all of the layers. Each bit of code belongs to a layer and a domain module. For patterns, the relationship is somewhat different: while some patterns may be used in any layer, many are confined to only some layers.

Note that Extensions do not have a location in this layering. Extensions align with domains, and as such are structured orthogonal to the layers: that is, each extension is structured into the layers listed above.

See also: