On Tue, 12 Aug 2003, Joe Germuska wrote:

> Date: Tue, 12 Aug 2003 15:06:59 -0500
> From: Joe Germuska <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: Struts Developers List <[EMAIL PROTECTED]>
> Subject: Re: ActionForwards, et al (was SuccessAction)
>
> At 12:48 -0700 8/12/03, David Graham wrote:
> >The main goal of an ActionContext being passed to Action.execute() methods
> >would be to separate Actions from the Servlet API so that you could write
> >Actions to respond to Porlets.  It would also serve to stabalize the
> >execute() method's interface and allow you to pass in more than the
> >current 4 or 5 parameters.
>
> It seems that another gain of an ActionContext interface would be
> simplifying the steps in RequestProcessor towards an ability to chain
> arbitrary processors.  However, would we need to do anything to
> compensate for losing some of the clarity of definitive signatures?
>
> My hunch is that you deal with that in the documentation, and leave
> it up to the user to chain things in a sane order, but maybe that's
> too risky?

One of the potential problems in a Context-based environment is knowing
which keys you are using to store and retrieve stuff -- obviously, the
producer and consumer of a piece of data need to agree.  It is also
important that people looking at a Command should be able to determine
what attributes will be used for what by this particular Command.

The convention of exposing the keys that you're using seems quite helpful
in this regard, for at least two reasons:

* It's automatically configurable in case you want to
  reuse the Command implementation in a different way.

* The fact that a "fooKey" property exists is automatically
  documentation that your Command is going to utilize
  a particular attribute for some purpose.

Craig

>
> Joe
>
>

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

Reply via email to