Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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.
 
WARNING! Do not activate jet boots indoors or you will see a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic