I would like some thoughts on design strategies for Zope classes. I am
developing a site that will require writing some custom classes. I would
appreciate any opinions anyone could offer. I apologize for such a long
My class will have some instance variables along with some standard Zope
subobjects. My principal concern is that, because the graphical design of
the site is still in development, I will probably be making lots of
changes to the user interface of the class. I will want those changes to
be propogated to existing instances of the class. The underlying logic,
however, should be fairly stable.
I've thought of three ways to develop the class:
1. Develop the entire class as a Zope product in Python.
The advantage I see here is that developing the application logic is
fairly straightforward with Python. I see problems, though, with the
user interface, especially if I want to make changes to it after
instantiating a few objects. It is my understanding that objects created
from a Product are not automatically updated when changes are made to
the class methods (as opposed to ZClasses, where they are). Am I correct
2. Develop the entire class as a ZClass
The principal advantage I see is that changes to the class
methods are dynamically updated in all instances of that ZClass. The
problem is that DTML is (for me, at least) a pain in the ass to write any
complicated application logic with.
3. Develop the application logic as a Product in Python, then use that
class as a mix-in class for a ZClass that implements UI logic with dtml
This seems to be the best solution (even if it is the most work). I should
get the advantage of having ZClass instances automatically update changes
to ZClass methods, while having the programability of Python for
application logic in the Product. If I do take this route, are there any
quirks I should be aware of when inheriting a ZClass from a product?
I am new to Zope and would appreciate any insight into the tradeoffs
among these three strategies.
Zope maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -