Bohdan wrote:
I believe that XML can contain any data. But i suspect that
XML garbaged with all serialization stuff will be
1. unreadeable
2. difficult to handle automatically (by other programs).
So i was thinking about simplifying Object <-> XML serialization.
Recently there were talks about ditto & relational algebra libraries.
Also there was message about stl container on disk.
As i understand at least some of these libs require special kind
of serialization: Object <-> Relational tuple (object-relational mapping).
Having such mapping it would be easy to put Relational data to XML.
And in this case XML will be very readable.
Wouldn't there be a problem with converting object with variable size?
How can you store vector<int> in a relational database? I don't see an easy way.
I know this approach has some limitations and doesn't fit very well
to serialization library design, but IMHO Object <-> relational tuple
conversion would be very useful :
1. store/retrieve object to/from relational tables (in-memory & disk
databases).
Do you think that automatic mapping is possible in case of relational database?
Of course, you might have Berkeley DB or something like that, which is
on disk map<string, string>. But in this case, Robert's serialization
library would work just fine. And BTW, I'd like to have such thing.
2. now collection of object can be represented in GUI. Ex: vector< MyObject
can be viewed and edited by user in some kind of grid.
3. putting/getting relational data to/from XML is much simpler than
object <-> XML serialization.
Consider this code:
class C {
public:
int i, j;
struct imp;
imp* pimp;
vector<int> data;
};
vector<C> c;
How will you convert "c" into a set of tables? And will that set of tables be
easy to work with?
- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost