Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Front Controller Design Pattern and MVC Design Pattern

In my application all the request are first directed to generic controller servlet and then more specific controllers are being called. We are also using POJOs and JSP as the Model and View respectively. So should i call this front controller or an MVC design pattern.

like image 506
JManish Avatar asked Mar 29 '16 12:03

JManish


1 Answers

MVC is a general pattern. The idea is to separate three aspects (Model, View and Control) of an application from each other. Now, this idea can be realized in different ways according to specifics of a situation/application. One way is to have many controllers, each responding to an action or a set of actions. Another way is to have one main controller which receives all actions and then dispatches them to different controllers, this one is called Front Controller Patter. So, Front Controller pattern is an MVC Pattern. For example, Spring Framework uses the Front Controller pattern to realize MVC.

like image 170
Nazar Merza Avatar answered Sep 18 '22 11:09

Nazar Merza