You are not logged in Log in Join
You are here: Home » Members » Phillip J. Eby's Zope Center » My Wikis » ZPatterns Wiki » DataSkins

Log in
Name

Password

 
 

History for DataSkins

??changed:
-
!DataSkins are objects which are designed to collaborate with DataManagers to manage their data.  Specifically, !DataSkins delegate all of their attribute and propertysheet manipulation to their !DataManager, and also inform their !DataManager when they are added, deleted, or changed (so the !DataManager can update indexes or apply business rules via DataManagementEvents).

!DataSkins can be stored in [Racks] or placed as normal objects in the ZODB.  When placed in the ZODB, they must be in a sub-folder of one or more CustomizerFolders which have at least one of their [Customizers] configured to manage that DataSkin's 'meta_type'.  The !DataSkin looks for its Customizer whenever it is retrieved from its immediate parent object, by seeking an object above itself that implements the '_getDataManagerFor()' method.  It then passes itself to that method, and expects to receive a !DataManager which it can collaborate with.

Note that although the current implementation of CustomizerFolders and [Customizers] is based on routing by 'meta_type', it is quite possible for those implementations to be trivially subclassed to use some other distinction to select the appropriate injector.  !DataSkins simply pass themselves to a '_getDataManagerFor()' method, leaving it up to the !InjectionFolder (or other implementor of the '_getDataManagerFor()' method) to handle the search/routing.

<hr solid id=comments_below>


teyc (Jun 24, 2001 9:10 pm; Comment #1) *Editor Remark Requested* --
 <pre>
 > !DataSkins are objects which are designed to collaborate with
 >   DataManagers to manage their data.  Specifically, !DataSkins delegate all
 >   of their attribute and propertysheet manipulation to their !DataManager,
 >   and also inform their !DataManager when they are added, deleted, or
 >   changed (so the !DataManager can update indexes or apply business rules
 >   via DataManagementEvents).
 </pre>
 
 It may be useful at this point to cite the interface implemented by a DataManager rather than make users refer to the source.