Re: java serialization alternative

Ted Neward <[email protected]> Wed, 9 Jul 2008 03:05:00 -0700
Newsgroups gmane.comp.windows.devel.java.advanced
Message-ID <00b001c8e1ab$4410d470$cc327d50$@net>
> I'd argue ...
>
Yes, Bob, you do. All the time. So does Jeff. Incessantly.

Odd. I can't remember the last time Serialization caused either my feet =
to
fall off, or my code to throw a runtime exception at the worst possible
moment. Nor can I recall ever being overly fond of the idea of being =
tied to
a particular implementation, no matter how "standard" it might be.

Now, unless you two just want to whip 'em out onto the table and =
measure,
why don't we just say "every tool has a purpose", and leave it at that? =
If
Google wants to reinvent Serialization in a more statically-bound,
strongly-typed format, there are obviously cases where they found it =
useful,
and more power to them, particularly given that they've given it away to =
the
rest of the world. Perhaps Google will play nicely in the Java community =
and
open a JSR to include PB's into the JDK 7 release; perhaps not, and =
perhaps
that doesn't make a whit of difference. But watching you two bicker over
something trite that essentially reflects the fact that each of you has
drunk different Kool-Ade is really quite an inefficient use of bandwidth =
and
time.

And yes, I'm grumpy, because this is just the tip of the iceberg. Now I =
get
to watch dozens upon dozens upon hundreds of "PBs vs. Serialization vs. =
XML"
debates that will--all of them--reflect nothing more than the inherent
biases and fanboi-isms of their blog authors, when in fact the =
comparison is
apples vs. oranges vs. coconuts, and nobody will want to stop the =
shouting
long enough to realize that.

Long live the Internet!

Ted Neward
Java, .NET, XML Services
Consulting, Teaching, Speaking, Writing
http://www.tedneward.com
=20

> -----Original Message-----
> From: Discussion of advanced Java topics. [mailto:ADVANCED-
> [email protected]] On Behalf Of Bob Lee
> Sent: Tuesday, July 08, 2008 11:42 AM
> To: [email protected]
> Subject: Re: [ADVANCED-JAVA] java serialization alternative
>=20
> On Tue, Jul 8, 2008 at 11:18 AM, Jeffrey Kesselman <
> [email protected]> wrote:
>=20
> > With great power comes great responsability.
>=20
>=20
> I'd argue that PBs are more powerful. They enable you to write
> efficient
> code with less work, and they enable powerful compile time checks =
which
> aren't possible with Java serialization. Unlike serialization, PBs
> enable
> you to reliably maintain forward and backward compatibility, a
> requirement
> for most non-trivial applications. Anyone who has tried to maintain
> compatibility of serializable Java code can tell you it's an error-
> proned
> pain in the butt (mostly due to the lack of compile time checking and
> testability). My guess is that you haven't run into this problem
> yourself
> since you're building a framework and putting the onus of maintaining
> serialization compatibility on your users.
>=20
> It seems all too approriate to use a statically typed wire format with
> a
> statically typed language. Not every tool is best at something. Some
> approaches are simply indefensible. I count serialization in the =
latter
> category. If you don't, enjoy walking around without your feet, and
> I'll
> enjoy sleeping soundly at night knowing that my code works and isn't
> going
> to blow up with a runtime exception at the worst possibly moment.
>=20
> Bob
>=20
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> This list is hosted by DevelopMentor=AE  http://www.develop.com
>=20
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>=20
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 270.4.6/1540 - Release Date:
> 7/8/2008 6:33 AM
>=20

No virus found in this outgoing message.
Checked by AVG.=20
Version: 7.5.524 / Virus Database: 270.4.6/1540 - Release Date: 7/8/2008
6:33 AM
=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This list is hosted by DevelopMentor=AE  http://www.develop.com

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