Magento Tutorial: In order to gain more knowledge about Magento, there are a few distinctive approaches to see the Magento design. For instance, if one who needs to modify a current module or make new modules, need to understand the architecture design of a module, and how it fits into the bigger view, with the Magento structure and different components. But, if a trader who needs to rapidly build an online customer store needs to see the collection of components from a more elevated level, and need to know about the components that effect the look, feel, and client association components. The figure below demonstrate the architecture of the Magento with different layers.
Presentation Layer -
The presentation layer components can be modified utilizing the CSS, HTML and PHTML files, in order to customize the user interface. The user interaction with the product and the product view are controlled by the layer code.
One can specifically work with the Presentation Layer code by collaborating with the Magento web interface, the layer contains Controllers and the view components, such as, templates, layouts and blocks which are utilized to process the commands to and from the UI (User Interface).
Service Layer -
The layer act as the bridge between the model layer and the presentation layer and are implemented by utilizing the service contracts which are characterized utilizing the PHP interfaces. The layer contains the service contracts and are defined the behavior of the implementation. The layer provides the stable API for other modules to call into.
Domain layer -
The magento modules business logic layer is present in domain layer and does not contain any specific information about database and resource.
Persistence layer -
An active record pattern methodology is utilized by magento for persistence. Here in this layer the model object which contains a resource model maps an object for one or more database rows and is responsible for functions like updating, deleting, reading, creating and additional logics like data validation and database operations.