Too many moving parts!

I love design patterns.  Especially the extensibility patterns like provider and plug in.  Microsoft uses these patterns all over the place in the .Net Framework.  In fact, they are in the config files for every application we write.  That being said I think things might be getting a bit too extensible.  It seems these days I'm spending more time tweaking config files than actually coding.

For example, I've converted a handful of ASP.NET applications to the 3.5 Framework lately.  The change inside of Visual Studio 2008 on my development machine is pretty simple.  Visual Studio takes care of updating the web.config file for me.  However, I don't deploy my web.config files from my dev machine to the test and production servers because the config files contain environment specific settings.  So, I have to manually update the web.config files on these servers.  This is a major pain and takes a lot of trial and error to get it right.  Time I'd rather spend pulling out my finger nails.

Another example is what it takes to get a WCF service working.  Matt Brown did a presentation at the South Colorado .NET User Group on WCF earlier this month.  He did some great demos, but about half his time was spent tweaking the config files of his applications.  I think Matt has the most experience with WCF of any one I know.  Even he had to look a few things up and ran into some config issues.  This is not a knock on him by any means.  It's just another example of how reliant we are on config files these days.

I'm not saying I'm going to quit using these patterns.  In most cases I have no choice because it's just part of the Framework.  I will, however, take extra time in the design phase of my projects to determine where extensibility fits and where a re-compile and deploy might be a better simpler option. 

Posted in Labels: , |


  1. Anonymous Says:


    I think we all go through the problem of changes for environments, etc.. Throw in security for Prod servers and then it seems it will always be a manual process in one way or another. However, the greatness thing that I've been taught in this area is automation. The easiest way to automate these kinds of changes, IMO, are with NAnt and NAntContrib. I use this as part of my Continuous Integration server but also locally as well. Nothing has worked better for me than to run a batch file or click a button and have the app deployed to a specific server with all of the setting in place, or, built based on the settings that I need for my local machine.

    Anywho, just my 2 cents.


  2. Ben H Says:

    Thanks for the comment Erik. I have to confess that I haven't used any of the NAnt products. After your comment I'm going to go check it out.