Reinhard Poetz wrote:

Sylvain Wallez wrote:

Hi all,

We started to use the new widget libraries today, and encountered a number of semantic issues, mainly related to difficulties to clearly map names to concepts.

To use libraries, we currently have at hand:
- <fd:import> to make a library available for reuse in the current form (or library) definition. - <fd:expand> to import a widget defined in a library in the current definition
- <fd:class> to define a group of widgets with no surrounding container
- <fd:new> to expand the contents of a <fd:class> in the current container

These names make it very difficult to understand what does what. I'd like therefore to propose a renaming: - rename <fd:class> to <fd:macro> (this is the wording used on the wiki [1][2]) - rename <fd:new> to <fd:expand>: "expanding" is the word used traditionally to denote insertion of the macro contents at the current location. - rename <fd:import> to <fd:load-library>, to clearly indicate that widgets in the library are made available but not inserted right now, in contrast with <jx:import> in JXTG that executes the imported template.


+1 to all three proposals

- rename <fd:expand> to <fd:insert> (or <fd:use>?)

For this last item, it has to be noted that it is equivalent to an "untyped extension", i.e.
   <fd:insert ref="lib:myfield"/>
is equivalent to
   <fd:field extends="lib:myfield"/>
if of course "myfield" is a field.


do we really need it then? I could live with <fd:field extends="lib:myfield"/> only :-)


Sure. <fd:insert> adds a little more convenience you don't extend the widget (see my answer to Helma).

Sylvain

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

Reply via email to