[Zope3-dev] Associations

Roch'e Compaan roche@upfrontsystems.co.za
Mon, 28 Jan 2002 21:38:21 +0200


> 	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.

I'm surprised the ZPatterns framework hasn't surfaced more in the Zope3
discussion, glad that it does now :)

Anyway, does it make sense to have multiple proxies for a single Dataskin
instance?  If it does then I don't think there would be a problem.

If not, then how would one handle this use case:

I have an "organisation" object.  In one context it has the role of a
"Reseller" and in another context it has the role of a "LicensedOwner".
Thus
the organisation object is stored in a single location/rack but can be
displayed/accessed in different contexts, along different paths.  ZPatterns
make it quite easy to create the "illusion" of a hierarchy of objects as
well
as showing a single object in different hierarchies.  It does all this while
storage is delegated and flattened out.

The one thing one should try to achieve is to separate the presented
context and the real location of an object.

Roch'e Compaan
Upfront Systems
http://www.upfrontsystems.co.za