[Zope3-dev] Re: Source API

Fred Drake fdrake at gmail.com
Sun Sep 11 10:13:27 EDT 2005


I wrote:
> The current ITerms approach for sources makes terms essentially views
> on the values from the source, so that's a good way to provide things
> like XHTML snippets that can be used in the UI.

On 9/11/05, Stuart Bishop <stuart at stuartbishop.net> wrote:
> So lets say I have a Source that provides values from an RDBMS table, which
> contains a unique key and a display name (very common in our application).

In many applications.  :-)

> If the Source generates the ITerms, iterating over 100 items in the table
> can be done in one RDBMS query. However, if you need to adapt the key to a
> Term how does the Term know what the display name is? I'm either not getting

The "essentially" in my explanation (quoted above) was because the
ITerms instance is actually an adaptation of the ISource, not the
value.  The ISource can provide access to the database connection or
cached name information.  (Caching that in the source would be an
effective way to avoid lots of separate queries.)


  -Fred

-- 
Fred L. Drake, Jr.    <fdrake at gmail.com>
Zope Corporation


More information about the Zope3-dev mailing list