Page Controller(Page Controller) andFront Controller(Front-end Controller) as the two web design methods have their own advantages and disadvantages.
Because the page controller is implemented by Asp.net by default, It is very convenient to use. Generally, the view on the page uses the. inc file to define the shared part. The page controller creates a controller for each page. If there are many pages, it may not be easy to maintain. Even if a public base class is used, the logic of the base class is too complex.
The Front Controller puts all the control in one controller, but it must be implemented by itself. If the logic of the base class is not complex, it is generally not used. Displays the processing of the controller.ProgramPart of the structure, whereHandlerClass is responsible for processing various Web requests, and will determine the correctCommandAssign this roleCommandfactoryClass. WhenCommandfactoryReturnCommandAfter the object,HandlerCallCommandOnExecuteMethod to execute the request