This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes MVC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "MVC " Watch "MVC " New topic
Author

MVC

Kartik Shah
Ranch Hand

Joined: Dec 07, 2000
Posts: 102
BluePrint chapter 11 Architecture of the sample application says
MVC reduces code duplication
Can anybody explain that ?


Kartik Shah
SCJP, SCDJWS, IBM Certified Websphere & XML, PMP & Six Sigma - http://blog.kartikshah.info
Rufus BugleWeed
Ranch Hand

Joined: Feb 22, 2002
Posts: 1551
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.
Samit Das
Greenhorn

Joined: Jun 17, 2002
Posts: 8
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MVC
 
Similar Threads
MVC - A PATTERN OR A FRAMEWORK?
WA #1.....word association
java
Design pattern question
jtable