cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Larson <...@keow.org>
Subject choose/when: container or control-structure?
Date Wed, 17 Nov 2004 16:16:36 GMT
The use of a choose in the form model should be invisible
to the form template and form binding, just like use of a
choose in the form template is invisible to the form model.
Only structural differences between choices should force
the parallel use of a choose in the template and binding.

A choose may be used in the form model without causing
structural changes.  For example, identical sets of widgets
may be referenced into two or more when branches, with the
sole pupose of the choose control structure being to trigger
event handlers to toggle the widgets' states.  In this case
it would be an unnecessary mixing of concerns to force the
knowledge of the form model's choose onto the form template.

This leads to choose not being treated as a container, but
rather as a control structure.  The id of the choose should
not be injected in the id's of the widgets which it controls
because this would force the template and binding to know
about its presence even when they do not need to, needlessly
increasing the coupling between the layers.

WDYT?
--Tim Larson

PS: There is a list of other issues to resolve about the
choose widget (naming, optional id, referencing widget defs
versus inlining widget defs in the when clauses, different
widgets defs in each when clause with matching id's, etc.),
but let's addres them one at a time to reduce confusion.
After this first issue is resolved I will start separate
threads to discuss the other issues.

Mime
View raw message