1. The first step is the bootstrap Process, which initializes the resources used in the program.
2. Create a Zend_Controller_Front object to implement the front controller mode. This entity class is responsible for sending http requests to the action of the appropriate controller.
3. The Front controller creates two objects to encapsulate http requests and http replies: Zend_Controller_Request_Http and Zend_Controller_Response_Http.
4. The Front controller creates two objects for url seeking and dispatch, routing and dispatcher, and finds the controllers and actions that the specified url should execute, and load the corresponding program file and execute the corresponding method.
5. Through the controller's plugin mechanism, Zend_Controller_Action_ViewRenderer creates a view attribute for the controller's object class. This view is a Zend_View object. It is also responsible for rendering the corresponding template file render to the http response object after the controller action request is processed. Finally, the content of the response object is output to the browser by the Front Controller.
6. in step 5, although the template file is located by the ViewRender assistant object, it is executed by a member function of Zend_VIew (include this template file ), therefore, all attributes and member functions of the view object in the Controller attributes can be used in the template file.
The lifecycle of an http request ends and the browser obtains the content. When the controller action specifies the variable to be presented to the view, it usually interacts with the database through Zend_Db_Table to obtain data.
Interactive Data Processing with databases is called business logic. The template file also contains simple loop logic, which is called display logic.
In MVC implementation, Model is responsible for processing business logic, View is responsible for processing display logic, and Controller is responsible for coordinating these two parts, so that the Controller code should be as concise as possible, it only exists as an agent.