<pedrocorreia.net ⁄>
 

<Introducing Serialization in .NET ⁄ >




clicks: 695 695 2006-10-08 2006-10-08 goto programacao myNews programacao  Bookmark This Bookmark This


Serialization is a process of converting an object into a stream of data so that it can be is easily transmittable over the network or can be continued in a persistent storage location. This storage location can be a physical file, database or ASP.NET Cache. Serialization is the technology that enables an object to be converted into a linear stream of data that can be easily passed across process boundaries and machines. This stream of data needs to be in a format that can be understood by both ends of a communication channel so that the object can be serialized and reconstructed easily. The advantage of serialization is the ability to transmit data across the network in a cross-platform-compatible format, as well as saving it in a persistent or non-persistent storage medium in a non-proprietary format. Serialization is used by Remoting, Web Services SOAP for transmitting data between a server and a client. De-serialization is the reverse; it is the process of reconstructing the same object later. The Remoting technology of .NET makes use of serialization to pass objects by value from one application domain to another. In this article I will discuss .NET's support for Serialization and how we can build a class that supports custom serialization.

What is Serialization and De-serialization?
Serialization is the process of saving the state of an object in a persistent storage media by converting the object to a linear stream of bytes. The object can be persisted to a file, a database or even in the memory. The reverse process of serialization is known as de-serialization and enables us to re-construct the object from the previously serialized instance of the same in the persistent or non-persistent storage media.

Serialization in .NET is provided by the System.Runtime.Serialization namespace. This namespace contains an interface called IFormatter which in turn contains the methods Serialize and De-serialize that can be used to save and load data to and from a stream. In order to implement serialization in .NET, we basically require a stream and a formatter. While the stream acts as a container for the serialized object(s), the formatter is used to serialize these objects onto the stream.

The basic advantage of serialization is the ability of an object to be serialized into a persistent or a non-persistent storage media and then reconstructing the same object if required at a later point of time by de-serializing the object. Remoting and Web Services depend heavily on Serialization and De-serialization



este é só um excerto do artigo, para aceder ao artigo completo, clique no link em baixo:
this is just a small excerpt from the article, to access the full article please click in the link below:

http://aspalliance.com/983




Subscribe News RSS  Subscribe News Updates by E-mail





myNews <myNews show="rand" cat="programacao" ⁄>

Android Intents - Tutorial

Intents allow the application to request and / or provide services . For example (...)

clicks: 42 42 2010-07-30 2010-07-30 goto url (new window) vogella.de/arti... goto myNews programacao


JavaScriptSerializer - Dictionary to JSON Serialization and Deserialization

Few weeks ago I was working with the JavaScriptSerializer for serializing objec (...)

clicks: 43 43 2010-07-29 2010-07-29 goto url (new window) weblogs.asp.net... goto myNews programacao


Android Development - Hierarchy Viewer

The Android SDK comes with a wide variety of tool that are intended to help deve (...)

clicks: 43 43 2010-07-29 2010-07-29 goto url (new window) barebonescoder.... goto myNews programacao


Memoizing higher-order functions

Memoization incrementally converts functions into data structures. It pays off w (...)

clicks: 36 36 2010-07-29 2010-07-29 goto url (new window) conal.net/blog/... goto myNews programacao


20+ Required Windows Apps: Web Designer's Choice

In April, Jeffrey Way gave us a list of the "20 Mac Apps You'll Use Every Day." (...)

clicks: 56 56 2010-07-28 2010-07-28 goto url (new window) net.tutsplus.co... goto myNews programacao


Introducing ASP.NET MVC 3 (Preview 1)

This morning we posted the "Preview 1" release of ASP.NET MVC 3. You can downlo (...)

clicks: 80 80 2010-07-28 2010-07-28 goto url (new window) weblogs.asp.net... goto myNews programacao


Uploading a File (Or Files) With ASP.NET MVC

I wanted to confirm something about how to upload a file or set of files with AS (...)

clicks: 76 76 2010-07-27 2010-07-27 goto url (new window) haacked.com/arc... goto myNews programacao


Android - Multithreading For Performance

A good practice in creating responsive applications is to make sure your main UI (...)

clicks: 45 45 2010-07-27 2010-07-27 goto url (new window) android-develop... goto myNews programacao