[Zope] Newbie Questions - many-many relationships? Zope 2 or 3?

Andreas Pakulat apaku at gmx.de
Wed Jun 22 08:02:30 EDT 2005


On 22.Jun 2005 - 12:04:02, Jim Vine wrote:
> > On 21.Jun 2005 - 21:59:41, Jim Vine wrote:
> > > Say, for example that my Zope App in some way has
> > a
> > > "House" object, which records the address, the
> > owner,
> > > and a short description. Later on, I may wish to
> > add
> > > further fields to record, say, the number of
> > bedrooms,
> > > but the system is already in use - if I've
> > developed
> > > in the ZMI, will this make it harder to make an
> > > upgrade?
> > 
> > Such a change might not be a problem using ZMI, as
> > you can freely add
> > properties to any object. You'd have to supply the
> > data for all existing
> > objects though (but you'd need to do that when using
> > a product too).
> > 
> 
> OK, so there are (at least) three ways of doing things
> in Zope:
> 
> 1. Using the ZMI to build an application using
> standard objects (classes)
> 2. Creating new classes to use in your app through the
> ZMI.
> 3. Creating new classes to use in your app in Python.
> 
> Most of the Zope Book concentrates on method 1, and
> the "Extending Zope" chapter is about method 2 - it
> mentions method 3, but says that it's beyond the scope
> of the book.

See the Zope Developers Guide for a first glance at method 3.

> get my head around the implications of selecting
> method 2 or 3. Am I right in thinking that either of
> these will result in my building a "Product"?

No, method 2 aka ZClasses don't involve producing a Product. But there
were issues in the past with ZClasses AFAIK. So it might be better to
stay away from them. On the other hand quite a bunch of people reading
here are using them for their apps...

> If I want to add extra feature to my product on the development server
> and then port them to the live server (with all the data on the live
> server being left in tact), will selection of either of these
> particularly help or hinder me in this?

Hmm, my knowlegde of ZClasses is somewhat limited (as I found writing a
pyhton product easier - but then I am a programmer...), so I can only
tell you what product based apps have there. Adding new class members is
easy and running instances catch those up. Adding new properties in such
a class works too. Changing the name of properties isn't that easy,
you'd have to write a conversion function or script that runs over all
the instances and takes the value of the old property and put's it into
the new name. Adding an instance variable will also not influence your
existing instances. 

Andreas

-- 
It's a very *__UN*lucky week in which to be took dead.
		-- Churchy La Femme


More information about the Zope mailing list