Am Freitag, 1. April 2005 16:52 schrieb Jeremy Quinn:
> On 1 Apr 2005, at 15:33, Sylvain Wallez wrote:
> > Jeremy Quinn wrote:
> >> Hi All
> >>
> >> <rant>
> >>
> >> During the process of stabilising CForms could we please consider
> >> rationalising the parameters sent to forms.js from the sitemap?
> >>
> >> This really bugs me :
> >>
> >> <map:call function="handleForm">
> >>     <map:parameter name="function" value="myFunction"/>
> >>     <map:parameter name="form-definition" value="model.xml"/>
> >>     <map:parameter name="bindingURI" value="binding.xml"/>
> >>
> >> Can we come up with better matching names for these please ?
> >> Names that have a similar case and/or hyphenation scheme?
> >>
> >> form-function, form-model, form-binding
> >> form-function, form-definition, form-binding
> >> formFunction, formModel, formBinding
> >> formFunction, formModelURI, formBindingURI
> >> function, modelURI, bindingURI
> >>
> >> etc etc.
> >>
> >> I do not really mind what they are, but they should at least look as
> >> if they are within the same concern.
> >>
> >> I propose that the old names are used if the new ones were not
> >> supplied but a deprecation notice is logged, then later they can be
> >> taken out.
> >
> > I propose that the "handleForm" shall be deleted, as IMO it really
> > doesn't make sense to specify all this information in the sitemap ;-)
> >
> > Compare this :
> > <map:call function="handleForm">
> >    <map:parameter name="function" value="myFunction"/>
> >    <map:parameter name="form-definition" value="model.xml"/>
> >    <map:parameter name="bindingURI" value="binding.xml"/>
> > </map:call>
> >
> > function myFunction(form) {
> >    form.showForm("blah");
> > }
> >
> > and this, which does exactly the same:
> >
> > <map:call function="myFunction"/>
> >
> > function myFunction() {
> >    var form = new Form("model.xml");
> >    form.createBinding("binding.xml");
> >    form.showForm("blah");
> > }
> >
> > I personally never used this "handleForm" function and consider it as
> > some old legacy.
>
> Hmmm, I disagree.
>
> I never like to embed names of files or pipelines in flowscript
> functions.
> I always pass these in from the sitemap.
> This way, the sitemap is the place where all paths, filenames, uris are
> managed, or the location that consistently retrieves these from a
> config, via input-modules.
> I do not like to spread this around as it makes refactoring more
> difficult.
>
> regards Jeremy
>
>
> --------------------------------------------------------
>
>                    If email from this address is not signed
>                                  IT IS NOT FROM ME
>
>                          Always check the label, folks !!!!!
> --------------------------------------------------------

hi, 
i really agree with jeremy ... 
maybe my opinion is not so important here because i do not made too many 
experiences with cocoon yet, but i really like the parameters with 

<map:call function="handleForm"> ...

it is nice to use wild cards * and {1} and so on in the pipeline to create the 
filenames and other pilelines i need. i like the flexibility i get.

in some cases i was so keen and added some other parameters just for my own 
purposes like

 <map:match pattern="form3-*-*.flow">
....
        <map:parameter name="templateURI" value="form3-d-pipeline-{1}-{2}"/>
        <map:parameter name="successURI" value="form3-s-pipeline"/>
....

so it is really very easy using one pipeline for many things and change with 
some little efforts.

maybe we can have not less but more parameters with names like jeremy said?

regards beate



-- 
þíþí

Reply via email to