Design Pattern - Front Controller

 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. 
In ActionServlet in Struts 1 or Dispatchers in Struts 2. Both of them are implementations of Front controller design pattern. The Front Controller design pattern is applicable and useful for all kind of applications be it web or desktop applications and is not limited to any single programming language or framework.

Several web-tier application frameworks implement the Front Controller pattern, among them:MVC frameworks (Struts and Spring),.Front controllers can be reduce duplication of code in JSP pages, see in below diagram, determining the user view with a from controller.


1 comment:

Unknown said...

Thanks,Simple & Clear .. Nice one blogs .