On 2/15/06, Chris Withers <[EMAIL PROTECTED]> wrote:
> Stephan Richter wrote:
> > I do not think namespace declarations are dead chickens. For me declaring a
> > namespace in ZCML is the same as importing a package or module in Python.
> > You
> > would not want all functions and classes in Python live in one namespace,
> > would you?
> The more namespaces, the more needs to be learned, the more confusion.
> ZCML is not python, comparing the two isn't right.
> I'm all for simpler and simpler zcml...
A single namespace with more options is not a better solution. THAT
means more to learn, because now I have more options to sift through.
When the units of work are segmented out to appropriate subsystems
(and kept reasonable and free of magic), namespaces in ZCML are and
could still be a good thing.
Am I the only person who uses apidoc to look up what can be done with
ZCML? Because honestly, finding out what directives are available and
getting decent documentation about ZCML directives is the easiest
thing in Zope 3. Understanding what's going on or what the real
meaning of a particular value in combination with others might be -
that's a different story. But finding out what namespaces are
available and what the directives are has never been a problem. And I
spend most of my apidoc time (when looking at ZCML) with the 'browser'
and 'zope' nodes expanded. I rarely need the others ones.
Less directives? Maybe. *
Less "does a lot of things for you but offers no easy path to do some
of the work yourself?" directives? Yes please.
Less "similar to but varying by a couple of small details" directives?
(browser:view and browser:page)? Yes please.
One namespace for everything? No thanks. Especially if the reason is
"I don't like typing those namespaces at the top of the file."
Modularity is a good thing. Trust me! We don't need 100 namespaces, we
don't need 50, but we can't lump it all in one. I still think that's
the wrong fight to fight right now.
* I don't mind directives that are easy to read by eye. Lumping
everything into <utility> and <adapter> is not going to make things
easier to read. I like <factory>. I like <browser:view>. I just
wouldn't mind the documentation saying <browser:view...> is shorthand
for ..., and can be done in pure Python and one line of ZCML by ....
I'd also like to see documentation about when custom classes are
created and why, and what to do if you don't want the ZCML to generate
things for you.. It may have good reasons for generating things, I'd
just like to know why. Because god knows, that's the code that I have
the hardest time reading. (_discriminator this, handler_ that..).
Zope3-dev mailing list