[Zope] creating zope Product

Paul Winkler slinkp23@yahoo.com
Wed, 28 Nov 2001 16:00:11 -0500


On Wed, Nov 28, 2001 at 02:41:59PM -0600, Clark OBrien wrote:
> Is there some documentation that would help convert a Zope application to a
> zope product.
> I am not really sure what files a zope product needs and so on...

Search for the "Minimal" and "Boring" products on zope.org.  Both are
good examples of very simple python Zope products. (I'll note that
Boring has not been updated to use the more recent security system
described in the DevGuide, but the old system still works and it's
quite easy to switch if you want.)

I'll also add a couple things I learned the hard way: 

1) when wrapping a python class in a zope product, don't try to
directly access or modify attributes through the web. It'll eventually
cause you pain with Zope's security mechanisms. Instead, create
methods in your Product to set or get the attributes you need.

2) Read the Zope Developers' Guide section on persistence. Otherwise,
changes to Product instances will vanish if/when Zope restarts.
http://www.zope.org/Documentation/ZDG

While you're at it, read the whole DevGuide. It's good stuff.


--

paul winkler
home:  http://www.slinkp.com
music: http://www.reacharms.com
calendars: http://www.calendargalaxy.com