What happens when the framework vanishes?

This is a response/comment to Richard’s blog entry about 3 Things to Learn from LINQ to SQL

How many times have you done work based on a particular technology only to have it vanish or be completely incompatible in the next release?

You don’t want to know how many “legacy” apps I have to support that only work in 2003 and .NET 1.1 because the library or two I used is no longer available or is completely in compatible.

I once used a .NET bluetooth serial API/Library a while back on a handheld application, the API/library was recommended by the handheld manufacturer and the various online “guru’s”. The library required a bit of un-managed code that talked to windows and the bluetooth stack and then gave you access to it through a .NET assembly with a nice easy to use, simple API. It worked great, then one day I need to ported the app to 2005 and .NET 2.0 because the new features I had to add weren’t going to be possible without tons of rework in .NET 1.1. Problem is that the new version of the little bluetooth serial library was rolled into a big mess of a library that provided everything and the KitchenSink(). Obviously at this point I did what any good programmer does… I cried, swore and then banged my head against a hard surface repeatedly… and then refactored my code to use the new API.

If my application is going to rely heavily on the framework/library/technology and its not a part of “standard” .NET (or any other thing like Java for example) then I try find an open source version of what I want, with a nice big community around it. I also check out the code for the version I’m using and dump it in the project, just in case the project goes commercial or vanishes. Which is the advantage open source technology has over a propreitory system, you can (with a lot of blood, sweat and tears) keep the library/framework working if you have too.

Obviously trusting that because it’s part of .NET it’ll be around for ever is not a good thing, Swing (in the Java World) comes to mind as something which is going the way of the dodo because Sun has decided its going another way (JavaFX). Richard is right, marketing plays a huge role in what stays around and what is going to die off.

Obviously you could abstract away what ever you’re using so that you can easily change it, but that starts becoming overkill. I’ve seen code where people abstracted so much away into DAL’s and stuff like that, that they ended up maintaining code generators to make the DAL’s and they ended up locked into there own development tools and were unable to use new technologies as it came along because they had to do too much work to change all there tools.

Is there a solution to this problem? Probably not… we’ve all been burned and are going to get burned by this problem… its why maintaining code over along period of time sucks sooooo much.