• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any real life problems with MVC ?

 
Celina Paul
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read a lot about MVC recently and was impressed to see how better the model is than the old Page 1 architecture.

But I did not find anywhere any real life issues mentioned with MVC.

What I would like to know is when implementing MVC, what should be avoided, etc.

Also, if there is any link explaining that, please let me know.
[ July 15, 2004: Message edited by: Celina Paul ]
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MVC can invite code bloat and overly complex solutions to simple problems if not used carefully.

Examples are small applications that are implemented on a framework like Struts that would have been maybe 1000 lines of code but because they use Struts explode to 10.000 lines or more.

It's basically the same as every pattern or technology: beware to not use it if not appropriate.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will somewhat disagree: I think it's always a good idea to apply good patterns to even simple problems.

But I agree that it must be done carefully. Applying a bloated framework like Struts to a simple web app is a bad idea (actually, I'm on record as asserting that applying a bloated framework like Struts to any app is a bad idea -- but that's another show).

It's quite possible to apply proper patterns without code bloat. Sure you might end up with a greater total line count than without, but that's far less important than a good organization and structure.
 
arnel nicolas
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple solution for simple problem. You really don't need to kill an ant using your 12 gauge shotgun.
 
Ken Robinson
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not think you can really go wrong with good MVC practices.

As with anything, get comfortable with the (MVC) concepts. Think of how you would do it and why it makes sense. THEN, not before, go and see what offerings there are. If you come to your own conclusions it will be much easier to evaluate API/Frameworks that are available.

Many available API/Frameworks will try to 'sell' themselves with a quick 'we offer MVC' explanation without really telling how they do it or why it's better than just good practice. Also, many people will all but dress in white robes with little armbands and tout how much they like framework A over framework B. Don't get caught up in that, it's such a waste of time in my opinion.
 
Rafa Moreno
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are moving from a model 1-2 to a MVC with struts, at first time I found hard to change the way of thinking but at the same time simpler for the processes.

I will stay with MVC even for the simplest projects if it's possible.

 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
I will somewhat disagree: I think it's always a good idea to apply good patterns to even simple problems.


I never said you shouldn't, just that the same patterns and pattern combinations aren't always correct for different sized applications.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic