s11n 1.2.4 review

Download
by rbytes.net on

s11n (an abbreviation for serialization) is an Open Source project focused on the generic serialization of objects (i.e., object pers

License: Public Domain
File size: 0K
Developer: Stephan Beal
0 stars award from rbytes.net

s11n (an abbreviation for serialization) is an Open Source project focused on the generic serialization of objects (i.e., object persistence) in the C++ programming language.

s11n library, appropriately named libs11n, can easily serialize all manner of PODs (Plain Old Data types), most STL containers, and user-defined Serializable types.

By taking advantage of relatively new, advanced C++ techniques s11n turns this formerly-difficult task into child's play. It supports literally hundreds of millions of combinations of standard containers out of the box. libs11n is 100% data-format agnostic, and currently includes support for 7 formats, including 3 XML flavours.

(As far as i am aware, this exceeds support provided by any other serialization framework, regardless of the implementation language!)

Here are some key features of "s11n":
Provides client code with easy de/serialization of arbitrary streamable types, user-defined Serializable types and various STL containers.
Most STL containers can be serialized with no special client-side work, as long as all contained types are either Serializable or are of a supported container type. e.g., std::map is serializable as long as MySerializable is.
Does not tie clients to a specific serializable interface/heirarchy. The internally-used interfaces can be easily directed to use client-specific serializable interfaces, which means that the library can be made to conform to your projects, as opposed to your projects conforming to it.
User types can be made serializable "intrusively" - by implementing serialization opertors - or via proxying, in which case they need know nothing about s11n.
Serializer proxies can be written for almost any classes. For example, Qt objects can be serialized via this library without changing those objects. Proxies allow almost any type to be serialized without the object knowing it is participating in serialization.
Lends itself well to a large number of uses, from de/serializing arbitrary vectors or maps of data (a-la config files) to saving whole applications in one go (the amount of code is the same for the client, either way).
API is 100% data-format agnostic. Several different data format handlers are provided with the library, and adding your own is fairly painless. If you use s11nlite, as opposed to the core library, then you never even need to know what format your data is saved in.
Optional client-transparent zlib and bz2lib file de/compression (for amazing file size reduction).
A weird and wonderful classloader.
The model inherently does not suffer (as, e.g., Java's does) from the problem of invalidating serialized data every time an internal change is made to a serializable data type. It's properties-based system ensures that data do not become un-deserializable until the developer wants them to become so. It also ensures that clients written in different programming languages can deserializer your data, provided they have a way of converting the class types to local implementations. (Naturally, they can always read the raw data, without deserializing it, without any special support.)
By implementing an API front-end - like the included s11nlite namespace - client objects can be made 100% ignorant of the s11n core, enhancing non-intrusivity. This can also be used to factor all of the necessary APIs into one client-side namespace for easy access from client code.

Requirements:
Recent, ISO-conformant C++ compiler. Only tested with with GNU gcc 3.{2,3,4}.x, and will not work with gcc 2.9x.
GNU versions of most common Unix system tools, like make, find, bash, etc.
Only tested on Linux systems. Your mileage may vary on other OSes. That said, it uses no Linux-specific source code, but the build tree itself is very GNU-centric. That said, it is reported, by the Debian team, to build on at least 11(!!!) different Unix-like platforms (that tickles me pink, really).
Either libdl or libltdl. These are used for opening DLLs, and are pre-installed on all modern Unix-like environments.

s11n 1.2.4 keywords