Does anyone know the difference when we should pick Front Controller as design pattern instead of MVC? Isn't MVC just an implementation of Front Controller?
Joined: Jul 20, 2005
There are two key differences that I am aware of, there may be more.
1) Front Controller is a central point where all requests go initially. MVC may use a single point for all request to go or they may not. The key point here is that the Front Controller mandates a single point MVC does not.
2) MVC mandates that the model, view and controller components are all distinct entities, ie view is a jsp, model is a javabean and controller is a servlet. Front Contoller does not, as far as the Front Controller goes the model and view components of a MVC pattern may be the same entity ie a jsp or servlet that also contains business logic.
Joined: Mar 27, 2004
Strictly speaking, MVC is more likely a "Architecture Pattern" and not a design patter. For instance, the whole idea of MVC comes from the use of other well know design patterns like Observer, Composite and Strategy.
MVC 2, which is an adpatation we use for the web environment is also based on this. Check out Sun's blueprints about MVC. However, it doesn't necessarily mean that you have to use a Front Controller as central piece of your Controller part. Note the MVC is just too much more than a single Front Controller pattern. It's got all the links among Model, View and Control. [ August 01, 2005: Message edited by: Leandro Melo ]