conceptual question: working on a separate version of a live product [was: Re: [Zope] setting up a ZClass - base class of PropertyManager?]

A M Thomas am@virtueofthesmall.com
Sun, 21 Apr 2002 21:44:26 -0400


Thank you!  Here are some followup comments:

You are right that using "OFS: Folder" as a base class lacks the
customizable "add list"; that's why I wanted to redo my base classes. 
And, yes, I saw the howto posted somewhere on zope.org, but I thought it
would be cleaner to redefine the product "from scratch", but still keep
the Class ID's so that my existing "test sites" would still work.  I did
not realize that my method was unsupported, actually (how should I have
found this out?  What have I not read?), although I did know that
redefining base classes was not going to be easy.

I did discover that it was necessary to completely delete (rather than
rename and/or change the Class ID of) the old ZClass before defining the
new one.  In case anyone else ends up trying this.

I'm pushing the limits of the web management interface, perhaps, and I
realize that - I'm trying to sort of approach Zope as a kind of "black
box" and see how far I get.  However, I have a conceptual question that
is related to this:

What's the best way to manage two "versions" of the same product on a
single Zope server?  I have an iMeme account, and I'm about to set up
maybe three web sites with the first version of my product.  However,
I'd like to continue to refine the product, without messing with my live
sites (that belong to paying clients).  Is there a generally accepted
way of doing this with only one Zope server available?  And of making
"upgrades" to the production version product easily?

Thanks,
Am


Dieter Maurer wrote:
>   3. You provide the missing registration as ZClass base
>      for "PropertyManager". It can look like this:
> 
>          from ZClasses import createZClassForBase
>          from OFS.PropertyManager import PropertyManager
> 
>          createZClassForBase(PropertyManager,globals(),
>                              'PMBase', 'Property Manager')
> 

...

>    Breaking the connection between ZInstances and the origin ZClass
>    and reconnecting as you did, is not an officially supported
>    operation (as you surely know).
>    This means, there are side effects, which an official support
>    need to take into account:
> 
>      The class id is used as a module name in "sys.modules".
> 
>      When you change the class id of a ZClass, then probably neither
>      is a new module (with the new name) created nor is the
>      old module replaced in "sys.modules".
> 
>    Try to restart and see whether the effect disappears.
> 
> Dieter