I have seen in many web application practices that Java Beans are always serialized.
Can anybody please explain why?
Thanks in advance.
Joined: May 08, 2007
serialization is the process of converting an object into a sequence of bits so that it can be persisted on a storage medium (such as a file, or a memory buffer) or transmitted across a network connection link to be "resurrected" later in the same or another computer environment.
In a good object oriented application you use bean to store and access the data and the main purpose of serialization is to pass on or persist the data. Since the data is in your bean, you serialize them.
Joined: Apr 12, 2009
Because the specs says so .
The class should be serializable. This allows applications and frameworks to reliably save, store, and restore the bean's state in a fashion that is independent of the VM and platform.