Comment at the bottom of this message...
----- Original Message ----- 
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 12, 2003 6:13 PM
Subject: RE: ActionForwards, et al (was SuccessAction)


> On Tue, 12 Aug 2003, Mainguy, Mike wrote:
>
> > Date: Tue, 12 Aug 2003 18:03:14 -0400
> > From: "Mainguy, Mike" <[EMAIL PROTECTED]>
> > Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> > To: 'Struts Developers List' <[EMAIL PROTECTED]>
> > Subject: RE: ActionForwards, et al (was SuccessAction)
> >
> > This conversation seems to be a by-product of looking at the Action
classes
> > as children of the servlet and consumers of messages instead of
stand-alone
> > entities.
> > One intriguing way of dealing with this (IMHO) would be to consider
elements
> > as being able to "Pull" the required components out of some other area
> > (Context?) (much like how the Turbine framework does).  Instead of
Chaining
> > commands or passing a context to every execute(), you would make
available a
> > generic application infrastructure that you could pull your required
> > components from.
> > Really this is probably just a semantic difference as the implementation
(in
> > my mind) would probably be much the same, but, to me when you word it as
> > something 'Pulling' something out of the Context it makes more sense
(errr,
> > I can visualize it better at least) than trying to guess what should be
> > 'Passed' along.
> > Comments?
> >
>
> Doesn't "pulling" something from some application infrastructure imply
> that somebody else "pushed" it into that infrastructure?  For example, if
> you expect to find the HttpServletRequest object in there, presumably the
> controller must have seeded that content.  It's also perfectly reasonable
> for one Command in a Chain (in commons-sandbox/chain terms) to push
> something into the Context that another Command executed later will need.
>
> In terms of making the infrastructure available to callers, it's pretty
> clear how passing a context object around makes the infrastructure
> available to anyone who needs it.  Are there other options for how you'd
> make the infrastructure available without passing it?  I haven't thought
> of any.

Sorry if this was already said, but couldn't you use JNDI if you wanted to
use a "pull" approach?  I'm not sure if that's a good idea or not, but I
thought I would throw it out there.

Matt


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

Reply via email to