"This serialization and deserialization is all well and good," you may be saying at this point, "but what can it be used for in real world web applications?" Very good question. What would be the sense of dehydrating a glass of milk just to rehydrate it and then dehydrate it again without drinking any? Never mind that it'll probably taste like the inside of your little brother's sock drawer (maybe I should have come up with a more tasty dehydrated food for this analogy). Some good uses for serialization/deserialization include:
- Storing user preferences in an object.
- Maintaining security information across pages and applications.
- Modification of XML documents without using the DOM.
- Passing an object from one application to another.
- Passing an object from one domain to another.
- Passing an object through a firewall as an XML string.
These are only a few of the many possibilities that serialization opens up for us.
Comments