wood burning stoves 2.0*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Need of Model in mvc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Need of Model in mvc" Watch "Need of Model in mvc" New topic
Author

Need of Model in mvc

Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
I need clear explanation of mvc design pattern. What i read in google is " controller: which is responsible for
access the client request and process the request then send response back to client. view : means presentation
logic normally html and jsp. Model is manipulate data. which means which contains code to store and retrieve
data from database or any thing else. Need clear usage of model in mvc pattern
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

A "user" class might be a model.

Wikipedia MVC entry
Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
sorry still am not clear . i already gone through d link which you given
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Moving to a more appropriate forum.

I don't know what I can say that will make it more clear: the model is whatever you're doing stuff to: a user, a library book, and so on. Note that the Struts version of MVC is a somewhat weaker version of what *real* MVC is: in the web world most people view the model as just that--a DTO. In a real MVC app, like the article says, the model can tell views it has changed, and so on.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
The Model application in a Model-View-Controller implementation executes business logic. It does not execute presentation logic which is part of the View. And it does not execute Controller logic which is in the Controller.

The Model application consists of business objects AND the logic that executes with these objects (aka business logic.)
Jianping Wang
Ranch Hand

Joined: May 29, 2010
Posts: 60
Read this official article and you will get a clear idea. Better try the example.
http://java.sun.com/developer/technicalArticles/javase/mvc/



SCJP 6 with 93%
Oracle Database SQL Expert with 98%
 
GeeCON Prague 2014
 
subject: Need of Model in mvc