Architecture:MediaWiki/Pattern language
This page is under construction Please help review and edit this page. |
Classes in the MediaWiki code base use the pattern language outlined below. As per version 1.35, the pattern language is aspirational. That is, the patterns described here do not describe current reality, but are intended as a guide for creating new code and for improving existing code.
Patterns, in no specific order:
- entry point pattern
- wiring pattern (including hook handlers)
- view pattern
- cursor pattern (iterators, etc)
- batch pattern
- pager pattern
- input form pattern
- service object pattern
- handler pattern
- content handler pattern
- API module pattern
- action pattern
- special page pattern
- media handler pattern
- page pattern (page types?)
- provider pattern (vague, could be a factory)
- codec pattern (serializer/deserializer)
- command pattern (aka business action)
- validator pattern
- formatter pattern
- skin pattern
- renderer pattern
- localizer pattern
- builder pattern
- event pattern
- listener pattern
- job pattern
- data update pattern
- output aggregator pattern
- data object pattern
- record pattern (has ID)
- immutable value pattern
- active record anti-pattern
- content pattern (deprecate?)
- parser pattern (?)
- cache pattern
- writer pattern
- hook handler pattern
- client object pattern
- adapter pattern
- maintenance script pattern
Some patterns may be confined to technical layers, but others may be applicable on all layers. Some layers may have restrictions on what other patterns they can make use of.