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.

Sylvain

--
Sylvain Wallez                        Anyware Technologies
http://apache.org/~sylvain            http://anyware-tech.com
Apache Software Foundation Member     Research & Technology Director



Reply via email to