Overview Of Front Controller Design Pattern

In this Article we will Learn About Front controller Design Pattern.Front controller is Part of Presentation Tier Design Patterns.

In this article we will learn about front controller design pattern. Front controller is part of Presentation Tier design patterns.

The Presentation Tier request handling mechanism must control and coordinate the process each user requests, and such a control process might be in either a centralized or decentralized manner.

The system requires a centralized access point for Presentation Tier request handling to support the integration of system services, content retrieval and view management and navigation. When the user accesses the view directly and view is going through a centralized process two problems occur:

  1. Each view is required to provide its own system services which often results in duplicate code.
  2. View navigation is left to views which makes the system difficult to understand.

To solve this problem

Use a controller as the initial point of contact for handling a request.The controller manages to provide system service like security, authentication and authorization before delegating business processing, managing the choice of appropriate view, and handling errors.

The main advantage of going for a Front controller is reducing the amount of code that has to be duplicated across various views as part of the application. Typically a controller coordinates with the dispatcher component. Dispatchers are responsible for view management and navigation.

 

Summary

In this article we have learned the basics about front controller design patterns.