[Zope-dev] Resource Discovery (was Observer / Notification Interface Proposal) Proposal)

Phillip J. Eby pje@telecommunity.com
Thu, 25 May 2000 16:57:12 -0500


At 10:42 AM 5/25/00 -0400, Tres Seaver wrote:
>
>In our case, perhaps it needs to be::
>
>   def findNearestResource( meta_type ):
>
>which causes a walk up the containment hierarchy, searching for objects
>of the given meta_type.
>

I would suggest that it ask for an interface, rather than a meta_type.
Otherwise, you've hardwired yourself into a single object type with no
extensibility.  For example, an SQL method wants the nearest SQL
connection, but shouldn't have to explicitly ask for each kind of SQL
connection (Sybase, Oracle, etc.)