[Zope] Where is the Z Class Tutorial?
Kevin Dangoor
kid@kendermedia.com
Wed, 22 Sep 1999 09:51:38 -0400
-----Original Message-----
From: Philip Aylesworth <phila@purpleduck.com>
To: zope@zope.org <zope@zope.org>
Date: Wednesday, September 22, 1999 8:12 AM
Subject: [Zope] Where is the Z Class Tutorial?
>In the excellent "How-To: Z Catalog Tutorial" Amos refers us to the "Z
>Class Tutorial". I think Z Classes are just what I want, but I can't
>find it. Does anyone know where it is?
http://www.zope.org:8080/Documentation/Reference/ZClasses
(I found this under Documentation -> Developer Reference on zope.org)
>I started to look at Gadfly but then I
>came across mention of Z Classes.
>
>Are they robust enough for a couple of thousand entries?
Personally, I really enjoy working with ZClasses instead of a standard
relational database. I have no reason to think that they won't scale to a
couple thousand entries. Right now, I have a ZClass container that contains
about 25 ZClass containers that contain about 550 ZClasses that contain
about 750 ZClass instances. In total, my ZODB probably has 1400-1500 ZClass
instances and I have no complaints. Between the convenience of direct
traversal to objects and the zippy searching of ZCatalog, it all works
great!
>Can I cross reference say contacts and companies stored in two separate
>Z Classes?
Though there have been a couple requests for it, there is no property type
that can directly link one object to another. There are certainly a few ways
to accomplish a similar result. In the "contacts" and "companies" example,
if there is no chance of a contact being with more than one company, you can
do this:
Company (ZClass that inherits from ObjectManager so that it can contain
other objects)
Contact (ZClass)
Then, if you refer to a Contact object, you can get to the company by using
PARENTS[1].
Kevin