Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Struts In Struts What is Model?

Related Tutorials


 
 

Share on Google+Share on Google+

In Struts What is Model?

Advertisement
This tutorial explains What is Model in Struts?

In Struts What is Model?

This tutorial explains you What is Model in Struts. Struts is MVC based application and it is separated into three integral parts, Model, View and Controller.

In MVC design pattern there are three kinds of components:

  • Model
  • View and
  • Controller

Struts is also based on the MVC design patter and Model plays important role in the framework. In any MVC framework model is the component responsible for the handling the data of the system. In MVC there is no requirement of containing the model itself, instead it contains the links to the one or more Models.

In Struts framework you can create the variables in Action to hold the data of the application. In the Action class itself you can call the methods of application service to retrieve and save the data into database.

Thus in Struts Action class plays an important role of managing the data (Model) of the application. So, its advisable to create the intelligent code in your action class and don't write the JDBC code in Action class. You should always use the Service classes to access the database.

Struts Framework Tutorials:

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: January 14, 2013

Related Tutorials

Discuss: In Struts What is Model?  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com