The goal of this article is to help you with understanding of Magento architecture and it’s file structure.

Magento has a great and complex architecture behind its system.

What is Magento architecture?

It the heart of the Magento engine is the perfect combination of Zend Framework architecture MVC (Model - View - Controller).

Zend Framework - is a framework that is implemented in PHP, and it is currently one of the most powerful and widely used coding languages, because of strong and unique features. Using Zend, you can quite easily expand the number of classes and integrate the various libraries in the configuration without conflicts.

Model - View - Controller - a software design pattern for implementing user interfaces. Design pattern is divided into three interconnected component for modification of one of them have minimal impact on the rest.

MVC parts:

Model: provides data classification and methods of work with them, after requests it reacts and changes.

View: requests information from the models and uses it to generate the output information presented to user.

Controller: can send commands and queries to the model to update its status (for example, when editing a document).

Magento architecture has added a lot more than the sub blocks above the MVC architecture to handle eCommerce system that can work with multiple websites and stores in the same back-end.

Views are divided into three parts. Templates are files with HTML code, usually stored as phtmls with PHP tags and do some basic loops and some JavaScript calls as our usual view will look like. Next is the block, which is a new in a concept of MVC. Blocks are used simply to reduce the load on the central controller and make the different processes in the module more independent. It is important nowadays, as many websites consists of several different blocks, and some blocks may be loaded with the help of AJAX and provide various services. Thus, the views have their own controllers to ask or request processed data from the model and provide a graphical representation of templates. Blocks keeps all the data and functions that can be called from the template.

But for what purpose the central controller was created if every species comes with its own controller, which can interact with models and assistants? Central controller is a place where are all controllers are collected together.

Layouts can be called only by the name of a central controller, so the central controller has a layout that defines the sub controller (block) and templates that it contains. The central controller together with helpers are provided a public service unit installed in the individual units while providing services in an e-mail.

Finally, the model contains a models and collections. The model works as a service that provides the functionality for various business computing and data processing, while the collection used to provide the functions to retrieve the data.