June 27, 2006 1 Comment
As I go through this life, I find that fewer and fewer things are black and white. This is especially true with computer programming, configuration, etc. While there may only seem to be two choices, there is often more flexibility than we see up front.
Case in point: We have just moved off of a completely insane build process at work to one driven by nAnt. For those not familiar with nAnt, it is a great XML driven build engine that is flexible enough to even handle deploymnet. If we were on Team Foundation at this time, I would opt for MSBuild instead, but that is another story.
When using nAnt, web projects can be problematic. While there are a variety of solutions that solve this problem, they are more time consuming to learn. The other option, then, is to change the web projects into class libraries. The issue here is you have to tweak the project settings to get the project to build properly to allow for debugging. Neither is insurmountable.
The false dichotomy? This is not an either or situation. With nAnt, you have the ability to peek and poke at XML files. The project file for .NET 1.1 (and 2.0 for that matter) is an XML file. The change between web and class library projects is a single attribute called ProjectType, which has the XPath of VisualStudioProjectCSHARP@ProjectType. Using an xml poke, you can change this value to local on your build server and leave the web project alone for development.
Conclusion: I am not here to say that there are all situations have more than two choices. If there were no situations with only two choices, we would not need Booleans. 🙂 But, many times we get locked into a situation where we only see two options and we should take a step back. In this particular case, none of the options were particularly difficult and none of the paths led to really bad decisions. There are situations, however, that do lead to really bad decisions.
Ciao for now!