What is meant by the term serialization?

Started by
4 comments, last by kSquared 17 years ago
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
Advertisement
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....
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
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 :-)
Steven ToveySPUify | Twitter
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).

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.
- k2"Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}

This topic is closed to new replies.

Advertisement