• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Model objects

 
Tarun Oohri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1744
19
Chrome Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
Muhammad Khojaye
Ranch Hand
Posts: 449
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure about that but yes there is Object Model.
 
Tarun Oohri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Muhammad Khojaye wrote:Not sure about that but yes there is Object Model.

Thanks everybody for your feeds. Cheers!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic