What you call a "handler" I originally called "method" in my post which started this
thread. In any case, that's what I'd like to see - something like Niall's
"StandardAction" with cached Methods configured by a "handler" or "method" attrbute on
the action element. And as has been indicated, it would be an optional abstract Action
base class for those who prefer this approach. Because of that, a class name other
than "StandardAction" would be preferable - perhaps "SharedAction", "CommonAction",
"GroupedAction" or some such.
+1 :)
Donnie
>>> [EMAIL PROTECTED] 03/08/01 01:06PM >>>
For what its worth, I find Niall Pemberton's "StandardAction" to be a very
elegant solution to the common problem of locating an appropriate action
handler.
Since it addresses a common problem in building a web app. and follows
several other idioms at work within Struts, I believe this would make a very
nice "standard"[/"optional"?] extension to the Struts framework.
How do others feel about this?
One possible catch is the contract created between your actions path
attribute and your method names. To allow deployers to vary the public URL
of an action, would it make sense to add an optional "handler" attribute to
the action element? Default behaviour would then be to use the path
attribute, if no handler was specified.
Anyway.. that's my 2¢, regards,
Levi Cook
Greenbrier & Russel
Madison, Wisconsin
www.gr.com
[EMAIL PROTECTED]
-----Original Message-----
From: Richard Reich [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 10:27 AM
To: [EMAIL PROTECTED]
Cc: DONNIE HALE
Subject: Re: Minimizing Action class proliferation
----- Original Message -----
From: "DONNIE HALE" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 08, 2001 06:31
Subject: RE: Minimizing Action class proliferation
> It would be nice to do a standard implementation of this, with Craig's
blessing of course :), and add it to Struts to optionally be used by folks
who prefer this approach.
>
Yes, it would be nice. An abstract class that can be used or not.
Documented as such. Preferably with the introspection-reducing optimization
you mention.
-r