Serialization means, that you persist your object into a
representation, that you can store somewhere.
One way to do so is just to take the pointer to where your object is stored in the memory and write every byte as it is to a file.
Since that representation is very specific to your programming language (and how it represents objects in the memory), an improvement would be to convert your object into a String representation which has a certain well known structure (like XML or JSON),
so that you can
a) transfer it easier
b) Store and restore it easier
c) Since everybody knows how the format is defined, any other programs can read your object, too
So putting you object into a database is just another form of serialization, too.
Deserialization means, that you can load/restore that object again from where you saved it to.
One way to do so is just to take the pointer to where your object is stored in the memory and write every byte as it is to a file.
Since that representation is very specific to your programming language (and how it represents objects in the memory), an improvement would be to convert your object into a String representation which has a certain well known structure (like XML or JSON),
so that you can
a) transfer it easier
b) Store and restore it easier
c) Since everybody knows how the format is defined, any other programs can read your object, too
So putting you object into a database is just another form of serialization, too.
Deserialization means, that you can load/restore that object again from where you saved it to.
No comments:
Post a Comment