On Wed, 1 Sep 2004 18:13:08 +0530, Jitesh Sinha <[EMAIL PROTECTED]> wrote:
> 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?
> 

While it's really simple to make an Action class reusable:

    Module A Struts Configuration File:

    <struts-config>
      ...
      <action path="/foo" className="com.mypackage.MyAction"/>
      ...
    </struts-config>

    Module B Struts Configuration File:

    <struts-config>
      ...
      <action path="/bar" className="com.mypackage.MyAction"/>
      ...
    </struts-config>

I would suggest that you consider the latter strategy that you
describe (abstract the common business logic into separate business
tier classes) instead.  Among other things, that makes it much easier
to adapt to the reality that, over time, use cases which started out
identical tend to diverge in the details.

> Thanks,
> -Jitesh

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to