I recently was able to browse through your first few chapters available on the brainy software website and I was wondering whether you could answer the following question:
I had a look at your 3rd chapter and you described Action classes as being the model classes in Struts2(Hence this class will contain the business logic). But recently I came accross a website that described Actions rather as Controllers. So I am now confused. Could you please tell me whether Action classes act as the "Model" or the "Controller".
What about when I use Struts 2 with a Spring Business Facade, do Actions then change role from "Model" to "Controller"?
Thank you very much in advance for claryfiyng this topic for me.
I've heard people describing the action as part of the Controller. My guess is they view the action as a place where models are instantiated and business methods/delegates called. In this case, it is not inaccurate to regard the action as an extension of the controller.
On the other hand, in Struts 2 an action is often a POJO with properties that get assigned values and have methods that do more than validation. In this case, clearly it is a model.