[Zope3-dev] Object Serialization Brainstorm

Philipp von Weitershausen philikon@gmx.net
Sat, 12 Jan 2002 19:08:34 +0100


Hi everybody,

I was just catching up with all my email after the holidays, especially the 
Zope lists, and finally got down to this thread ;).

On Friday 21 December 2001 20:52, you wrote:
> Lennart Regebro wrote:
> > From: "Casey Duncan" <c.duncan@nlada.org>
> >
> > > The key question is: Is it possible to design the system such that any
> > > object visible in the ZMI could be arbitrarily (and automatically)
> > > transformed or serialized into externally usable XML?
> >
> > Automatically? I can't see how. Even the example you give is not
> > possible to do automatically, but require the object to know how to
> > transform themselves itself into XML. How would you otherwise know that
> > the data attribute is to be tranformed into a file with an encoding?
>
> I completely agree with this, however, I really think Zope 3 should have
> better storage abstraction. I love the ZODb, but dumping pickles into XML
> or RDBMS hardly seems like an optimal solution.
> 
> How likely/possible is a decent configurable orbject/relation and/or
> object/xml mapping for Zope 3 or ZODB 4?

One small project of mine over the holidays was having a look into the ZODB. 
I haven't had one, though :(. My original idea was hacking the ZODB so it 
would store its data in XML, thus human-readable (and compatible with CVS, 
for example). I have, however, understood that it is not done by just writing 
a new Storage class (I have played with that a little, but not too much).

I also looked at how Zope does the XML export and was puzzled by its 
complication. Within a matter of two hours or so I wrote my own XML pickler, 
completely compatible with the original pickle module. Have a look at
http://www.philikon.de/files/xmlpickle.py (I am open for further hints on 
this).

I'd volunteer having a deeper look into this. I am, however, very restricted 
time-wise (you guys always say you would like to go back to school again - I 
want to get out of it!). I hope I we can have an extensive chat on this at 
the eurosprint which I just heard is going to take place before or after the 
EuroZope BBQ at beehive's in April. I am going to be there and hope we'll 
produce a lot of code and settle the "Axe DTML Document" issue ;)

See you then,

Phil


-- 
    Philipp von Weitershausen
[ *pronounce: "fun Viters-houzen" ]
     http://www.philikon.de/