Dominik Huber wrote:
> I really appreciate your effort in all other cases, but in this case I
> think its not a simplification.

At least in case of class/implements it is. I'm merging two directives,
class/implements and five:implements into one.

The case of class/factory is arguable, I admit. However, there I'm just
following the rule of a) defining things in Python and registering them in
ZCML and b) use more basic ZCML directives, less special ones.

> The today's arrangement of class subdirectives is not an evil at all.

Oh, I never said it was evil. It was just a lot of mixed stuff. The 'content'
or 'class' directive always seemed to me like its creator thought "Hmm, let's
see, what else can we do with classes?" That disturbed me.

I'd like ZCML directives to preferrably do one thing only. With my proposal,
the 'class' directive would be reduced to just doing security declarations,
which is what it's usually used for anyways. The rest of stuff in 'class'
(factory and implements) has absolutely nothing to do with security

> We use all offered subdirectives (including implements and factory)
> heavily in our use cases.

Sure. Zope 3 heavily used the 'vocabulary' directive as well until last Sunday.
That doesn't mean it shouldn't have been removed, though. It's not like I'm
proposing to take away functionality. I'm just proposing to implement it

> IMO It's important that nested directives embrace things belonging
> together.

Indeed. Right now, 'class' mixes quite separate things (security vs. a utility
registration vs. interface declarations).

> This enhances readability of the grouping and reduces redundant
> reference-informations. That's also a very important aspect of usability.

Yes. Another important aspect of usability is *re*usability. If I can apply
something I learned before in a different context, then a system is very
usable, I think. That's why people love the Mac. It's so consistent. ZCML
isn't very consistent. At least before my proposal was partially implemented,
I could think of a dozen ways to register certain utilities. There still are a
dozen ways to register adapters.

To make my point, let me quote Tim Peters echoing Guido's thoughts:

>>> import this
There should be one-- and preferably only one --obvious way to do it.


This message was sent using IMP, the Internet Messaging Program.
Zope3-dev mailing list

Reply via email to