Serialization, marshalling, etc.: Difference between revisions

From Helpful
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
Line 4: Line 4:
<!--
<!--


In programming, you often have  
In programming, you frequently have something constructed in code present in memory in a relatively symbolic presentation,
...that you want to put to disk to be able to load again later.
 
You will often need to specify how the in-memory and on-disk presentation corresponds,
 
 
"Could that not be handled for us?"
 
Some parts are made easier.
 
But in particular in OO languages, you may have created very complex object interdependencies,
and now have to specify how the serialization needs to deal with that.
 
That's not a failure of the technology,
that is an implication of just how wildly varied things you can do in programming - it just can't really know.
 
 
* things you handle not as raw data but as symbolic representations, from arrays to objects
* things you handle not as raw data but as symbolic representations, from arrays to objects
* the need to write that to disk
* the need to write that to disk
Line 12: Line 28:




 
Serialization and marshalling may have specific meanings  
Serialization and marshalling may have specific meanings in specific languages and their documentations,
in specific languages,
but over the general field of programming, there is no singular clear distinction.
in specific contexts,
 
in specific documentation,
As such, they are sometimes synonymous.
but over the general field of programming, there is no clear singular distinction, and they are sometimes synonymous.


When both are used and a distinction ''is'' made, '''marshalling''' seems to often be more specific, e.g.
When both are used and a distinction ''is'' made, '''marshalling''' seems to often be more specific, e.g.
Line 22: Line 38:
: serialization to get the exact same object back (not just write out some interesting parts)
: serialization to get the exact same object back (not just write out some interesting parts)
: serialization to be able to invoke it elsewhere  (Java, .NET)
: serialization to be able to invoke it elsewhere  (Java, .NET)
: Marhsalling also tends to more specifically address any portability issues (serialization ''may'' sometimes care to only load data into the same program on the same PC)




(deserialization, and respectively un-marshalling, are the counterpart)
(deserialization, and respectively un-marshalling, are the counterpart)





Latest revision as of 13:56, 1 July 2024