What is the Page-Controller pattern exactly?
Is the Page-Controller pattern (the refinement of the MVC pattern as described in the Enterprise Solution Patterns using Microsoft .开发者_如何学运维NET) basically the pattern of simple URI page requests (i.e. URI + form submission + query string); ASP's basically? Or is it something more complex.
Anyone?
http://msdn.microsoft.com/en-us/library/ff647095.aspx
Is Page-Controller pattern (the refinement of the MVC pattern) ?
Well to answer this first I would say that you are mixing two different category of patterns. Page-Controller is a software Design pattern and MVC is an Architectural Pattern.
See:Software Design vs. Software Architecture
Page Controller is not usually implemented with the MVC pattern infact ASP.NET MVC employs Front Controller ,(I think MVC can implement both controller patterns ,but we usually see the Front Controller implemented ,that's what MSDN article is discussing)
Rationale For MVC Architechural Pattern:
To ensure that the each part of the MVC are completely separated (Decoupled) from each other. Due to this factor it's easier to modify the presentation (Views) and Models.
Front Controller and Page Controller comes under the category of Application Controller a/c to martin Fowler.
Page Controller Design pattern:
An object that handles a request for a specific page or action on a Web site. Martin Fowler
In ASP.NET WebForms each logical page (*.aspx) is a Page Controller , and its the default behaviour of the page that it's posted back to itself and is handled by the code-behind (which is also the part of page),it basically combines the roles of Views and Controller.
WebForms generally serves request through URL (*.aspx) and ASP.NET MVC generally serves requests through URI.
See:
Page controller on PHPWact.org
Front controller on PHPWact.org
P.S: I must say the MSDN article you mentioned is some what confusing, stick with the Martin Fowler its simple and superb.
精彩评论