[Zope-dev] Externalize or Adapt? (ZPatterns)

Phillip J. Eby pje@telecommunity.com
Sat, 10 Jun 2000 10:19:02 -0500


At 06:31 PM 6/10/00 +0800, Mike wrote:
>
>Maybe the best way is to put a 'thumb' data source into Customers
>instead of native one. This thumb should translate all messages to
>SkyDivers' data source.

Yes, a "Delegation Rack" is certainly possible.  It would make it really
easy to merge data from different specialists; just drop in more than one.
I suppose you could even make the DelegationRack have an expression to use
to translate from the ID asked for in the horizontal specialist, to the
kind of ID used by the vertical specialist, perhaps by using a search
function of the vertical specialist.


>I'm just considering on specialized racks which
>implement non-standard api, such as 'findItem( criteria)',
>'itemValues()' or something similar.
>
>By the way, racks should have a kind of 'scanning' api, like Zope's
>Folders, at least they should have itemIds() method.

This is waiting for indexes and predicates; which won't hit until 0.5.0.
Meanwhile, I'll add a getPersistentItemIDs() method to Rack in 0.4.0.  This
will not get you the id of all possible items in the rack, since you might
be using SQL or some other kind of storage.  It will only get the items
which have data or propertysheets in the ZODB.  Currently, the correct way
to have 'scanning' API's is to implement them on your Methods tab using SQL
methods, LDAP methods, or whatever is appropriate for your dataset.  In
0.5.0 or later, hopefully there'll be some sort of plug-in API for that.