newbie: Zope

Martijn Faassen m.faassen at vet.uu.nl
Thu Aug 31 13:13:12 EDT 2000


Nick Trout <nick at nil_spam_videosystem.co.uk> wrote:
> Hi I've recently started to learn Zope.

Note that questions about Zope belong better on the Zope mailing
list.

> I'm having difficulty getting on the
> site today. I wondered if anyone wouldn't mind giving me a few pointers. I
> found the tutorials quite informative but then there seems be no
> "intermediate" level help. i.e., its straight in at the deep end!

What about the Zope Guides?

http://www.zope.org/Documentation

And of course there's the Zope Documentation Project's site:

http://zdp.zope.org/

> ZClasses : I assume you build up your own superclasses choosing behaviour
> that you would like from the base classes. I cannot find any information on
> what the base classes do!

I'm not quite sure if that information is available somewhere, or
whether it's mostly folklore. Lots of ZClasses don't have a base class
though. Often also they inherit from Folder or ObjectManager, to get
folderish behavior.

> DTML is horrible.

Ah, so you found out, huh? :) DTML is horrible compared to Python.
There are some guidelines to keep it simple. And move to Python
as soon as you feel your DTML becomes too horrible.

> How does persistence work for Python objects?

Basically, automatically (if you inherit from the right base classes in
Zope), as long as you treat all members of your objects as immutable.
That means that if you have an object a with a list l as an attribute:

a.l = [1, 2, 3]

And you change l by mutating it:

a.l.append(4)

The Zope object database won't detect it. You can signal it, but easier still
is just doing something like this:

l = a.l
l.append(4)
a.l = l

A very good introduction to the ZODB is here:

http://starship.python.net/crew/amk/python/writing/zodb-zeo.html

Good luck!

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list