[Zope3-dev] Associations

Phillip J. Eby pje@telecommunity.com
Tue, 29 Jan 2002 08:56:04 -0500


At 12:55 PM 1/25/02 -0500, Steve Spicklemire wrote:
>Hi Gary,
>
>         What if we had a "Component-DataSkin-proxy". An object that could 
> live anywhere in a "Component" based site, pose as e.g., PortalContent, 
> but that was actually a proxy for a DataSkin instance stored in a rack 
> somewhere. You could move the proxy anywhere you like without breaking 
> the "proxy-dataskin" relationship. The proxy could delegate all 
> getattr/setattr to it's dataskin/datamanager. This way you could keep all 
> the data independence of ZPatterns, and still use Component Model ideas.
>
>Does that make any sense?
>-steve

Actually, Steve, you've just described a standard ZPatterns DataSkin, in 
the sense that you can subclass DataSkin to add whatever methods you need, 
and any DataSkin can be proxied to other DataSkins or directly to data, by 
writing the appropriate SkinScript.  So there isn't even anything extra to 
implement, there.

The same pattern can be implemented in TransWarp, since Domain objects can 
Dispatch many-to-many to Data objects.  (i.e., many Domain objects can 
share the same Data object, and a Domain object may map to more than one 
Data object).