Design Pattern Front Controller Pattern - Design Patterns

What is Design Pattern Front Controller Pattern?

The front controller design pattern is use to provide a centralized request handling instrument so that all requirements will be handled by a single handler. This handler can do the verification/ authorization/ logging or tracking of application and then pass the requests to corresponding handlers. Follow are the entity of this type of design pattern.

  • Front Controller - Single handler for all kinds of requests coming to the application (either web based/ desktop based).
  • Dispatcher - Front Controller may use a dispatcher object which can dispatch the request to corresponding specific handler.
  • View - Views are the object for which the requests are made.


We are going to produce a Front Controller and recipient to act as Front Controller and Dispatcher correspondingly. Home vision and StudentViewrepresent various views for which desires can come to front controller.

FrontControllerPatternDemo, our demo class, will use Front Controller to express Front Controller Design Pattern.

Step 1

Create Views.

Step 2

Create Dispatcher.

Step 3

Create Front Controller

Step 4

Use the Front Controller to show Front Controller Design Pattern.

Step 5

Verify the output.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Design Patterns Topics