Refresh Product

This product was developed to help those who, for one reason or another,
must create Python-based Zope products rather than ZClass-based products.
Someday it should be possible to do everything you need through the Web.
But until that day, this product should make things easier.

All this product does is add a 'Refresh' tab to Zope products loaded from
the file system.  It enables product authors to test changes to a product
without restarting Zope.  Note that it's best used for minor changes and
cannot be used with products that apply patches to Zope or do otherwise
complex things.

To use it, just add a text file called 'refresh.txt' to your product
directory.  You can leave the file blank or put some warning about
usage of the refresh function.  Then find your product in the control
panel and choose the 'Refresh' tab.

The difference between "full" refresh and "quick" refresh is that the full
refresh includes a three-second delay, during which time it is hoped that
all possible objects can be deactivated from the ZODB cache.  A quick
refresh is usually sufficient, but your changes may not always take effect.

You may create products which are partially refreshable.  The refresh product
itself, in fact, falls in this category: two utility functions can be
reloaded safely but the patch cannot.  In this case, add the following line
to the modules that should not be reloaded:

__reload_module__ = 0

(You can also create a method by the name of '__reload_module__' if you
want to customize the way the module is reloaded.)

Limitations

- New meta types aren't registered when products are reloaded.

- If the product is broken at the time Zope starts up, the refresh tab is
still available and functional, but your meta types will not be available.

- You still have to restart when you add a new product.

Time and resources permitting, these limitations may be investigated
further.  It may be possible to overcome them.

Shane Hathaway
shane at digicool.com
