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


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to