Michael,

Quick comments on your suggestion. Please don't mistake the brevity for
abruptness - just lack of time on my part.

I agree with pretty much everything Niall said in his previous reply, with
the following 2 cents-worth.

1. Big reason for not including this as a standard action is the use of '.x'
to identify the method name to dispatch to. The .x suffix has a particular
meaning in HTML (i.e. Image Button) and it would be incorrect/misleading to
subvert it for other uses that have nothing to do with image buttons.

2. I don't *want* to use '.x'. I don't like using DispatchAction much
because it pollutes my URLs. MappingDispatchAction let's me keep the URLs
nice and tidy at the expense of slightly more configuration in the config
file, but I'm OK with that trade-off.

3. The example code doesn't work for SimpleDispatchAction. You are not
passing the ActionMapping parameter to the getMethodName method, which
requires it. Could you update the wiki with the correct code?

If you're proposing this as an additional action that *some* people might
find useful, then that's great. But I think you were suggesting this as a
*replacement* for DispatchAction/LookupDispatchAction/MappingDispatchAction,
but it simply does not do what those actions already do and so could not
replace them. Also, I would not be happy with inclusion in Struts because of
the non-standard use of HTML.

regards,

Steve



-----Original Message-----
From: Michael McGrady [mailto:[EMAIL PROTECTED]
Sent: September 16, 2004 5:54 PM
To: Struts Developers List
Subject: Re: DispatchAction


Niall Pemberton wrote:

>You're making the assumption that everyone wants to do things the way you
>do - SimpleDispatchAction doesn't replace any of them if people don't.
>Personally (if I used them :-)) MappingDispatchAction looks good to me for
>most use cases or if I didn't want to specify anything in the
>struts-config.xml then have a custom DispatchAction that just always used
>"method" as the parameter name to find the method name from the request.
>
>Niall
>

I guess I am not communicating well at all.

I have no idea what people want to do and not only am I aware that
people are not very predictable but also that I have no desire to try to
get people to do anything whatsoever.   I can tell you that also having
been a Federal Public Defender I am really, really aware of the variety
of choices people will make.  ;-)

I just am saying that for my money a class that does exactly the same
thing as three other classes and is faster, lighter, and less coupled is
preferrable to me.  I also suspect it will be preferrable to others, if
that is right.  So, I assumed the only issue was whether it was better,
and not whether people liked things that were not better.

I would give people the dignity of arguing with them a bit about it, if
they disagree, in order to see what they are thinking.  I am not sure,
Niall, that you see what is happening in this case, given you previous
posts, but let me say that the logic in SimpleDispatchClass replaces the
logic in all these other cases and gives you more flexibility.  If you
prefer to have to code the struts-config.xml when you don't have to and
if you prefer to have heavier code in an underlying super class, and if
you prefer to have a situation where you cannot use a single solution to
all uses of buttons, then you won't want to use SmpleDispatchAction.
But, if you do like your code to be simple, lightweight, generic, and
fairly straightforward, you might try SmpleDispatchAction.

Do you see that you can do exactly the same thing with
SimpleDispatchAction as with MappingDispatchAction and without the heavy
load of DispatchAction?  Do you see also that you can do exactly the
same thing with SimpleDispatchAction as all three of these classes?
Heck, if you see all this and prefer to use those classes, I would be
surprised but would not be plussed.  (Is there a "plussed" to go with
"nonplussed"?)

The preceding sardonic presentation is meant to be a bit comical, but I
would be interested, Niall, in knowing why you would do what you say you
would, given what seems to be a pretty decided inferiority of the
classes you say you would use.  I may well be completely wrong in my
assessment and would welcome any critique you have to offer.  Maybe I
too should do what you suggest, but I cannot see it.

Laughin' and Lovin' inWashington,

Michael McGrady




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



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

Reply via email to