Front controller pattern
From CSSEMediaWiki
(Difference between revisions)
Martin Doms (Talk | contribs) (New page: Sequencediagram of the Front Controller pattern.In a Front Controller system a single class handles all incoming requests. The handler processes ...) |
Martin Doms (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | [[Image:FrontController.png|thumb|800 px| | + | [[Image:FrontController.png|thumb|800 px|Sequence diagram of the Front Controller pattern.]]In a Front Controller system a single class handles all incoming requests. The handler processes requests and delegates to a command hierarchy to carry out the action. The runtime behaviour of this class can be enhanced with decorators. |
Which command is instantiated and executed can be determined either statically (using conditional logic) or dynamically (using dynamic instantiation). Static instantiation has the benefit of compile-time error checking and flexibility in URL structure, while dynamic resolution allows the creation of new command types without changing the underlying handler class. | Which command is instantiated and executed can be determined either statically (using conditional logic) or dynamically (using dynamic instantiation). Static instantiation has the benefit of compile-time error checking and flexibility in URL structure, while dynamic resolution allows the creation of new command types without changing the underlying handler class. | ||
[[Image:FrontControllerClassDiagram.png]] | [[Image:FrontControllerClassDiagram.png]] |
Latest revision as of 02:30, 19 October 2010
In a Front Controller system a single class handles all incoming requests. The handler processes requests and delegates to a command hierarchy to carry out the action. The runtime behaviour of this class can be enhanced with decorators.Which command is instantiated and executed can be determined either statically (using conditional logic) or dynamically (using dynamic instantiation). Static instantiation has the benefit of compile-time error checking and flexibility in URL structure, while dynamic resolution allows the creation of new command types without changing the underlying handler class.