[Zope3-dev] One namespace for ZCML

Philipp von Weitershausen philipp at weitershausen.de
Mon Feb 13 23:16:36 EST 2006


Martijn Faassen wrote:
> I don't see the problem with learning new ZCML directives when I'm
> learning a new package. I can see why you'd like to reduce the
> occurence, and I think sometimes configuring things in ZCML is actually
> doing it in the wrong place, as information needs to be persistent
> sometimes.

I agree. Having to remember how to work with a new ZCML directive *is* a
burden, though. Given that we're all Python programmers, I would say that it's
more of a burden than having to remember a Python API.

> Moreover, sometimes a package introduces new ways to configure
> components. Five does so, for instance, and Silva will too eventually.

I would really like to hear what kind of directives you imagine for Silva here
(and what you mean by "new ways to configure components").

> Sometimes a new, short directive is a lot easier to
> remember than to remember long.dotted.names.pointing.to.places and 3
> directives. Having to remember (or worse, look up) long dotted names is
> extremely common in ZCML and I consider it at least as big a problem as
> having to learn directives.

I agree. Many of these long dotted names belong into Python, though.

> Let's use abstraction and naming things where it makes sense.
>
> Heh, perhaps we need to go the other way and add a namespace directive
> for long dotted names instead. :)

-1.

> > That said, there might still be a small percentage of cases where custom
> > directives are a valid tool. I can accept their being on the same
> > namespace as
> > others. In fact, I would like it to be that way, reducing the amount of
> > dead chickens (namespace declarations).
>
> Namespace declarations are not dead chickens. They're things that the
> XML language requires. Indentation and colons are not dead chickens in
> Python either. *particular* namespace declarations may be unnecessary -
> but not dead chickens, just perhaps the wrong solution.

Yeah, sorry, bad wording. I just think having to declare 3 to 5 different
namespaces on the top of the file of which some have no apparent meaning or
distinction seems like clutter to me.

Note that I absolutely see the necessity for namespace declarations. For
example, I would like to see ZPT require the declaration of TAL, METAL and
I18N namespaces. Note that there the entire namespace story is different.
There they are used for what I think namespaces are intended, separating
several XML models (e.g. the HTML model from the additional TAL/METAL/I18N
model).

Philipp


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


More information about the Zope3-dev mailing list