[Zope3-dev] Containment constraints
Roché Compaan
roche at upfrontsystems.co.za
Tue Dec 23 15:32:55 EST 2003
* Sidnei da Silva <sidnei at awkly.org> [2003-12-23 22:14]:
> On Tue, Dec 23, 2003 at 09:57:48PM +0200, 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. Add to that the class implementation and ZCML one has to
> | write for each interface and the dead chickens start to smell.
> |
> | Should I just get used to it or am I missing some zen.
>
> I'm almost sure you can use a 'smarter' precondition that would be
> reusable over all your folderish content. And also, that you may not
> need to write an interface for each folderish object, unless you need
> a marker interface for attaching a view, in which case I think you can
> just register a view for a class now.
Yes you're right. I was fixated on the existing ItemTypePrecondition -
thanks for the nudge, I got my focus back ;-)
--
Roché Compaan
Upfront Systems http://www.upfrontsystems.co.za
More information about the Zope3-dev
mailing list