[Zope3-dev] Re: ZCML bad ;-)

Philipp von Weitershausen philipp at weitershausen.de
Tue Jan 24 10:14:16 EST 2006


Fred Drake wrote:
>>I find it irksome to have to type them at the top of ever file. Is there
>>no way that they could be pre-bound in the XML parser? That way you'd
>>only need to inlcude them if you wanted to rebind them... 
> 
> Even if we could avoid it at a technical level, it means that what
> we're reading is no longer XML.  One of the desires with ZCML was to
> not invent everything from scratch.  So, *if* we're using XML, we need
> to use it as defined, otherwise it *isn't* XML.  We're shying away
> from what's invented here in favor of what's been developed in a
> broader community.
> 
> An alternate syntax could of course do things differently, but
> introducing an alternate syntax just means there's more than one way
> to do it.  That's usually a bad idea.  Philipp's proposal cuts more to
> the heart of the problems with ZCML, and they aren't syntax-specific.

Indeed.

Also, I think that with less ZCML directives in the future (I'd like to
see their number cut in half or so) ZCML namespaces won't be as
necessary as they are now. Actually, I find the different ZCML
namespaces not really useful anymore, especially when a browser page is
not something special from a registration point of view but instead just
another view or even just another adapter with security declarations.

I like XML and I like the fact that ZCML uses XML. I'm also a big fan of
explicit namespace declarations. I want them for ZPT, for example.
However, I think one namespace for ZCML is enough. That should also save
some dead chickens in the future (re ChrisW).

Philipp


More information about the Zope3-dev mailing list