WiXSetup

SDD before TDD?

David Aiken has an interesting blog post about adopting TDD (Test Driven Development, for those of you have been living in a cave) for his next project. In said blog post, David suggests that before even writing tests that one should write the setup logic.

First, I'm adopting a TDD approach. So you would think my first piece of code was a test. WRONG! My first piece of code is the installer!

Installer? - there is nothing to install. Correct. But there is still an installer project, which compiles and builds and installs pretty much nothing. (It actually installs a DLL from the 1st project - the DLL contains an empty class otherwise you cannot build an installer). I’ve decided to use WIX as the installer technology (the same as we used for DinnerNow)

David’s line of thinking goes right along with my philosophy that setup should be integrated directly into the development process. Maybe we should call this process of writing the setup project up front SDD for Setup Driven Development. <smile/>

The same way that TDD encourages the development of code that can be better unit tested, SDD would encourage the development of code that can be better deployed. I argue quite often that many of the problems developers face in setup were caused by poor design or implementation decisions early in the development lifecycle. Setup Driven Development would flush out deployment complications as soon as they were introduced into the application. Seeing the deployment issues right away better enables the developer to make a decision to address the issue by writing complex setup logic or by simplify the application’s deployment needs. I would often encourage the latter.

Hmm, maybe this Setup Driven Deployment idea isn’t so crazy after all…