wood burning stoves 2.0
The moose likes Servlets and the fly likes Any real life problems with MVC ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Any real life problems with MVC ?" Watch "Any real life problems with MVC ?" New topic

Any real life problems with MVC ?

Celina Paul

Joined: Nov 01, 2003
Posts: 16
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

Joined: Oct 12, 2000
Posts: 5093
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

Joined: Jan 10, 2002
Posts: 61998

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.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
arnel nicolas
Ranch Hand

Joined: Dec 16, 2003
Posts: 149
Simple solution for simple problem. You really don't need to kill an ant using your 12 gauge shotgun.
Ken Robinson
Ranch Hand

Joined: Dec 23, 2003
Posts: 101
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.
Dimitris Zavaliadis

Joined: Jul 19, 2004
Posts: 5
Hi Celina Paul

Here are some links that you might find useful:







Hope this helps
Rafa Moreno
Ranch Hand

Joined: Nov 19, 2002
Posts: 53
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

Joined: Oct 12, 2000
Posts: 5093
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: Any real life problems with MVC ?