Model-View-Controller/hu
From Joomla! Documentation
Joomla makes extensive use of the Model-View-Controller design pattern.
When Joomla is started to process a request from a user, such as a GET for a particular page, or a POST containing form data, one of the first things that Joomla does is to analyse the URL to determine which component will be responsible for processing the request, and hand control over to that component.
If the component has been designed according to the MVC pattern, it will pass control to the controller. The controller is responsible for analysing the request and determining which model(s) will be needed to satisfy the request, and which view should be used to return the results back to the user.
The model encapsulates the data used by the component. In most cases this data will come from a database, either the Joomla database, or some external database, but it is also possible for the model to obtain data from other sources, such as via a web services API running on another server. The model is also responsible for updating the database where appropriate. The purpose of the model is to isolate the controller and view from the details of how data is obtained or amended.
The view is responsible for generating the output that gets sent to the browser by the component. It calls on the model for any information it needs and formats it appropriately. For example, a list of data items pulled from the model could be wrapped into an HTML table by the view.
Since Joomla is designed to be highly modular, the output from the component is generally only part of the complete web page that the user will ultimately see. Once the view has generated the output, the component hands control back to the Joomla framework which then loads and executes the template. The template combines the output from the component, and any modules that are active on the current page, so that it can be delivered to the browser as a single page.
A webdizájnerek számára további erőt és rugalmasságot biztosítva, akik esetleg csak az új dizájnok létrehozásával foglalkoznak, nem pedig az alájuk tartozó kód manipulálásával, a Joomla a hagyományos nézetet külön nézetre és elrendezésre bontja. A nézet adatokat húz a modelltől, mint egy hagyományos MVC mintázatban, de egyszerűen elérhetővé teszi azokat az elrendezés számára, amely felelős az adatok formázásáért a felhasználó számára történő megjelenítéshez. Ennek a felosztásnak az előnye, hogy a Joomla sablonszóró rendszere egy egyszerű mechanizmust biztosít az elrendezések felülírására a sablonban. Ezek a felülírások (amelyeket gyakran "sablonfelülírásoknak" neveznek, mert a sablon részeként alkotják, bár valójában az elrendezés van felülírva) a sablonnal együtt vannak csomagolva, és teljes kontrollt adnak a sablon tervezőjének a Joomla magjának minden kimenetele és minden telepített harmadik fél kiterjesztés felett, amelyek megfelelnek az MVC tervezési mintázatnak.