Re: Tips: What is the magic Serializable interface does in Java?



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.


.



Relevant Pages

  • Re: Unable to pass Dictionary class instance over Webservice
    ... XML Serialization is a type of Serialization. ... Serialization are not XML Serialization, ... a stream or an array of bytes. ... serializes the data as a stream or string, ...
    (microsoft.public.dotnet.framework)
  • RE: How to xml serialize arraylist of objects?
    ... Public Class MyObject ... Controlling XML Serialization Using Attributes ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Unable to pass Dictionary class instance over Webservice
    ... XML Serialization is a type of Serialization. ... Serialization are not XML Serialization, ... a stream or an array of bytes. ... serializes the data as a stream or string, ...
    (microsoft.public.dotnet.framework)
  • Re: storing data locally?
    ... initial suspicion is that Binary serialization may be a bit faster ... > BTW there is no significant difference between binary and xml serialization ... >> the winform app will never need to interact with the original database ... I would prefer it if the local files are NOT viewable in ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Serializing a List Property
    ... WCF are Web Methods that rely on XML Serialization. ... "XML serialization" is a name for a specific technology in the .NET Framework that involves the use of the XmlSerializer class. ... you can use data contract serialization without involving any of the other features of WCF. ...
    (microsoft.public.dotnet.framework)