File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Model objects" Watch "Model objects" New topic

Model objects

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 170
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
Ranch Hand

Joined: Dec 16, 2010
Posts: 633

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.

"There is no reason for any individual to have a computer in his home" ~ Ken Olson, Co-founder of DEC, 1977
Muhammad Khojaye
Ranch Hand

Joined: Apr 12, 2009
Posts: 449

Not sure about that but yes there is Object Model.
Tarun Oohri
Ranch Hand

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

Thanks everybody for your feeds. Cheers!!!
I agree. Here's the link:
subject: Model objects
Similar Threads
is it necessary that method of Controller Class of Spring should return a Model and View Object?
how to transfer Session object from jsp page to model class?
Building Class diagrams
Deserialize JSON to Java class