struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rosenberg, Leon" <>
Subject AW: Action Class Reusable
Date Wed, 01 Sep 2004 13:20:32 GMT
If you want to use MVC (and so struts) the "proper" and "modern" way, 
each of your action classes should exactly match one "use case". 

If you share same use cases across different "modules" (what ever you call modules) those
actions would be automatically reusable.

Using _one_ action for a complete module is not truly MVC, so if 
your actions (or at least your redefinition of the execute method) has more then 10 lines
of code you should seriously rethink your design.

For grouping actions you can use the dispatcher action, or (better) action hierarchy. 


> -----Urspr√ľngliche Nachricht-----
> Von: Jitesh Sinha []
> Gesendet: Mittwoch, 1. September 2004 14:43
> An: Struts Users Mailing List
> Betreff: Action Class Reusable
> Hi All,
> Is there a way we can make our Action Classes reusable across different
> modules?
> Generally we have one Action class for every module.Maybe,if we put our
> business logic in different business classes (particular to a module) and
> make these business classes implement a common interface?
> I have only a vague idea till now about this.Can someone elaborate?
> Thanks,
> -Jitesh
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message