Actions part of Controller or Model?
[Struts] developers have a differing opinion on whether the Action class is part of the controller or the model. The argument for it being part of the controller is that it isnt part of the real business logic. If Struts were replaced with an alternative framework, chances are the Action class would be replaced with something else. Therefore, it really isnt part of the model domain, but rather tightly coupled to the Struts controller. It doesnt make sense to put business logic into the Action, since other types of clients cant easily reuse it. From Chapter 3 in the Server Side's Jakarta Struts Book Review ProjectIn the alternative framework WebWork, the action classes could be considered to be part of the model because they include no presentation specific code (i.e. no Servlet API calls). Some would argue that this is better and allows re-use of actions, but I think it is just different. For Roller, the WebWork approach really does not buy me much - my 'business logic' is already re-usable and encapsulated in my model interfaces and classes.
Dave Johnson
in Roller
• 🕒 03:37AM Jul 10, 2002
Tags:
Roller