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
An object that handles a request for a specific page or action on a Web site.
The front controller design pattern is used to provide a centralized request handling mechanism so that all requests will be handled by a single handler. This handler can do the authentication/ authorization/ logging or tracking of request and then pass the requests to corresponding handlers.
The front controller design pattern means that all requests that come for a resource in an application will be handled by a single handler and then dispatched to the appropriate handler for that type of request. The front controller may use other helpers to achieve the dispatching mechanism.
Front controller handles all the requests to the web application. This implementation of centralized control that avoids using multiple controllers is desirable for enforcing application-wide policies such as users tracking and security.
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)
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With