[Zope3-Users] need guidance
chrism at plope.com
Tue Nov 29 23:01:12 EST 2005
On Nov 29, 2005, at 10:07 PM, Brad Allen wrote:
> Chris McDonough wrote:
>>> Here is another question. Suppose I'm working with a team of
>>> developers. Should we each set up our own separate Zope3
>>> instance, and do SVN checkouts into our own separate, local /lib/
>>> python directories inside the instance? How then would we merge
>>> any changes done in the ZODB? On the other hand, having all team
>>> members try to share a single Zope 3 instance seems unworkable...
>> I wrote a short treatise on this subject at http://www.plope.com/
>> Members/chrism/zope_collab/view that you may want to take a look at.
>> It's written with Zope 2 in mind but the issues and mechanics
>> remain the same.
> Ok, so this kind of discussion makes me wonder how much I can do
> without ZODB, or at least whether I can just use the ZODB files
> like any other binary files in the SVN repository. Having to write
> scripts to regenerate them sounds like a lot of ass-ache.
Hehe. I like that description. ;-) Yes, it is. Although there is
at least one tool that helps with just this called GenericSetup for
Zope 2. I suspect that tool could be made to work with Zope 3 with
a bit of work.
> Is there any reason why I can't just check in those data.fs files
> into SVN along with my Python packages, so that other team members
> can check them out into their respective Zope instances?
No, as long as your code matches the pickles in the database binary
stored in CVS. The problems start when you need to change the code
in a way that makes the pickles in the database incompatible with the
code; for example if you need to change the name of an instance
attribute in one of your classes; the pickles have the values stored
in the old attribute name and your new code expects the new attribute
name. So the code fails on the old data. This is of course the same
problem you have when you need to change the schema of a relational
database and you have an existing database instance. That said, Zope
3 comes with a tool named "generations" that allows you to evolve
database pickles in a uniform way by writing evolution scripts.
More information about the Zope3-users