Doubt on Serialization
-
Hi, I am stuck with one of the basic question on .Net Framework. Regarding Serialization, I know that it is the process of converting objects into a stream of bytes inorder to store the status into a storage medium. De-serialization is just the opposite. But my question is, in real time, where exactly we require the serialization? At what point of time we choose seriaization? Can anybody who knows please reply. Any help would be great. Thanks
Meeram395 :-)
-
Hi, I am stuck with one of the basic question on .Net Framework. Regarding Serialization, I know that it is the process of converting objects into a stream of bytes inorder to store the status into a storage medium. De-serialization is just the opposite. But my question is, in real time, where exactly we require the serialization? At what point of time we choose seriaization? Can anybody who knows please reply. Any help would be great. Thanks
Meeram395 :-)
Most of the time I use serialization, I am serializing objects to xml. Then this xml is saved in a sql database. Later when the order is looked at, the state of the order can be retrieved by taking the xml that was saved and de-serializing it back into the original object. Hope that helps. Ben
-
Hi, I am stuck with one of the basic question on .Net Framework. Regarding Serialization, I know that it is the process of converting objects into a stream of bytes inorder to store the status into a storage medium. De-serialization is just the opposite. But my question is, in real time, where exactly we require the serialization? At what point of time we choose seriaization? Can anybody who knows please reply. Any help would be great. Thanks
Meeram395 :-)
Serliazation is used for such things as viewstate in ASP.NET or for transport in .NET remoting or Web Services, or any other interprocess communication.
only two letters away from being an asset
-
Hi, I am stuck with one of the basic question on .Net Framework. Regarding Serialization, I know that it is the process of converting objects into a stream of bytes inorder to store the status into a storage medium. De-serialization is just the opposite. But my question is, in real time, where exactly we require the serialization? At what point of time we choose seriaization? Can anybody who knows please reply. Any help would be great. Thanks
Meeram395 :-)
Serialization is simply the act of taking an object in memory and converting it to some format that allows it's internal state to be saved (persisted) and recreated later (either a a later point in time, on a different computer, or both). Serialization is used in a lot of situations. Serialzing to XML is a way to persist the object to a databse or transfer it through remoting to another system. If you don't have a need to persist or transfer the data, then you don't need serialization.
----------------------------- In just two days, tomorrow will be yesterday.
-
Hi, I am stuck with one of the basic question on .Net Framework. Regarding Serialization, I know that it is the process of converting objects into a stream of bytes inorder to store the status into a storage medium. De-serialization is just the opposite. But my question is, in real time, where exactly we require the serialization? At what point of time we choose seriaization? Can anybody who knows please reply. Any help would be great. Thanks
Meeram395 :-)
Hi The real use of serialization is in object usages. For instance I have a object named Person. And i am keeping informations like name, address, salary etc as members of that object. Then if i need to persist it and later i need it in same form. Then we can use serialization to keep that object for future use.
Gg