You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@anyware-tech.com> on 2001/07/20 10:47:35 UTC

[Fwd: Re: map:parameter in map:components]

Forwarding to the list : I didn't noticed the reply-to header.

BTW, changes are commited !

Sylvain

-------- Original Message --------
Objet: Re: map:parameter in map:components
Date: Fri, 20 Jul 2001 09:16:36 +0200
De: Sylvain Wallez <sy...@anyware-tech.com>
Société: Anyware Technologies
A: haul@informatik.tu-darmstadt.de
Références: <3B...@anyware-tech.com>
<Pi...@lap1.otego.com>
<20...@london.dvs1.informatik.tu-darmstadt.de>



Christian Haul a écrit :
> 
> On 19.Jul.2001 -- 11:06 PM, giacomo wrote:
> > I totally agree with you, Sylvain, and would encourage Christian to
> > remove the hole configuration part from the AbstractAction at all
> > because this forces new developer to think of using parameter
> > elements instead of better ones like <foo>bar</foo>.
> 
I've made the corrections after Christian's approval. I will commit them
this morning after testing.

> I found that actions could be easier to use when some parameters could
> be specified that are valid for all invocations. For example one might
> want to have all validator actions use the same descriptor file, or
> all database actions use the same connection, or ...
> 
This is a good idea, only the way you did it was questionable. The
information contained in <map:components> is configuration, while
<map:parameter> in the pipelines is request-time parameters.

A configuration can specify a default value that will be used when no
parameter is given, but IMO it's confusing to have parameter
declarations in the configuration. Also, defaulting parameter values in
the configuration may not make sense for all actions.

> Before, it was necessary to specify this for every invocation. I think
> that makes the sitemap less readable. Action sets are a solution to
> this only, if the success of an action is of no importance to the rest
> of the pipeline or this is communicated through side channels like
> modifying the request object.
> 
> Hence, I believe that all actions should be able to receive the same
> configuration information for sitemap wide use that they take per
> invokation.
> 
> If we can agree on this, it would be a duplication of effort to have
> every action implement parsing the configuration itself. This is the
> reason why I suggested to put this into AbstractAction.
> 
> Would you prefer to have another abstract action, that contains some
> configuration support?
> 
> Sylvain is right about the map:parameter part. We could modify the
> configuration method so that it takes every node name as key and the
> node value as er value.
> 
> Example:
>   <map:action name="form-validator" src="org.apache.cocoon.acting.FormValidatorAction">
>      <map:parameter name="descriptor" value="context://descriptor.xml"/>
>   </map:parameter>
> 
> becomes
>   <map:action name="form-validator" src="org.apache.cocoon.acting.FormValidatorAction">
>      <descriptor>context://descriptor.xml</descriptor>
>   </map:parameter>
> 

That's how I changed it. 

> I would modify the code to what we agree upon, but I understood
> Sylvain that he already did this and didn't want to duplicate it.
> 
Right. I'll notify you when commit is done.

>         Chris.
> 
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
> 
Sylvain.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org