CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Brendan Tompkins [MVP]

Blog First. Ask Questions Later.

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



Comments

Brendan Tompkins said:

Here's an article from Jeff Richter that looks promising:

http://msdn.microsoft.com/msdnmag/issues/02/09/net/
# October 22, 2004 9:49 AM

Brendan Tompkins said:

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.
# October 25, 2004 3:52 AM

Brendan Tompkins said:

# October 25, 2004 3:54 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Brendan Tompkins

Brendan has been programming with .NET since the first public beta and is owner and operator of Port Technology Services, a consultancy company providing .NET application development services to the Maritime industry. In July, 2007, he was awarded the Microsoft MVP award for ASP.NET. He's also a proud co-founder of failed .COM startup Intrinsigo, and has had a hand in the failure of numerous other businesses. He currently runs CodeBetter.Com and Devlicio.us, and lives in Norfolk, Virgina with his wife Tiara and son Ian.

View Brendan's profile on LinkedIn

Check out Devlicio.us!

Our Sponsors

Free Tech Publications