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

2000-06-10 Thread Mike

Mike wrote:
 
  I will add a "retrieveItem" method to the Specialist which, instead of
  accessing a rack in the local specialist (the default implementation), it
  will instead call (for example) SkyDivers.getItem().  Thus, when you call
  Customers.getItem(), you will actually get an object from the SkyDivers
  specialist.  In other words, I make the horizontal domain specialist
  delegate to the vertical specialist.

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

Mike

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




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

2000-06-10 Thread Phillip J. Eby

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.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )