That could be a good compromise.
A base action, that has 20% of code that is used by 80% of actions that extend it.
(I am sure this suggestion is not needed: just writing a list of feaures, the figuring out what is in common to put in base vs specific. Ideally somehow tiles action could be extended from the "base" action.)


My original objection was based on teaching Struts? Ex: When should we use tiles action?
It is just easier to tell people, use this action, and pass in this type of arguments, and if it find nothing, it just defaults to "Success".


.V



Steve Raeburn wrote:
I would prefer going with simpler, specialised classes than a monolithic
DispatchAction but if there is a consensus to combine them then I accept
your point.

A combined action may perhaps offer more flexibility. A concrete subclass
might be able to resolve the method in different ways depending on what was
present at runtime. (request parameter, parameter, key).

However, I'm not sure that flexibility justifies the increased complexity of
the class or of understanding how to use it. Potential areas for user
confusion would be misunderstanding the order of preference for resolving
the method names or not recognizing conflicts that could arise between them.

Also, what happens if we need to resolve by other means? Add more weight to
the super class or add another specialized sub class?

To summarize:
  - I think we definitely need the functionality that
    ParameterDispatchAction offers.
  - If the actions are combined, the result needs to be just as extensible
    and easy to understand as keeping them separate.
  - I would rather not combine them, but I'm open to ideas that satisfy
    the previous two points.

Steve



-----Original Message-----
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: August 1, 2003 1:38 PM
To: Struts Developers List
Subject: RE: Addition of two new actions



I would prefer to add ParameterDispatchAction now and defer a decision
about
merging the three actions.
To me, that would be 'the simplest thing that could possibly work' :-)

The downside to doing that is if we decide to combine them we have to go through the deprecation phase, document the changes, and explain it to confused users. I'd prefer it if we took a look at all 3 classes now and decided on an implementation before committing anything new.

David


Steve



-----Original Message-----
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
Sent: August 1, 2003 10:42 AM
To: Struts Developers List; [EMAIL PROTECTED]
Subject: RE: Addition of two new actions


So, what you really want is LookupDispatchAction without requiring the developer to create the map-related methods? I think you already get

the


abililty to combine CRUD related actions and things like that.  If so,
then implementing a default getKeyMethodMap() in LookupDispatchAction
might accomplish the same goal, without requiring another action.

Such a


default implementation could examine the current LookupDispatchAction
subclass and create the mapping information automatically.

Don't get me wrong ... I like the idea behind what you're proposing.

I


just think we might already have it (with the potential to improve

ease of


use by not forcing people to implement getKeyMethodMap() for a common

use


case).


Craig



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



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
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