CakePHP follows the MVC software design pattern. MVC Programming pattern will separate the application into three parts:
- Model layer
- View layer
- Controller layer
The Model layer
In order to work with MVC its very important to note that there must be no interaction between models and views.All the logic will be handled by controllers.
It’s responsible for fetching data and then after converting them into meaningful concepts for the application by processing,validating, associating or other similar tasks related to handling data.
The View layer
A presentation of the modeled data will be rendered by the View.View will produce the presentational interface for your application using the information it has available.
For example, A set of data returned by the Model layer, will be used by the view to render a HTML page containing it.The View layer is not only used for HTML or text representation of the data,but also used to deliver a wide variety of formats.Like videos, music, documents and other format.
The Controller layer
They wait for petitions from clients, and then checks their validity according to the rules of authentication or authorization, processing to the model, and selects only the correct type of presentational data which are expected by the client ,to finally delegate this rendering process to the View layer.
Recommended article : How to Install CakePHP on localhost WAMP