cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: [cforms] rethinking library naming
Date Mon, 26 Sep 2005 17:19:41 GMT
hepabolu wrote:

> I haven't looked at the new and improved CForms yet, but I'm all for 
> clarification.
>
> Sylvain Wallez wrote:
>
>> 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])
>
>
> What about the jxmacros? Doesn't that lead to confusion? I know 
> namespace is different, but that is easily lost when scanning quickly 
> through the file.


Ah, you mean "ft:class" which would be replaced with "ft:macro" and thus 
could be confused with "jx:macro"? Hmm... Not sure this is that much a 
problem.

>> - rename <fd:new> to <fd:expand>: "expanding" is the word used 
>> traditionally to denote insertion of the macro contents at the 
>> current location.
>
>
> "expand" does fit better with "macro", but I'm having doubts about 
> "macro" and to me "new" fits better with "class"
>
>> - rename <fd:import> to <fd:load-library>, to clearly indicate that 
>> widgets in the library are made available but not inserted right now, in 
>
>
> +1
>
>> contrast with <jx:import> in JXTG that executes the imported template.
>> - 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.
>
>
> Well, if both are equal, I'm all for the last (i.e. field extends 
> library field).


They're not exacly equivalent. <fd:field extends="lib:myfield"/> is an 
extension with no overloading or extension and thus must use the exact 
same widget type as the extended widget.

Since it doesn't allow overloading, <ft:insert> doesn't care about the 
library widget's type, and avoiding having to know the target widget's 
type can be convenient when you just want to use it.

Sylvain

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


Mime
View raw message