jQuery in Action, 3rd edition
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Diff btw Front Controller and MVC? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Diff btw Front Controller and MVC?" Watch "Diff btw Front Controller and MVC?" New topic

Diff btw Front Controller and MVC?

Jingh Yi
Ranch Hand

Joined: Mar 23, 2005
Posts: 90
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?

Mat Williams
Ranch Hand

Joined: Jul 20, 2005
Posts: 215

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.


Leandro Melo
Ranch Hand

Joined: Mar 27, 2004
Posts: 401
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 ]

Leandro Melo
SCJP 1.4, SCWCD 1.4
Jingh Yi
Ranch Hand

Joined: Mar 23, 2005
Posts: 90
Thanks, guys. good explanations.
I agree. Here's the link: http://aspose.com/file-tools
subject: Diff btw Front Controller and MVC?
It's not a secret anymore!