[Zope3-dev] Re: more on class/object lifecycles
Jim Fulton
jim@zope.com
Wed, 02 Jul 2003 15:55:31 -0400
Garrett Smith wrote:
> For those who skim, see <ASSERT /> below...
> ...
> Let me make some assertions, and see if there's resonance out there, or
> maybe I'm alone:
>
> <ASSERT>
> - Deleting underlying component modules should not necessarily cause an
> object deserialization to fail -- something should be able to kick in to
> recover an object state.
Right. This is mostly the case in Zope 2. There is a to-do list item
for Zope 3 for "broken object support", which is exactly this case,.
> - Adding a single property to the object scope should not require a
> complex upgrade strategy, nor should it require upgrade "cruft" to be
> added to the class.
I'm not sure what you mean by "scope" or "cruft".
To add a data attribute, all you need is to add a default
value to a class. That's really easy.
> - Changing the name of a class, method, or property should not
> necessarily causes deserialization to fail -- again, something should be
> able to recover from any errors.
Changing method or other descriptor names has no effect.
Changing class names is a bit trickier. There are fairly straightforward
ways to do this now, but you might consider them a bit crufty.
We definately want to provide some better tools for this.
Right now, there are bigger fish to fry.
> </ASSERT>
>
> While other changes may be less benign than these, I think it should be
> possible to perform a variety of updates to objects under the auspices
> of class/object evolution.
>
> Perhaps this is a hard problem, or even impossible, and I'm just
> engaging in wishful thinking. But the whole "get it right before you
> serialize" requirement (lest you're forced to run complex upgrade
> scripts, iterating over every object in the ZODB) makes iterative
> development very, very difficult and complex.
I assume that you don't have much experience with ZODB. These are
largely solved problems.
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (703) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org