• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serialization and persistance

 
Neo Phesus
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello folks,

Here I am with another question..I am not sure if I sound so dumb

Persistence by which I think, we make the state/value of the object to be persistant across the application. Database is kind of persistance or even writing a file is kind of persistence. I also have an assumption like persistance means that when I power down and power up the machine in which I am running the application, I am still able to retain the values.

Now if my above assumptions/learnings are true, Is serialization a way of persistance? If so whats the difference between serialization and peristance. Or Am I missing some link here...

If its a real dumb question, please excuse me...But I am sure these questions are common in learning phase

Thanks in advance.

Regards,
Neo
 
Henry Wong
author
Marshal
Pie
Posts: 21185
80
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now if my above assumptions/learnings are true, Is serialization a way of persistance? If so whats the difference between serialization and peristance. Or Am I missing some link here...


Serialization is the conversion of an instance to a datastream, and back. There are a few reasons for this. First, it could be so that the object can be transferred across the network. Second, it may be for persistence, so that it may be saved.

Persistance whether to a database, file, or any other store, requires the data to be in a format that can be stored and retrieved. Serialization helps convert objects into such a format.

Henry
 
Anupam Sinha
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Atleast to me serialization seems like persistence only to me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic