Zope Products newbie question.

Istvan Albert ialbert at mailblocks.com
Thu Jul 22 09:25:15 EDT 2004


mir nazim wrote:

>     Now the problem is that I am confused how to implement these
> classes. Should I implement them as ZClass or in External methods or
> as a Zope Product. Please Clarify. Also tell me how, actually, am I
> supposed to start. small code sample can be a of great help. Links to
> similar free projects undertaken on zope can be useful.

Here is what I do, your mileage may vary.

I develop "standard" python classes for all the functionality
that has nothing to do with the display (business logic).
I develop, test and re-use these classes without Zope.

I deploy these classes in the module path of the python that
runs zope and I make them available in Zope (needs a few lines).

These classes can be now stored in sessions, used in python scripts etc.
Everything is managed by python scripts. These create and
prepare the classes then call Zope page templates and pass down these
objects as parameters of the templates. This way is clear from
the arguments what any given page can and cannot display.

It is a very clean architecture that repeatedly surprises me  by
its long term maintainability.

I have puttered around for very long with dtml, external methods and
ZClasses, these features are great for "hooking" PHP or JSP minded people
(in fact this is how I got interested originally) but I would never touch
them anymore.

I.




More information about the Python-list mailing list