Sunday, February 17, 2008

How to choose your development Windows OS

For Windows development, the decision about which OS is pretty simple on the surface:
  • If you are developing a Windows client application, develop on the client OS release that the majority of your users are using (most likely Windows XP)
  • If you are developing an ASP.NET application, you should be developing on Windows Server, whichever release matches your deployment environment

Why do I recommend this approach? Pretty simple, as you develop you are testing your application, and my rule of thumb is develop on what you deploy to. This sounds easy on the surface, but is pretty hard in practice when you consider the configuration of the deployment environment, and how much control you have over it. Given the number of variables involved, making this choice correctly can help reduce deployment/environment bugs.

The ASP.NET case and Windows Server Case
If you're an ASP.NET developer, the choice to use Windows Server 2003 (staying on current/older Windows OSes for a minute) should be brain dead simple. Windows XP comes with IIS 5.x, Windows Server 2003 comes with the significantly different IIS 6, which is what you are going to deploy to. The IIS versions are different enough that you are not going to be able to debug deployment problems, or even tell someone how to properly configure your ASP.NET app, if you don't have Windows Server 2003 handy, and having it as your development OS is that much easier.

Configuring Windows Server for workstation use
You have to remember though that since it's Windows Server, the default configuration is designed to favor background processes and to have stuff turned off that is only important for a workstation OS, but you might want to make some changes for a better user experience. I am actually a bit conflicted about this. On the one hand, if you modify the default configuration to make it more workstation-y, you are straying from the most likely deployment target. On the other hand, you probably get a better user experience by tuning Windows Server a bit. Windows Server 2008 is just making it out of the womb. I haven't installed it anywhere yet, but MS blogger Vijayshinva Karnure has some tips for Using Windows Server 2008 as a SUPER workstation OS. I wouldn't recommend using Windows Server as a general purpose OS for consumers, a bunch of stuff is bound to act weird, mostly installers not looking for Windows Server, but I can see the rational of starting with a limited configuration and adding onto it with Windows Server as opposed to either Windows XP or Windows Vista, where the onus is still on the user to turn stuff off.

For Windows Server 2003, I have a few additional recommendations to make the experience more like a Windows client. None of these by themselves are going to make you sit up and say wow, this OS now performs so much better, and as I said you might not even want to make these changes, but I have usually chosen to make them, so here they are:
  • Change both Processor Scheduling and Memory Usage to favor Programs instead of Background services and System cache respectively. You can find this in System properties -> Performance settings -> Advanced.
  • Change File and Printer Sharing for Microsoft Networks to Minimize memory used. This is on the properties of your network connection(s).
  • Tune Windows Services. This is a dark art in and of itself. So much gets started in Windows that you might, or might not, need that a lot of people have spent considerable time through trial and error disabling as much as possible in hopes of improving the Windows experience. I have mostly given up on this, I use to spend oodles of time on this, now I just make a few selective tweaks.
    • Turn off the Indexing Service, both for IIS and SQL Server, unless you are really using them. This stuff just pounds your disk if it somehow gets triggered to index, just killing performance.
    • Turn off Computer Browser. Your really not going to use it.
    • Disable Wireless Configuration. If you are using a wired connection, or are in a VM, you don't need this running
    • Set Help and Support to Manual. How many times are you pulling up OS help? That's what I thought.
    • Set Error Reporting Service to Manual. If you get an application error, this should just startup and nag you to report something. No need for it to be running all the time
    • Enable/disable Themes according to your preference. I have turned if off and turned if back on, but in Windows Server I have it off for good.
  • Remove Internet Explorer Enhanced Security Configuration using Add/Remove Windows Components in Add or Remove Programs. It is way too annoying to use on a daily basis.
  • You already listened to Karnure and configured Server not to prompt you with the Shutdown Tracker
  • If your screen is an LCD, turn ClearType on in Display properties, Appearance, Effects.

You could keep going, and a lot of this stuff, really as much as possible, I recommend implementing in Group Policy through either a development AD domain, or at least through an OU in AD that the development machines are in. Some stuff you won't be able to set through Group Policy, but it's a great tool if you can use it to enforce more consistent configurations when that consistency doesn't cause a development problem.