[Zope3-dev] what is ZCML?

Jean-Marc Orliaguet jmo at ita.chalmers.se
Tue Mar 14 10:09:13 EST 2006


Jim Fulton wrote:

> Jean-Marc Orliaguet wrote:
>
>> Jim Fulton wrote:
>>
>>>
>>> Yup.
>>>
>>> BTW, a general thing to keep in mind:
>>>
>>> - Indirection and abstraction are inherently bad because they
>>>   hide things. :)
>>>   (This is a corolary of "explicit is better than implicit".)
>>>
>>> - But indirection and abstraction can provide benefits that outweight
>>>   their inherent bad-ness.
>>>
>>> Whenever we consider ptoviding a high-level/automated facility, we have
>>> to weigh the benefit against the inherient badness.
>>> [...]
>>>
>>> Jim
>>>
>>
>> yes, except that ZCML adds strictly no abstraction compared to what 
>> would have been written in python.  It only "paraphrases" python by
>> hiding lines of code.
>
>
> I was refering to high-level ZCML, such browser:page, browser:menu, etc
> vs low-level directives like adapter.
>
> Jim
>

I would say that they paraphrase more lines of code than the low-level 
ones, but they fundamentally add no extremely valuable abstraction since 
a page is an alias for a multiadapter, a menu registers utilities, 
interfaces, .. . Anyway these are the ones that should be moved out of 
ZCML I guess since they are so site or application specific that it is 
difficult to be reuse them as components in other setups. But after 
rereading your mail it seems that this is what you said in it.

simply put, high-level ZCML would be for me being able to associate a 
collection of resources to a given skin in a global way, or saying that 
a given LDAP directory should be plugged into a given authentication 
service, but without specifying LDAP port, servers, when doing the 
connection (because I have an object in ZCML that stands for the LDAP 
directory and another one that refers to the authentication service)....

/JM


More information about the Zope3-dev mailing list