[Zope] Zope.org Z Classes (was: contributed zclass)

Mike Pelletier mike@digicool.com
Thu, 23 Sep 1999 10:54:19 -0400 (EDT)


On Fri, 17 Sep 1999, Tom Schwaller wrote:

> I would personally be very glad to see as much examples as possible,
> just to see if what I'm doing now is the "right thing".
> Most interesting would be so see the zclasses used on zope.org:18200
> (is there a chance to get an export of the Product(s), even if
> they are not polished).

    I understand that the Z Classes we are using (or a set of similar
classes) will be made available as a part of the much alluded to,
semi-legendary PTK.  It seems unlikely to me that the Z Classes we are
using will be released before that.  I'm afraid I don't know enough to
give a useful ETA, but it _IS_ coming, and it _IS_ very slick!  <tease
tease>

> That's why the Zope.org zclasses would help  me and other people 
> a lot I suppose, because there you have e.g. the same dichotomy
> 
> members/How-to
> how-tos/(from) members
> 
> connected by ZCatalog, but seeing is better than guessing in that case.

    If I can't actually show you how the Z Classes on Zope.org work,
perhaps I can explain what the 'Zope.org way' to tackle your problem would
be.

    On Zope.org, all content (okay, almost all, but forget about that for
the moment) is owned by a Member, who is responsible for it.  The content
is all contained in the folder of the Member who owns it.  That means the
location is irrelevant to the content-- all our HowTos for instance are
scattered willy-nilly throughout our much-appreciated Member's folders,
not unlike your author's folders.

    When you go to /Documentation/How-To, you are shown a list of all the
HowTos members have submitted to the Catalog.  These HowTos are all still
'physically' located in each of the Membership folders.  The Z Catalog
allows us to present them all in one place, simply by asking the Z Catalog
for everything who's meta_type is HowTo.  You could do the same thing for
magazine issues:  Add an 'issue' property to your article objects, and
then add a 'FieldIndex' index called 'issue' to your Z Catalog.

    Once you have that, you can build a simple Issue object that knows how
to ask the Z Catalog for all objects belonging to a given issue, and
present them in a nice periodical format.  It could even be smart enough
to translate the paths you want to use (like my.zine.com/issues/01/02)
into a search for items belonging to issue 01, volume 02, or what have
you.

    Hope that sheds a shaft of illumination for you.

Mike.

-- 
Mike Pelletier                          email: mike@digicool.com
Mild mannered software developer          icq: 7127228
by day, super villain by night.         phone: 519-884-2434