XCopy and IIS

I’ve always wanted to mention Quake 2 on here, so here goes.

One of the big advantages .NET brought to desktop applications,at least in regards to official Microsoft dogma,was XCopy deployments: Instead of long, convoluted setupsinstalling dozens of components into the system, shared librariesinto system folders, and registry settings in the registry (andmaybe some win.ini settings for real historical fun), XCopy allowsyou to build applications that can be “installed” by simply copyinga folder.

Everything old is new again. Years back this was the DOS way,and in many cases it’s still the UNIX way.

Some time back my favourite game on the Windows platform — Idid, and though the time is extraordinarily rare still do, play”shooter” games — was Quake2, in particular with the ActionQuakemod. This game lived in my computing ecosystem for quite awhile, not only because it was great fun, but also because theapplication existed as a directory “island” of sorts: JohnCarmack and crew had disregarded the Windows developer guidelines,ignoring centralized libraries, components, and registry settings,and stored settings in little config files in the applicationdirectory, with mods, extensions and libraries appeared in thatdirectory or subdirectories.

I could “install” the application on a new machine, includingall of my settings and extensions, just by copying the Quake2directory to the new PC. Similarly, if I installed a new harddriveI could move it there and it was fully functional immediately. Nocomplaints about missing libraries, or ridiculous dependencies uponfixed drive letters or fixed paths.

It just worked, and happily adapted to wherever it founditself.

This seemingly trivial “feature” made this application live onmy hard drive far longer than it would have otherwise. Without thehassle of reinstalling the app everytime I upgraded machines orreinstalled the OS —  a nuisance that led to many appsgetting left behind — which would also have meantreinstalling all of the patches and mods, and then laboriousreconfiguring the settings to a close proximity of my tastes, itjust migrated with me. It was always there waiting to provide aquick diversion during a time of thought.

With XCopy deployment, Microsoft has shown that they’ve seen thelight, and have realized that the whole “tentacles throughout thesystem” approach has been a terrible mistake.

With IIS 7 we might finally see the same sort of benefit for webapplications. As it is IIS is a bit of a mixed-up configurationmess, with many directory-specific settings being stored in the IISmetabase existing somewhere else (on Windows 2003 it’s aconvenient, well-documented XML file that you can find at%sysdir%\\inetsrv\\metabase.xml) — mime types, directoryand file security, where virtual directories/web apps start, cachesettings, etc. With IIS you can’t simply XCopy the app and havefull configuration, but instead you have to have appropriatepermissions (generally administratrive) to open the IISadministrative console and set, for instance, that your CSS filesshould be cacheable for a day but the frequently rewritten XML fileshouldn’t be cached all, which tells IIS to add the appropriateHTTP headers to each.

Compare this to Apache, which lets you configure the vastmajority of directory and file specific settings via.htaccess files in each directory, saving the “systemwide” httpd.conf for settings that are truly web serverwide. Configuration is logical and single point, and an applicationcan be migrated with virtually all related setup withtremendous ease. A remote developer with access to only hisfolder of the web app has the ability to configure things as theyshould be configured without ridiculously requiring administrativerights.

IIS 7 adds this sort of functionality, moving a lot of thevirtual directory and folder/file settings into files that you putin your web app file structure (obviously it won’t, or rather won’tunder ideal conditions, allow these files to be read by web users).No more hydra-setup where half the setup exists over there and halfexists over here.

Everything old is new again.