Sign in to follow this  
chadsxe

What is meant by the term serialization?

Recommended Posts

What is meant by the term serialization? I think it is the actual creating of an image on a disk, correct? That way that image can be read back to create an object exactly the way it was, correct? Regards Chad

Share this post


Link to post
Share on other sites
You store all the needed information in some format, term serialization is used because it's intended to be read/written in serial fashion, whereas object relations can form graphs ( I presume ). There's also persistence, which is usually used in connection with databases, where you store object state into database, but can be stored elsewhere.

Serialization can be done into anything, byte stream, text files, for network transfer....

Share this post


Link to post
Share on other sites
taking some data (from a class for instance) and putting it into serial order -> i.e. i line/stream of bits.

Yes, often it means how to save/load a class to/from a file. But it is also sending data over the net or over a socket locally or any other reason you'd want something sent as bytes.

Basically, in memory all your pointers are just pointers. To re-create the class elsewhere you likely need all the data pointed to by those pointers and such.

-me

Share this post


Link to post
Share on other sites
Dave Eberly and Noel Llopis cover it in some of their books. Additionally if your using C# (or I believe any of the .NET languages) you can use the binary serializer that ships with the framework, does all the hardwork for you :-)

Share this post


Link to post
Share on other sites
Have you tried google?

http://en.wikipedia.org/wiki/Serialization

In computer science, in the context of data storage and transmission, serialization is the process of saving an object onto a storage medium (such as a file, or a memory buffer) or to transmit it across a network connection link, either in binary form, or in some human-readable text format such as XML. The series of bytes or the format can be used to re-create an object that is identical in its internal state to the original object (actually a clone).

This process of serializing an object is also called deflating or marshalling an object. The opposite operation, extracting a data structure from a series of bytes, is deserialization (which is also called inflating or unmarshalling).

Share this post


Link to post
Share on other sites
Quote:
Original post by BarsMonster
This process of serializing an object is also called deflating or marshalling an object.

Be careful with this definition. Marshalling generally means moving an object across a boundary of some kind, which is not quite the same thing. Although marshalling necessarily includes a serialization of some kind, it's not serialization in and of itself.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this