struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McGrady <m...@michaelmcgrady.com>
Subject Re: DispatchAction
Date Fri, 17 Sep 2004 00:54:03 GMT
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message