[Zope-dev] Re: Re: [Zope-dev] ZPatterns framework improvements

Tres Seaver tseaver@palladion.com
Sun, 21 May 2000 15:51:18 -0400


"Phillip J. Eby" <pje@telecommunity.com> wrote:
> 
> At 05:28 PM 5/19/00 +0000, Jason Spisak wrote:
> >Phillip J. Eby:
> >
> >> I'm not actually real fond of the DDO term, because "Dynamic
> >> Data Object"
> >> doesn't quite do justice to what these things actually are.  I am
> >> definitely open to suggestions for a better name.  (Facade?
> >> PlaceHolder?
> >> InsideOutObject?  ExternalDataObject?  BrainInjectedObject?)
> >
> >ZopeTupperware, AloofAttributeObjects, DataSkins :)
> >
> 
> I think I'm going to go with DataSkins.  Thanks for the suggestion.  :)
> 
> Now I need a name for another interesting ZPatterns 0.4.0 object...
> 
> I was working on "indexing" plugins for DataManagers (Racks,
> Specialists, and DataInjectors) and at one point I realized that
> you could use them for things besides indexing.
> 
> The basic idea is that an "indexing" plugin receives objectAdded(),
> objectChanging(), objectChanged(), and objectDeleted() messages
> from its DataManager.  The idea was that it would then be able to
> update an index (such as a ZCatalog) accordingly.  But during one
> of the PTK discussions about member registration, it occurred to
> me that a "registration index" could note the addition of a user,
> and then e-mail them or do other operations specific to that
> portal's business rules.  That seemed like an interesting hack of
> indexes, but then after a while I realized that these
> plugins could enforce any other business rules related to changes
> of objects or their addition/deletion.  They could, for example, be
> reverse indexes that, whenever a new information item was added,
> they looked up saved search preferences to find who was looking for
> the new item.  They could notify a manager about an expenditure
> greater than a certain amount.  They could roll back transactions if
> certain conditions weren't met.  And it all could be done outside the
> object itself, in the sense that these things would be extensions to
> the object's class, based on its location in the Zope filesystem.
> 
> So anyway, "index" now seems rather inadequate to describe these
> indexing, search-agenting, business-ruling objects.
> (Change Monitors?  Knowbots? Indexing Agents?  Index Rules?  Object
> Matchers?)  If you have any name suggestions, I'd love to hear
> 'em.  :)  I think it would be good if the name implied both major
> capabilities, although I think I might just end up having two
> seperate tabs ("Indexes" and "Rules") just to make the capabilities
> clearer.  It's just that DataManager derivatives already have
> so darn many tabs (Methods, Attribute Providers, Sheet Providers,
> etc.).

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.

Tres.
-- 
=========================================================
Tres Seaver                          tseaver@digicool.com
Digital Creations   "Zope Dealers"   http://www.zope.org