• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

serialisation

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody

Serialisation s the process of writing a state of an object into a persistent medium. Why we need serialisation. I cant get thro with the above single statement.

pls clarify to me friens
Thx
 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some definitions and typical uses of Serialization might clear it up:

definitions:

1. state of an object - the values of the instance variables of the object... including the instance variables of any object-type instance variable of this object, and the instance variables held by ... see recursion.

2. persistent medium - disk file, database, etc.... something not "in memory".


Where an object is an "in-memory" concept, Serialization is the "not in memory" way to store an object, so it can be brought back into memory later, or by a different process.

examples:

1. Your app needs to shut down, and start up again later, with the same "state" (variables having the same value as before). You can write out the object-type variables to disk or a database by serializing them.

2. Your app needs to "talk to" another app across a network, and share data that are represented in-memory as objects that both apps understand. With serialization, you can send the objects across a socket connection with the other app. (Note that this example isn't about a "persistent medium",it's a different use of serialization)

Serialization is conceptually like this:



At this point, you don't have the exact same object (that is, xp and xp2 are at different memory addresses, possibly in different processes, possibly on a different server)... but you have an equivalent object, one with the exact same state.


Hope this helps,
-- Jon
 
vishvar hariraman
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Excellent Response!!!
No words...

THX A LOT JON.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic