----- Original Message ----- 
From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
Sent: Wednesday, March 16, 2005 1:52 AM


> I was one of the proponents of POJOs as Actions a week or so ago, but
> upon further reflection I have to ask the question... what does this
> really get anyone?  I'm not really sure I see the benefit to it any
> more.  In fact, it would seem that keeping Actions as Actions makes it a
> little safer in that you can be sure the class being called is actually
> an Action.

I think we should make Struts as flexible as possible so that its simple to
develop "a la Carte" Commands that can be plugged in to replace the default
behaviour. What about an implementation where you have a POJO that replaces
the ActionForm and Action? You get a new instance every time so its thread
safe, it gets populated with the form data and then *some" method on that
POJO gets executed. Whether this is a good idea or not, why put any more
constraints than necessary. IMO the only point we need to know its actually
an Action (or Command) is when the method is being invoked. Before that -
configuring, creating, storing in the Context it could be any object type.

> Also, it seems odd to be talking about Actions *or* Commands (or
> POJOs)... Making them Commands makes some sense to me, but it feels
> wrong to allow both.  I would personally say one or the other, with a
> lean towards Commands.

For the deafult behaviour, it would be simple to cater for both, without
having to wrap anything.

> Now, that of course raises compatibility issues, so talking about
> something like an ActionCommandWrapper that presents an Action like a
> Command makes sense to me.



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

Reply via email to