Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why MVC?

 
jayram
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
In my company we are having a very interesting discussion. Its mostly centered around why MVC?
The application is extremely dynamic. The end user can change fields and layouts. He can define his own fields. The application itself will have several such setups running parallely. Thus depending on a users setting Form A will have 10 fields but another user belonging to other organization can have 8 or 10 fields on the same Form.It has a very flexible and extensive privileges system.
The first approach suggested is to keep all the logic in database. The database holds information about page layouts,about security privileges,report layouts and so on. All the processing logic is in stored procedures. All pages come from database.JSP/Beans only execute calls to database.
The second approach is of using a more object oriented approach ..maybe going for MVC architecture maybe using struts etc.
The present perception with first approach is that it will be highly customizable and will require considerably less development effort
I would like to know what will be the pros and cons of both approaches based on various points like reusability,performance,scalability and so on. The application would be sold as a "product". So it will be enhanced frequently.
Please give me inputs on what approach should be taken. Why do people put such a heavy emphasis on MVC?
TAI
Cheers
Jayram
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18020
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MVC is itself an object-oriented approach. By keeping the display stuff separated from the data stuff gluing them together with a controller it's easier to keep code portable, reusable and maintainable.
Although in JSP we tend to think of MVC only at the page level, in Smalltalk, where the term first gained parlance, it was not uncommon to do MVC at the control group or individual control level as well. Some implementations called this Model/Pane/Dispatcher.
Thus, your database could be contain a toolbox where you select a model, a view, and a controller and store their relationship and this would give you the best of both approaches.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic