"Phillip J. Eby" wrote:
> At 03:51 PM 5/21/00 -0400, Tres Seaver wrote:
> >
> >This is really just the classic Observer pattern, a la GoF Design
> >Patterns.  "ObjectAdded" and "ObjectRemoved" are events a
> >"RackObserver" would register for;  "AfterCreate", "Changed",
> >and "BeforeDestroy" are events of the "hosted" object itself.  Note
> >that "ObjectAdded" and "ObjectRemoved" would be called during move or
> >rename operations, even though the object is not being created.
> Yes, but the DataManager will filter that such that Zope "Move" and
> "Rename" operations will show to Indexing and Rule agents as though
> they were just "Change" events.  See the DataManagementEvents entry
> in the new ZPatterns Wiki for details on how this will work.

This design has the unfortunate side effect of coupling an object
to a single location.  Properly speaking, objects shouldn't "know" about
their containers;  the container should be responsible for handling any
operations which depend on it.  Consider a Unix file system:  the
to get rid of a file is "rm," which is an operation on the *directory*,
on the file/subdirectory;  it only causes the file to be deleted if the
current directory was the only one with a link to the file. 
is currently broken (as Evan just pointed out to me) because it tries
hard to know about its container's path;  it would be better if the
container were responsible for doing the
index_object/reindex_object/unindex_object stuff, and not the object

Tres Seaver       Digital Creations        [EMAIL PROTECTED]

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to