Use the Front Controller pattern to gather common, often redundant, request processing code into a single component. This allows the application controller to be more cohesive and less complex.
Front Controller features
Centralizes a web app’s initial request handling tasks in a single component.
Using the Front Controller with other patterns can provide loose coupling by making presentation tier dispatching declarative.
A drawback of Front Controller (on its own, without Struts) is that it’s very barebones compared to Struts. To create a reasonable application from scratch using the Front Controller pattern, you would end up rewriting many of the features already found in Struts.
Front Controller principles
The Front Controller is based on:
separation of concerns
Increases cohesion in application controller components.
Decreases the overall complexity of the application.
Increases the maintainability of the infrastructure code.
With Safari, you learn the way you learn best. Get unlimited access to videos, live online training,
learning paths, books, interactive tutorials, and more.