Help coderanch get a
new server
by contributing to the fundraiser
  • 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Need of Model in mvc

 
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry still am not clear . i already gone through d link which you given
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.)
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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/
 
reply
    Bookmark Topic Watch Topic
  • New Topic