Brendan Tompkins [MVP]

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
De-serialization and Class Versioning

I'm usually  late to the party, but I just found a February article by Neil Davidson (of RedGate) Nine reasons not to use serialization.  If you read the article, points 2, 3, and 4 have to do with serialization not being future-proof.  I really haven't digested the whole article yet, but Neil knows his stuff, which makes me inclined to listen to what he has to say on the topic.

I'm currently running into big problems with serialization of objects to XML not being future-proof.  As he says, even small changes to your objects can break things.  Often, after refactoring a class I find that I have to clean up some serialized objects, or code around the changes. In the Java world, there's a solution to this.  Basically, it involves versioning the serialized data, so that you can safely de-serialize the class.  Does anyone know of a way to version objects like this with .NET?  I figure one of the folks that just got back from XMLDevCon might have some good ideas about this..

-Brendan


Posted 10-22-2004 1:04 PM by Brendan Tompkins

[Advertisement]

Comments

Brendan Tompkins wrote re: De-serialization and Class Versioning
on 10-22-2004 9:38 AM
Brendan Tompkins wrote re: De-serialization and Class Versioning
on 10-22-2004 9:49 AM
Here's an article from Jeff Richter that looks promising:

http://msdn.microsoft.com/msdnmag/issues/02/09/net/
Brendan Tompkins wrote re: De-serialization and Class Versioning
on 10-25-2004 3:52 AM
Just listened to the latest version of DNR, and there's a long discussion of serialization. Good news is that there's going to be some changes with the 2.0 framework that will help out with this.
Brendan Tompkins wrote re: De-serialization and Class Versioning
on 10-25-2004 3:54 AM

Add a Comment

(required)  
(optional)
(required)  
Remember Me?