The idea of writing a frame with PHP to implement the MVC mode has been time, of course, in the previous period, how many writes written in the previous period, realize the original model of FrontControl, Controler, Model, because of their personal writing Relationship, the definition of several classes of the entire framework is always changed, and new problems always appear, and the implementation of the implementation has been changing, so it is decided to write down, perhaps it is a good reference. The MVC will show, data separation is an effective means of data, which is also the original intention of MVC. The implementation of FrontControlr is not difficult. It is responsible for arbitration HTTP requests, calling the corresponding Controler, I don't use XML like Struts to implement a FrontController, but use classes, I can inherit the original FrontControler class, overload AdjustAction2Node ( The method is added to the method to add your own action-> controler mapping. The implementation of Controler is not difficult, and there are not many functions. It is mainly to encapsulate the data requested by the HTTP to a class, select the corresponding model and pass the parameter object to the model and define the result to the map. Here I also used the same class inheritance technology like FrontControl. MODEL's implementation I use the AbstractNode class and its two subclasses: BaseNode and Nodebox, using a design pattern, the Composite mode, NodeBox can contain a plurality of BaseNode, and also as a BaseNode, by another NodeBox contain. Such design objects are to maximize reuse. Finally, Pagemaker, this is the name that is just taken, and I want to change its name to Page. Later I think it is more reasonable. PageMaker Select the corresponding HTML template, then insert Exarea into the HTML template, here there is to mention the concept of Exarea, I call it to interactively, because in a web page, I really need to interact or say that PageMaker is really concerned. Is Exarea, not a whole page, such as a landing page, web programmer only cares about the FORM of the username and password, not all. In this way, the design of the entire page can be detached completely and Exarea, which may be a little help to faster Web application development. In addition, it is supported by Session. I chose to encapsulate with the Session class. The specific object creates and reads through the static method of the Session class. It seems that this is called Factroy mode, but it is not, I don't know this mode. Because I have a little resistance to java, huh, huh. The programmer inherits the sessionsData class, plus the variables needed, I chose the database as the access to the session object, this is not difficult, I can completely leave the SESSION mechanism built by the PHP, I used to write a library before, At that time, I feel that this word using Thread is more reflected in the stateful HTTP session, but today I still chose to use session.