Re: java serialization alternative

Bob Lee <[email protected]> Tue, 8 Jul 2008 11:42:07 -0700
Newsgroups gmane.comp.windows.devel.java.advanced
Message-ID <[email protected]>
On Tue, Jul 8, 2008 at 11:18 AM, Jeffrey Kesselman <
[email protected]> wrote:

> With great power comes great responsability.


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.

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.

Bob

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

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