[Zope3-Users] Re: Newbie relationship question
srichter at cosmos.phy.tufts.edu
Wed Sep 6 16:53:12 EDT 2006
On Wednesday 06 September 2006 09:58, Carlo Cardelli wrote:
> > 1. Register your customer object as a utility and then do utility
> > lookups. In this case you can reuse code in
> > zope.app.component.vocabulary.
> > 2. You probably have a convention where to find customers, like a
> > "CustomerContainer". You can setup your application to easily look up
> > this container to get the entries.
> Thank you for your answer. In the meantime I made some progress with
> In your opinion, which of these 2 options suits best for a large number
> of objects (say, about 100,000 customers)?
Definitely the second one. I would probably just use the name and only "wake
up" (access) the object when needed, so that you do not keep loading 100k
objects into RAM.
> About vocabularies: In another post you say you'd rather use them
> instead of sources. As far as I can see, queryable sources seem the main
> choice for management of large collections. Example: a user wants to
> browse a list of all Customers beginning with "a"; I cannot fill the
> HTML page with about 5000 entries, but have to manage "chunks" of
> objects in some way. Hence a queryable object is needed.
> Am I wrong? Is there a way to tweak vocabularies to support such cases?
> Could anyone provide an example of a similar implementation? Note that I
> have to use a Relational db, so if I understand well I cannot use
> catalogs or similar.
If you understand sources, then that's great! Don't unlearn that! It is a
personal preference of mine not to use them, because I find them too
difficult for my needs. But you clearly outline a need that I do not have, so
a source might be exactly what you want.
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-users