What are the advantages and disadvantags of serialization?
Location: http://www.jguru.com/faq/view.jsp?EID=5068 Created: Jan 15, 2000 Author: Govind Seshadri (http://www.jguru.com/guru/viewbio.jsp?EID=14) The advantages of serialization are: • It is easy to use and can be customized. • The serialized stream can be encrypted, authenticated and compressed, supporting the needs of secure Java computing. • Serialized classes can support coherent versioning and are flexible enough to allow gradual evolution of your application’s object schema. • Serialization can also be used as a mechanism for exchanging objects between Java and C++ libraries, using third party vendor libraries (like RogueWave’s Tools.h++ ) within C++. • There are simply too many critical technologies that rely upon serialization, including RMI, JavaBeans and EJB. However, serialization has some disadvantages too: • It should ideally not be used with large-sized objects, as it offers significant overhead. Large objects also significantly increase the memory requirements of your ap