cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Gallardo" <>
Subject Re: Rename "union" to "select"?
Date Sat, 03 Jan 2004 06:16:52 GMT
Timothy Larson dijo:
> You have seen this discussion before, but we delayed making
> a decision until the code entered CVS and more people had a
> chance to examine and use it.  For an example, see the Form
> Model GUI sample from the Woody sample page.
> The "union" widget was named after a "C" language construct,
> but no longer completely matches normal "C" union semantics,
> which would imply that the alternate values are overlaid in
> the the same location, whereas this widget remembers all of
> the alternative widgets it has held over time (we will want
> support selective amnesia in the future).
> Since the semantics no longer match, I think we need a name
> change.  We could copy Java's "switch" syntax or choose the
> (IMHO) more intuitive name "select", as in "select case...".


I think we must discuss it more further. The "union" name is in fact not
the best name we can choose. To be honest it was not clear to me until you
described it as analogous to C language. I am more a database oriented guy
and at the first sight the name UNION remember me the UNION in database
environment. Also note Java almost allow us to forget the C language
meaning of union datatype.

I think we can better stay away from analogies to programming languages.
In a forms framework this is not the best.

I started writing this mail 5 hours ago. Then I stoped and started a
discussion about this topic with Carlos about this changes and how it
would help in the woody form framework.

For us it is still not clear where we can use all the new stuff (class,
new, struct and union tag). Try to explain why:

1-If we need dynamics forms, we can already use some generator and do the

2-Note we don't think the new tags are a bad idea at all, but the names
are not too clear:

As we concluded a "class" is purely an "enhanced" struct (from the old c
language). The class enhancement over struct is a set of method that allow
us to "manipulate" the data inside the class. Under this vision then there
is a mixing in the class and struct names.

Carlos suggested that "struct" can be called "templates", but this also
clash we the already woody templates. :-(

I suggested "block" but this is again not be the best. AFAIK the struct
allow us to define a set of widgets that later we can recall just by using
the struct name. This is similar to the preprocesor #define tag in C
language. Tipical example the definition of the MIN(x) and MAX(x) in C.
The preprocesor expand (makes a substitution) whenever it find MIN() or

Another idea was: container

All in all it is stil not clear to us where it would be usefull.

Please explain us a little more about this new features. We are dealing
with  large forms and maybe if we understand this new features we can test
then on these forms, but currenlty we also see:

add more complex to the current definition model. We have woody form
definitions with cca 750 lines of code (some of them are larger) and these
files are not very pleasant to manage when we need to make a change. It is
not as fast as we want to find the place and make the correct change. Note
sometimes the developer who change the definition is not the same who
wrote it.

So we thought that better will be to use xinclude to "import" from another
files the shared widgets.


Please note we are not against this change, we just request for more info
about this topic :-D

Best Regards,

Antonio Gallardo.

View raw message