• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

MVC

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
BluePrint chapter 11 Architecture of the sample application says
MVC reduces code duplication
Can anybody explain that ?
 
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I worked on a project where there was an
application client and a web client. Both clients
could have shared the same model, pretty much.
But we both had our own.
Every time we had an upgrade the model, it was
twice as much coding, testing and bugs.
We added a third client, a flat file loading
system, more pain.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MVC reduces code duplication
Model takes care of business logic
View is responsible for the UI presentation only
(no business logic)
Controller is responsible for controlling, authentication, authorization, logging stuff.
Thus imagine app(s) where u are using the same sort of business logic, model parts are potential candidate for reuse. Similary u do have similiar type of UI in different app. Potential reuse of UI also. This across apps.
Now in a single app, consider u want to have the UI of ur app changed keeping biz logic the same. Just change UI ie. View implementation (although using templating/tiles u could reuse view layer too in this case). But business logic and Controller stuff are intact. Similarly some biz process change has occured, u do not have to have again a full-fledged development cycle and integration of view/biz/controller. U r just to have reqd changes in biz layer.
Actually decoupling parts of application is the trick of reusing to the extent u like.
Hope it hepls.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic