Concepts and Terminology - eforte/architecture GitHub Wiki
Serialization
Saving an object's state to a sequence of bytes. Only the member data within the object is written into the sequence of bytes, not the code that implements the object.
Deserialization
Rebuilding the sequence of bytes (from serialization) into a live object.
NOTE: in Java by implementing java.io.Serializable an object gets automatic serialization/deserialization capabilities without the need to implement additional logic. Behind the scenes the Java runtime uses reflexion and metadata to figure out how to serialize/deserialize the object.
Reflection and metadata which causes relatively slow performance. As an alternative java.io.Externalizable was provided. It allows introducing custom-written logic for serialization/deserialization by implementing readExternal and writeExternal methods and avoid relying on reflexion.
With Externalizable, it's mandatory to read all the field states in the exact order as they were written. Otherwise, we'll get an java.io.EOFException. Serializable does not have this requirement.
Marshalling
Marshalling implies moving the data, is about getting parameters from here to there.It does not imply transforming the data from its native representation or storage. Serializing implies transforming the data to some non-native intermediate representation