• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need of Model in mvc

 
Rajendra Prakash
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A "user" class might be a model.

Wikipedia MVC entry
 
Rajendra Prakash
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry still am not clear . i already gone through d link which you given
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this official article and you will get a clear idea. Better try the example.
http://java.sun.com/developer/technicalArticles/javase/mvc/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic