Re: java serialization alternative

Bob Lee <[email protected]> Sun, 30 Mar 2008 11:40:22 -0700
Newsgroups gmane.comp.windows.devel.java.advanced
Message-ID <[email protected]>
Serialization sounds good in theory, but you really want to decouple
your code from its persistent state. Tools like Thrift force you to do
it. Serialization makes it easy not to do it--i.e. you really should
use the DTO pattern, but many people don't. If you couple your code
and its persistent state, you might be able to add a field here and
there, but what happens when you want to perform big refactorings and
rewrites? Your runtime classes may not match the serialized forms
anymore; serialization doesn't handle this well. To make matters
worse, the serialization format is very opaque and difficult to tool
with anything besides the original class. I think this is one of many
reasons why relational databases are still so much more popular for
long term persistence.

Bob

On Sun, Mar 30, 2008 at 11:28 AM, Bob Lee <[email protected]> wrote:
> On Sun, Mar 30, 2008 at 11:27 AM, Bob Lee <[email protected]> wrote:
>  >  I assume you could just use the IDL functionality on its own, but I
>  >  haven't used Thrift before. I've used a few similar proprietary
>  >  frameworks though.
>
>  I mean, I assume you could just use the flattenning/serialization
>  functionality on its own.
>
>  Bob
>

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

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