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...
RobMensching.com LLC
6 Comments
Comment by Heath Stewart on Friday, August 10, 2007 8:19 AM
Unfortunately this ideal was not added to the SDK documentation and seems to have been lost forever. Treating setup as another import feature to design along with your product is definitely the right way to go. Setup as an afterthought always leads to tears.
Comment by RevFry on Friday, August 10, 2007 10:22 AM
Most of the time it was a mad dash in the last 3 weeks of the project to get an installer on it.
No love. =)
Comment by Stefan on Friday, August 10, 2007 11:29 AM
What good are rapid turn-around software development techniques if, in the end, the thing that ends up at your customer is what matters?
This goes even as far as enabling the customer to update / upgrade the current installation as painlessly as possible.
[Customer = any user of software, be it prototype / snapshot evaluators, beta testers, users of an Enterprise web application.]
What matters is: How fast and how reliably can you push your software to the customer?
Comment by Neil Sleightholm on Sunday, August 12, 2007 2:25 PM
Comment by Christopher Painter on Tuesday, August 14, 2007 7:34 AM
Comment by Stefan on Thursday, August 16, 2007 11:32 AM
I believed, for too long, that having dedicated staff who deploys code into protected (staged) environments and comprehensive deployment documentation for really simplistic deployments (of ASP.NET components) would be perfectly fine. I have been disappointed.
So I am now swinging to the other extreme and doing everything in my capability to "relieve" <cough> this staff of its responsibilities.
I have always held the opinion, by the way, that once you deliver to third parties (be it as a service provider or as a seller of shrink-wrapped software), the installation experience really matters.