$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] boost::serialization and PHP websites
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-06-16 12:44:03
I never addressed this because I really don't know how.
If you want to create a different format - you can create your own archive 
type. I don't know what PHP classes look like.  I doubt that the library 
could support ANY exterior format, but it does manage to create xml 
compatible files.
However, once one raises the issue of EDITING an archive, there's a whole 
other kettle of fish to deal with.  Achive schema reflects the C++ class 
structure which generates them.  That's why it's totally automatic.  Any 
editor which changed archive schema would make the archive unreadable. It's 
concievable that some editing might be possible, changing values for 
example, but in general, the ability to edit files is going to be limited by 
the requirement that the archive schema not change.
It's very common for users to conclude that xml serialization means that one 
could load any general xml file.  But if you think about it, it can't be 
done.  Serialization generates the archive schema structure from the C++. 
An xml parser, generates a C++ data from any xml schema.  A man can't server 
two mistresses.  In our case, our C++ code is in charge.
Robert Ramey
> original post
Currently, I'm using boost serialization for some of my configuration files 
(XML format). Some time ago, it became necessary to edit these files using a 
web interface in PHP. As I could not think of a suitable method to 
deserialize such an XML file to PHP (with all object references, etc.), I 
wrote a C++ program generating HTML code, allowing some simple configuration 
tasks.
Even though this worked as a quick and dirty solution, I do not intend to 
support such a proprietary workaround for too long. Much more comfortable 
would it be to deserialize the XML file to PHP classes or, with JSP or 
ASP.NET websites, Java and C# classes.
Does anyone of you know of such libraries for crossing the website/C++ line? 
Or should I use another serialization library? Currently, I consider the 
boost serialization a de-facto standard for C++ serialization issues.
Thanks for any reply and best regards
Pascal Kesseli
</orginal post
KessiMC wrote:
> Guys, I consider this a serious Thread hijack :-D . If your topic
> weren't quite interesting, I would use those weapons of mass
> destruction right back at you and promote you to Head of Finance
> Dept. at General Motors :-P .
>
> So, forget my comment about boost serialization being a de-facto
> standard and so on. Do I have to interprete your hijack as a signal
> that you do not have any propositions on interpreting a serialized
> xml file in PHP?
>
> Thx & greeetz
> Pascal