|
|
Front Controller
|
Define
Front controller pattern
|
Using a single component to
process application requests.
|
Where
to use & benefits
|
JSP or Servlet.
Design request handling component.
Channel all requests through a single controller.
Centralize request processing and view selection.
Reduce business logic in a view
Improve manageability of security
Promote code reuse across requests
Avoid code duplication
Related patterns include
- Command combined with multiple requests.
- Intercepting Filter both centralize control of certain
types of request processing.
- Page Controller -- an alternative way.
|
Example
front controller pattern
|
Design a servlet to deal with
all the requests. (Just like struts controller)
|
|
|