On May 1, 2007, at 3:08 PM, Derek Watson wrote:
> I feel like I'm repeating work here -- I've got a similar set of
> functions that serialize and restore trees of objects, only I'm doing
> this in a very specific way, keeping only what I want from specific
> classes (not reusable).
>
> What are the chances of this object_tree code making it into 0.764 or
> even 0.765? Would you care to share your code in advance? I would
> surely use it.
The object tree as I've coded it is for converting RoseDB objects
into/from JSON and YAML via an intermediary perl hash format.
ie:
my $obj= bless { id=> 1 , __xrdbo__x=>'a' }, MyApp::Rose:: Object
my %hash= $obj->object_tree_as_hash()
my $as_json= object_tree_as_json()
my $obj= Rose::DB::Object::object_tree_from_json( $as_json );
my $obj= Rose::DB::Object::object_tree_from_hash( \%hash);
what you want sounds more like John's strip() method which is now in SVN
strip will let you serialize trees of objects , with the ability to
preserve certain things.
strip is significantly faster than the methods I'm developing -- it
just kills the bloat so you can pop an object into memcached.
my methods are designed to convert an object into something that
other languages can use-- i.e. my main application server is in Perl,
but there are certain sections that are programmed in Python and
PHP. instead of constantly loading data in multiple languages, I
have Perl ( specifically Rose ) do all of the db management , and
populate a memcached store with data that other languages consume.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object