Introduction to Jakarta Struts Framework
Subject:   Model in MVC
Date:   2001-09-18 08:48:44
From:   browns
A great introduction to Struts I thought, but just a small point. You say that the "Model objects are typically application specific since they are basically the business logic of the application" but this isn't really the whole truth.

It is true to a degree, but the model in MVC represents the data that the view displays. Ignoring the ActionForm objects (as they are a little strange!), the model in an MVC based webapp would typically be JavaBeans or EJBs representing the underlying persistent business data. The problem (IMHO) is the ActionForm objects as they almost represent just a subset of the persistent data, just enough to handle the request.

While the "Controller" Servlet is the controller in MVC, Struts uses "command" like objects (subclasses of Action) that represent the processing associated with handling a request - this is the business logic. I see it as an extension to the controller and not the model.

(the J2EE patterns summarises this nicely as the "Command and Controller implementation strategy")

All in all a great article though and I wish that I had it when I was learning about Struts! Keep up the good work! :-)


1 to 1 of 1
1 to 1 of 1