The following are the basic advantages of serialization:
·
Facilitate the transportation of an object through a network
·
Create a clone of an object
The primary disadvantage of serialization can be attributed
to the resource overhead (both the CPU and the IO devices) that is involved in
serializing and de-serializing the data and the latency issues that are
involved for transmitting the data over the network. Further, serialization is
quite slow. Moreover, XML serialization is insecure, consumes a lot of space
on the disk and it works on public members and public classes and not on the private
or internal classes. Therefore, it compels the developer to allow the class to
be accessed to the outside world.