Meaningless Drivel is fun!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Front Controller vs 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 "Front Controller vs MVC" Watch "Front Controller vs MVC" New topic
Author

Front Controller vs MVC

Raef Kandeel
Ranch Hand

Joined: Aug 05, 2007
Posts: 87
Hi There,

The more I think about it, I tend to believe more and more that MVC pattern is exactly the same as Front Controller, only the Front Controller is better.

This is simply because the Front Controller has a more powerful controlling mechanism and the programmer's focus is on the M and V part.

And I think the MVC model is dying for Struts and JSF.

Question is: if I have an exam question, that has both the options of MVC and Front Controller, I wouldn't ever really now, why would I pick MVC.

Can somebody help me out?



SCJP, SCWCD
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

They complement each other. Look at Spring. It uses a Front Controller called DispatcherServlet, to delegate the requests to the appropriate MVC controller of the framework.

And I think the MVC model is dying for Struts and JSF.

Are you saying that Struts is not an MVC framework ?


[My Blog]
All roads lead to JavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

There's no "versus". A Front Controller can be an important part of an MVC-patterned application. That's like saying "eggs" is better than "breakfast".

You might want read this article


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Raef Kandeel
Ranch Hand

Joined: Aug 05, 2007
Posts: 87
OK, so basically if I receive a question on the exam that concentrates on navigation, I should pick Front Controller, and if I receive a question that concentrates on separation of presentation and view layer, I should pick MVC. Is that so? Using the eggs and the breakfast example:-

What should one have in the morning?

1) eggs
2) breakfast
3) dinner
4) lunch

The answer would be: 2 - breakfast

What should one have for breakfast?

1) breakfast
2) eggs
3) meet
4) fish

The answer would be: 2 - eggs

Is that right?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

This document should help you answer the SCWCD pattern questions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Front Controller vs MVC
 
Similar Threads
design patterns
Design Pattern doubt.
Design Pattern Question
doubt in design patterns
Design Pattern at Struts