Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • CakePHP Request Cycle in v3

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 150
    Comment on it

    Welcome to FindNerd.

    Today our discussion is based on cakePHP request cycle. In our previous blog We have described  the different layers in CakePHP. Click here to check this blog. After checking that blog you will get the clear idea of layers in CakePHP. Now we start our discussion based on CakePHP request cycle.

    CakePHP  Request Cycle in v3

     

    When user requests a page or resource in an application then CakePHP request cycle starts. It follows some steps to reach the top. In request handling, rewrite rules play a great role to direct the request. Kindly check the request cycle in below image.

                                  Fig: CakePHP Request Cycle

                    image source: book.cakephp.org/3.0/en/intro.html#request-cycle

     

    A) You can see in the top rectangle block index.php. Request is directed by Rewrites rules to  webroot/index.php

    B) After that check the next block that is saying autoload and bootstrap. It is time to load the autoload and bootstrap files by the application.

    C) Check next block that is saying dispatch filters and routing. Configured dispatched filters will execute and generate the output.

    D) According to routing rules, any dispatch filter will select the controller and view.

    E) Model deals with behavior if assigned , view deals with cells and helpers and controller deals with components.

    F) Now it is time to call the view and controller will interact with the assigned components as well as models.

    G) At this point Controller will assign the task to view to generate output as per assigned model.

    H) View will use the cells and helper to generate the output in the form of header and body.

    I)  In the end, response will be sent to end user.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: