I'll try to answer the question, though googleing on MVC would lead you to great explanations on Model of MVC.
In simplest of all forms, Model is nothing but the data that the application uses/process/stores in a persistent medium. The medium could be a simple text file, an RDBMS, or an LDAP server. I encountered this definition somewhere on the internet :
The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller)
From implementation point of view, I would have a typical DAO layer doing the work for me.
The Model (or MVC for that matter) is a loose term. It means different things to different people. HTTP ruined the original definition because the Model is supposed to be able to update the view.
I imagine this question came here because of Struts' boasting of MVC use. Struts DOES have some functionality that is common with MVC, but as for the Model, Struts has a square peg called ActionForms that people force into the round, "Model", hole. It might be more correct to say that Struts has VC architecture.
A good workman is known by his tools.
Joined: Jun 06, 2003
Originally posted by Marc Peabody: I imagine this question came here because of Struts' boasting of MVC use. Struts DOES have some functionality that is common with MVC, but as for the Model, Struts has a square peg called ActionForms that people force into the round, "Model", hole. It might be more correct to say that Struts has VC architecture.
Absolutely. In fact, the deprecation of the GenericDataSource from struts 1.1 release clearly gives us a lead. This is what the introductory page on struts home has to say about struts.
Struts provides its own Controller component and integrates with other technologies to provide the Model and the View. For the Model, Struts can interact with any standard data access technology, ...
Thanks and regards, Kinjal Sonpal [ May 29, 2004: Message edited by: Kinjal Sonpal ]