wood burning stoves 2.0*
The moose likes Java in General and the fly likes Model objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Model objects" Watch "Model objects" New topic
Author

Model objects

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 172
Hello Everyone!!!
In many occasions i come a term "model object" . What are these model objects ?
Are they objects of a POJO class ?
Are they objects of a Bean class ?
What are they actually used for ?
Thanks in Advance!!!
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 828
    
  13

The model objects are where the business logic lives. That's where the data is processed. In the MVC model, the View is your JSP page. No logic, just presentation. The Controller is a servlet (or servlets) which act as the "traffic cop". It gets the request from the client and decides what needs to be done with it. So it will invoke DAOs to retrieve data, and Model objects to do something with that data before it's finally returned to the View layer for presentation. Personally, I consider DAOs and DTOs to be part of the Model layer even though they are generally limited to fetching data and not doing a lot of processing on it. I usually have the servlet pass the DTOs to Model layer classes for additional processing when needed, if for instance, financial calculations need to be performed, or graphs need to generated, or new database records need to be constructed.



"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
Muhammad Khojaye
Ranch Hand

Joined: Apr 12, 2009
Posts: 449

Not sure about that but yes there is Object Model.


http://muhammadkhojaye.blogspot.com/
Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 172
Muhammad Khojaye wrote:Not sure about that but yes there is Object Model.

Thanks everybody for your feeds. Cheers!!!
 
Don't get me started about those stupid light bulbs.
 
subject: Model objects
 
Similar Threads
Deserialize JSON to Java class
Building Class diagrams
nitin_321
how to transfer Session object from jsp page to model class?
is it necessary that method of Controller Class of Spring should return a Model and View Object?