[Zope3-dev] Containment constraints

Stephan Richter stephan.richter@tufts.edu
Thu, 12 Jun 2003 09:43:58 -0400


On Thursday 12 June 2003 09:27, Chris Withers wrote:
> > One the other hand, an isAllowed() method might be best, so you could
> > implement things like all interfaces except IFoo. I would make that
> > method a method of IContainer.
>
> How does this handle the case when the object wants to veto it's creation
> in a given container?

This would be not possible of course.

I thought about some other models, but they would be all very complex. I would 
prefer to keep this decision *very* simple.

For example you could have a massive CA-like solution, where object have an 
ICreationPolicy and IAddPolicy adapter associated with it. Containers would 
additionally have something like IContainmentPolicy. But wouldn't this be 
overkill?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training