[Zope] ObjectManager example needed

Andre Meyer a.meyer at hccnet.nl
Tue Nov 25 04:31:44 EST 2003


Thanks a lot for all the comments. This helped me a lot and I made quite
some progress.

It is not impossible to use a RDBMS for this purpose and I have quite some
experience with that kind of approach. However, one of the reasons to use
Zope is that it is a much more advanced and truly OO environment. Therefore,
why not use the power and flexibility built in Zope and add more
administrative complexity using another tool like MySQL?

The approach described by Dylan seems appropriate, but it is clearly a
problem to have double references. That leads inevitably to inconsistency.
Therefore, I will try the approach using Folders and SimpleItems, where
different Folders are created for different kinds of SimpleItems (classes).
All references will be one-way only.

For now, I have added SimpleItems of different classes in the same Folder
and used the class as selection criterion for building lists. This works
very well for small amounts of items. Will it work well with many items?
Will I have to use BTreeFolder (still need to have a look at its API)?

Another issue at the moment is the referencing: I made a zpt page with a
html selection form field where the values are the ids and the names are the
titles of SimpleItems (composers in my case). This way, I can select any of
the previously added composers and store its id in the PieceOfMusic object.
The tricky part is how to retrieve the composer within a zpt page: using
here/piece/composer/title in a tal:repeat does not work! How should this be
handled?

thanks and best wishes
André

----- Original Message -----
From: "Paul Howell" <paul at smoothstone.com>
To: "Zope Mailing List" <zope at zope.org>
Sent: Tuesday, November 25, 2003 12:48 AM
Subject: Re: [Zope] ObjectManager example needed


> At 07:10 AM 11/24/2003 -0800, Dylan Reinhardt wrote:
> >On Sun, 2003-11-23 at 17:39, Paul Howell wrote:
> > > At 02:14 PM 11/23/2003 -0800, Dylan Reinhardt wrote:
> >
> >It's not hard to understand why LAMP became the dominant method of
> >creating web apps: it leveraged existing skills and assets.  But Zope
> >reflects much of what's been learned about web apps *after* LAMP caught
> >on.  You *can* use Zope as a high-octane PHP, but Zope is also capable
> >of managing data in new and more interesting ways.
> >
> >If you're more comfortable with RDBMS/LAMP development, use that.  But
> >know that there is also value to breaking that mold.
> >
> >FWIW,
> >
> >Dylan
>
>
> Thanks Dylan, I couldn't agree more.
>     In particular, I like using an object-based data approach where there
> is a lot of disparate information to gather together about a certain
> topic... for example, information related to one customer (past orders,
> preferences, personal info other than sensitive types).  Then a simple
> template without complex SQL queries can gather all the information at
once
> from the Customer object for display when that customer is with you on the
> telephone (or chat/IRC/whatever).
> =Paul
>
>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>




More information about the Zope mailing list