[Zope-CMF] getting an object's factory

Shane Hathaway shane@zope.com
Wed, 26 Feb 2003 13:49:48 -0500


Mark McEahern wrote:
> [Tres Seaver]
> 
>>Serializing content to the filesystem in a general way is a tricky
>>problem.  If you have only a bounded set of content types to deal with,
>>you can usually do a pretty good job (e.g., using the 'manage_FTPGet'
>>representation should work pretty well for most of the CMFDefault's
>>content types).
> 
> 
> Thanks for the reply and the tip about getPortalTypeName.
> 
> Serializing sure is tricky.  My goal is to make a Zope Product that
> roundtrips data from Zope to the filesystem with pluggable handlers for
> arbitrary content types.  (It's inspired by FSDump.  <wink>)  I don't even
> bother with manage_FTPGet, though, because AFAIK that doesn't retain
> properties and metadata--does it?
> 
> It's very focused on the specific CMF content types we need so far.  I'm
> hoping we can release it eventually.  Need to solve the customer's needs
> first, though.
> 
> What I'm afeared of is that somehow this solution will be obsoleted by some
> deep magic in Zope3.  I need to find out what's going on there as far as
> making roundtripping between Zope and the filesystem Just Work (tm).

You may be looking for AdaptableStorage.

I've been talking about AdaptableStorage as an alternative to ZODB, but 
its components are equally useful for object export, import, 
synchronization, diffs, patching, etc.  I've been busy on customer work, 
so I haven't had a chance to finish these capabilities yet.

Rountripping is lossless by default.  It serializes objects using 
pluggable components, falling back to a serializer for any kind of 
object when the object type is not recognized.

Zope 3 is building a filesystem synchronization utility, but it might be 
transformed or obsoleted once AdaptableStorage moves to Zope 3.

Shane