struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rosenberg, Leon" <Leon.Rosenb...@friendscout24.de>
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. 

Regards
Leon

> -----Urspr√ľngliche Nachricht-----
> Von: Jitesh Sinha [mailto:jsinha@cisco.com]
> 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message