[Zope3-dev] Associations

kapil thangavelu kvthan@wm.edu
Thu, 24 Jan 2002 16:03:18 -0800


I was thinking that perhaps the easiest way to solve this problem (that
would still work for zope2) would be to introduce an
ObjectLinkingService. Which would involve path based object references
stored in a central linking registry. Objects would obtain a link
reference (integer, object, whatever) and it would be the responsibility
of the linking service to resolve the link. The linked to objects would
notify the linking service of changes to location via an event channel.
This would allow refactoring of a lot of common programming idioms that
result in duplicate path based references in multiple locations,
multiple catalogs comes to mind as an example. Instead of having n-m
path references, you would get a single path reference, with interested
objects storing LinkingService generated reference.

- kapil (who sincerely hopes this outlook generated email doesn't arrive
as html).


-----Original Message-----
From: zope3-dev-admin@zope.org [mailto:zope3-dev-admin@zope.org] On
Behalf Of Jeffrey P Shell
Sent: Wednesday, January 23, 2002 2:41 PM
To: zope3-dev
Subject: [Zope3-dev] Associations

A frustrating thing about designing in Zope/ZODB is the difficulty of
doing
non-containment relationships.  While paths *can* be used to refer and
get
to other objects within Zope, the folder-like nature of Zope makes it
natural to do various move operations (cut/paste, rename) that end up
invalidating any path reference to a particular object.  This is a
common
grievance, causing many people (myself included) to implement their own
quick solutions to the problem by taking various approaches (see the
comments area for the ExplicitObjectReferences proposal [1]).

<snip>

>From the perspectives of both a component developer and an application
integrator, how might the references be updated so that a business rule
like
"once a task is referenced by an invoice, that task must *always* be
reachable from the invoice" can be enforced?  Are there any existing
notions?

..[1]
http://dev.zope.org/Wikis/DevSite/Proposals/ExplicitObjectReferences
..[2] http://www.zope.org/Members/jshell/relations.jpg

-- 
Jeffrey P Shell 
www.cuemedia.com