When a user requests a page or a resource then the CAKEPHP request cycle starts. It can be explained with the below diagram:
Let's now discuss the request cycle diagram with steps:
1.The request is redirected to webroot/index.php based on the webserver rewrite rules.
2.The autoloader and bootstrap files of the applications gets executed.
3.Dispatch filters that are composed can handle the request,and then(optionally) originate a response.
4.Dispatcher then selects the convenient controller & action according to the routing rules defined.
5.The controllers action is then called and the controller only interacts with the required Models and Components.
6.The controller substitute the created response to the View for generating the output resulting from the model data.
7.The view (they are V in MVC)uses Helpers to generate the response of the client request .
8.The generated response is then sent back to the client.
Hope this help!!
0 Comment(s)