[Zope3-dev] Containment constraints

Jim Fulton jim@zope.com
Thu, 12 Jun 2003 10:07:50 -0400


Steve Alexander wrote:
> 
...

>> Note that most of these constraints are expressed as allowable
>> combinations of interfaces. Also, we'll often want to add constraints
>> to sub-types.
> 
> 
> Do you think we need more arbitrary constraints too? It would be nice if 
> we didn't...

I suspect that arbitrary constraints are needed for edge cases. These might be
best handled through lower-level mechanisms, like custom movers or
subscribers.

> What about an IFlame object can be added only to a message thread of an 
> IMetaDiscussionBoard, but not to a message thread of an IDiscussionBoard.

:)

> In this case, the constraint would be about the context of the location 
> an object is to be added, not just the location.
> We can work around this case by making the (otherwise identical) message 
> thread types have different marker interfaces: IMessageThread, 
> IMetaMessageThread.

Right.

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (703) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org