Model view controller

I wanted to go back to the basics of a web project architecture, presenting you a very used design-pattern of sereval frameworks (Symfony, Zend, ...): The model view controller .

The Model

This is the data access layer, which allows us to interface with our DBMS (Database Management System).

In the classic frameworks, it is often used via Doctrine (ORM very powerful), which allows the mapping of data into object model ...

It is very convenient to use this kind of method to access data, ensure the durability and mobility of data.

The View

This is the layer that is used to display the data to the user.

In the MVC model, this one does not know its model associates ...

It is often generated by a template management system (like Smarty or Twig).

The Controller

It is the cornerstone of the application, it is the real conductor, which manages all the requests, the routes, access to the data and generation of the views.

Decomposed itself in several layers, it allows to integrate the business logic of our applications ...