[Zope3-dev] Containment constraints
Jim Fulton
jim at zope.com
Tue Dec 23 16:02:05 EST 2003
Jim Fulton wrote:
> Roché Compaan wrote:
>
>> The containment constraints are yummy. Just one thing I am concerned
>> about is that the current implementation (__setitem__.precondition on an
>> Interface) may lead to a lot of dead chickens. I seem to be ending up
>> with a lot of interfaces that only subclass IContainer and set
>> preconditions.
>
>
> Yes, and likewise for the __parent__ constraint.
>
>> Add to that the class implementation and ZCML one has to
>> write for each interface and the dead chickens start to smell.
>
>
> The zcml one has to write? I don't follow this.
>
>> Should I just get used to it or am I missing some zen.
>
>
> Well, this is new. We need to get some experience. I'm sure
> it can be improved. I'll note that implementing containers is
> now *much* simpler than it used to be.
>
> (In fact, I really need to update the slided, because, at the
> Bangalore sprint a new zcml directive was added that vastly
> simplifies defining the contents, add and index pages.)
>
> I suspect that a zcml directive and/or Python api could automate
> certain aspects of defining these interfaces. Proposals are welcome.
I'll note that, eventually, there will be a TTW UI for defining
container types, much as there is in the CMF.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list