Wednesday, October 24, 2007

Dogged Support for .NET 1.1

Technorati Tags: , ,

When I'm writing NValidate, one of the things that I am adamant about is that it must support .NET 1.1.

There are a lot of developers out there who are working for companies that have software that targets .NET 1.1. Those companies have no plans to move to .NET 2.0 any time in the near future. And so, in the short term, those 1.1 applications must be maintained. Or, new applications must be written that target 1.1, because the company chooses not to spend the money on a new development suite when they already have a working development suite in house.

I'm not casting aspersions here; I'm simply telling it like it is. I'm one of those developers who is caught in a similar scenario. So I feel the pain of those developers who want to move to a more current version of the Framework, but can't.

There is very likely a vast body of .NET 1.1 code out there undergoing constant maintenance and refactoring. To ignore those developers and their plight would be (in my eyes) cruel and inhumane. For that reason, NValidate will be compiled to target both .NET 1.1 and .NET 2.0. I'm maintaining a Visual Studio 2003 project and a Visual Studio 2005 project. Both share the same files in Visual SourceSafe. (Shoot me later about my choice of source code control software.) The point is that it's the same code, targeting two different versions of the Framework.

The .NET 2.0 version is free to evolve and support things like generics. (Thank the Powers That Be for conditional compilation.) But any code that is added that would impact both versions must behave identically and deterministically.

An interesting side effect of this is that I am not free to upgrade my computer to Windows Vista. Visual Studio 2003 doesn't run under Vista; and I not only have to be able to build the software for .NET 1.1, I have to be able to test and prove that it works properly in the IDE.

Sure, I could install a virtual machine, install Windows XP into that, install Visual Studio onto that, and save the image. Then, when I wanted to test, I could restore the image, install NValidate, test, and uninstall NValidate. But why? The simple expedient of not upgrading to Vista eliminates the problem handily.

So I will continue to do what it takes to make sure that those of us who must maintain .NET 1.1 code have full access to all the features of NValidate that it makes sense for the 1.1 version to provide.