• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Any real life problems with MVC ?

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67645
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Simple solution for simple problem. You really don't need to kill an ant using your 12 gauge shotgun.
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic