Why entity classes to achieve serializable serial interfaces

1. The state of the object can be saved for re-create an identical copy of the storage medium after;
2. The object is sent by value from one application domain to another application domain.
 
Achieve serializable interface to the role that the object can be stored into a byte stream, can then be recovered. So if you want your object did not realize how to perform a sequence of network transport it to the network transmission have turned byte stream, so in a distributed application, you have to implement serialization, if you do not need a distributed application , then there is nothing that is necessary to achieve serialization.

Guess you like

Origin www.cnblogs.com/aiyyq/p/11871770.html