Symfony enables the implementation of the Model View Controller approach (MVC). This architecture pattern divides applications into three areas
- Data and core functionality (model),
- Visual presentation of generated data (view)
- Processing user inputs (controller).
The MVC concept provides a clear, well-structured program code and a high degree of flexibility for different components, which can be exchanged and reused depending on the concept, since they are not tied to concrete input data. At this point, however, it needs to be said that Symfony does not belong to the proclaimed line up of MVC frameworks and does not contain an integrated model component. If you create a new Symfony project, the typical model folder will also be lacking. Using additional ORM (Object Relational Mapper) libraries, such as the Doctrine, recommended by SensioLabs, or Propel, you can implement object storage in database systems yourself.
To create the presentation layer (view) of your web application, use the template module and create corresponding templates, which can be expanded using the so-called helper (PHP objects) and specific functions. The controller level is named index.php (can be found in the 'web' folder). The user inputs are named 'actions' in Symfony, just like they are in many other frameworks as well.