[Zope-dev] RFC: RelationAware class for relations betweenobjects

Paul Winkler pw_lists@slinkp.com
Wed, 30 Apr 2003 13:11:18 -0400


On Wed, Apr 30, 2003 at 09:40:46PM +0200, Max M wrote:
> Steve Alexander wrote:
> 
> >What about making relationships among pre-existing objects that were 
> >not designed with relationships in mind? 
> 
> 
> Exactly!
> 
> Without thinking I send this to Zope-dev: But here it goes again:
> 
> If an object needs to be related to another object, there is no need for 
> any of the objects to know they are related. If all the relations are 
> external to the objects you can relate objects that are not programmed 
> to be related. Keeping all the relation code loosely coupled from the 
> objects.
> 
> Making the objects hold the responsibility for the relations means that 
> all objects has to take it into account. There is no reason for that.

well, *something* still has to worry about the objects moving.
AFAICT in zope2 with mxmRelations, you either have to modify the 
objects so the notify the relations object when they move, or 
modify the containers to do so whenever something within them is moved.
To me it looks like TAANSTAAFL.

-- 

Paul Winkler
home:  http://www.slinkp.com
"Muppet Labs, where the future is made - today!"