• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Front Controller vs MVC

 
Raef Kandeel
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?


 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Raef Kandeel
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This document should help you answer the SCWCD pattern questions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic