One of the problems that I've had learning zope 3 (and python
at the same time) is that I did not understand how code 'got
executed'.  This was a big stumbling block for someone coming
from a non-object oriented background who was used to creating
'normal' websites--i.e. the html/cfm/whatever file is the 
'callable'.  This concept, to me, doesn't exist in zope3 as
far as I can tell.

Some questions, then, regarding how parts of code get executed 
in zope3.  If anyone has the time to answer them, or confirm
my understanding, it would be appreciated.  My descriptions 
are likely oversimplified/incorrect.

1. At zope startup, each *-configure.zcml in etc/package-includes
is read.  
Q. The __init__.py file for each package is then executed, correct?
A. Yes, since my testing indicates this is the case.  I had problems
understanding this since the idiom is to just place a comment in 
the __init__ file and it seemed rather useless to a new user.

2. Each configure.zcml file in the package's root directory (the
one pointed to by the *-configure.zcml in package-includes) is
Q. Does each class referred to in a <class..> directive have
the class' entire module loaded/executed or is the class just
registered somewhere for future use?  
A. ?

3. Utilities and such in zcml.
Q. Does each utility have its module executed to create the
instance (utilities are instances, right?)
A. I think so, but I'm not sure, see #2.

I hope someone can clear this up for me.  I never managed to
find a good explanation of the flow of control for zope3 
startup and initialization.  I have read both books already.

Thanks in advance.

Zope3-users mailing list

Reply via email to