Re: java serialization alternative

Bob Lee <[email protected]> Fri, 4 Apr 2008 09:56:03 -0700
Newsgroups gmane.comp.windows.devel.java.advanced
Message-ID <[email protected]>
2008/4/4 Ted Neward <[email protected]>:
>  Um.... No. Just because it's in XML doesn't mean it's readable--after all,
>  have you *seen* what a .NET DataSet turns into when it's serialized?
>  *shudder* Don't even TRY to go at this with XPath. Ditto for the original
>  SOAP (0.25 version) formats. Angle brackets do NOT make everything better.

Well, I wouldn't recommend using a *crappy* XML-based framework. :-)
Saying that some XML frameworks are crappy and opaque isn't a good
counterargument--some are decent.

>  The serialization format is well-known, and relatively easy to reverse
>  directly from binary if you want/need to. Just because it's binary doesn't
>  mean it's bad.

I love binary, but plain text protocols are typically easier to work
with (see Pragmatic Programmer). "Relatively easy" is relative. It's
actually impossible to reverse some parts of a serialization stream
automatically (namely the optional data--all you can get is a stream
of objects mixed with opaque chunks of bytes). Serialization embeds
some of the structural information directly in the stream with every
piece of data (talk about inefficient), and you're supposed to
document the remaining parts in Javadoc (not very tool friendly).

I'd just assume keep the structural information all together on its
own and enable powerful tooling and efficient data.

>  Arguing for Cloneable in its Java 1.0 incarnation form, you're right.
>  Arguing for a marker interface that extracts "cloneability" into a separate
>  concern, that would seem to be a good thing, to me.

Right. I'm arguing against an implementation, not a concept, and for a
better concept.

Bob

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com