Re: Tips: What is the magic Serializable interface does in Java?
- From: "Mike Schilling" <mscottschilling@xxxxxxxxxxx>
- Date: Tue, 25 Mar 2008 23:31:56 -0700
Lew wrote:
Mike Schilling wrote:
Arne Vajh?j wrote:
Persisting object to disk via serialization is usually a bad idea
because of the risk of incompatible changes to the class. Public
or private does not matter.
XML serialization is better because worst the XML files can be
edited (manually or programmatic).
Also because it gives the programmer more control over what's
persisted. You can design the bean properties of a serializeable
class to contain precisely what you want. And if need be, you can
completely re-implement the class while keeping the same set of
properties.
These things are true of Serializable serialization as well.
Much harder to accomplish there, though. The real problem is how
seductive it is to let all of the class's fields be serialized (with
perhaps a few obviously transient ones marked as such), and not
realize until you need to modify the class significantly just how
screwed you are.
.
- Follow-Ups:
- References:
- Tips: What is the magic Serializable interface does in Java?
- From: Venkat Sadasivam
- Re: Tips: What is the magic Serializable interface does in Java?
- From: Roedy Green
- Re: Tips: What is the magic Serializable interface does in Java?
- From: Lew
- Re: Tips: What is the magic Serializable interface does in Java?
- From: Arne Vajhøj
- Re: Tips: What is the magic Serializable interface does in Java?
- From: Lew
- Re: Tips: What is the magic Serializable interface does in Java?
- From: Arne Vajhøj
- Re: Tips: What is the magic Serializable interface does in Java?
- From: Mike Schilling
- Re: Tips: What is the magic Serializable interface does in Java?
- From: Lew
- Tips: What is the magic Serializable interface does in Java?
- Prev by Date: Re: HotJava - precisely why won't it run?
- Next by Date: Problem in executing servlets on tomcat 5.5
- Previous by thread: Re: Tips: What is the magic Serializable interface does in Java?
- Next by thread: Re: Tips: What is the magic Serializable interface does in Java?
- Index(es):
Relevant Pages
|