The two terms are very very similar, and often treated the same. Quite few responds on various forums contradict each other, which made me a bit confused. So to make it clear for my self I decided to summarize what i understood from the resources I have read on the Internet:
- Technique of converting a state of an object (or object instance in different words) into a byte stream.
- To send object over the network, it needs to be serialized first, thus converted into to a sequence of bytes.
- Technique of encoding an object to send it over the network and decoding it on the other end. Which is stub and skeleton mechanism, where stub is the local client and skeleton is the remote server.
- Besides the object state, marshalling also records codebases.
- Marshalling is used for sending objects through sockets. Off course objects must be serialized serialized before sending over the network.
- Marshalling is a way to create byte stream so that the copy of the original object can be recreated on the other side. When object is “unmarshalled” on the other side, object’s class definitions are loaded.
- Marshalling is a form of serialization, thats why I think some people treat teh two the same.
Thats it… I think… Did I miss something?