1. The world of the Little Wolf: a brief talk on implementing mvc:http://www.cnblogs.com/cocowool/archive/2009/09/08/1562874.html with PHP
The definition and interpretation of MVC can be said to be varied. We can find a more detailed explanation in the wiki or [2], where I'm not going to, and I don't have the ability to do in-depth explanations, from the perspective of PHP development, MVC can be summed up as:
Views (the View):
When it comes to views, many of us will think of template engines (such as smarty, etc.). In fact, there are all kinds of output, such as HTML templates and JavaScript files.
Module (the model)
The module represents the logic of the program, which is often referred to as the business Logic layer in enterprise applications. In general, the work done in this layer is to take the raw data into a meaningful sequence of sequences stored in the data structure we designed, and give it to the view for processing. Typically, a data abstraction class is used in the module to handle data manipulation.
The model usually contains functions that are used to deal with the database.
Controllers (the Controller)
The controller makes the first stop for all Web applications, he accepts the received parameters, such as the $_get variable, and then responds accordingly.
Collect blog posts about PHP