Skip to content

Why another template engine

tobiaszuercher edited this page Sep 17, 2014 · 1 revision

Why another tool

I don't like web config tranformations from Microsoft for several reasons but I don't want to bash it too much now. I had a lot of pain with it and prefer to not use it anymore. You probably also had troubles with it, that's why you are reading this article now, right? :) Transformer is an opiniated way of how to do config transformations. I'm open for any proposal, questions or critism.

Some points i don't like with ms webconfig transformations:

  • designed for xml files
  • coupled to xsd (in Visual Studio)
  • the syntax is too verbose & complex (Yes it really is!). The template should be much easier to read.
  • it's connected to the "Configuration Manager"
  • while comparing two different config's: there is too much noise
  • weird error messages if something goes wrong

A lot of blogposts show how to add "dev", "test" & "prod" to the config manager and do then the web config transforms (if they are not in the solution configuration, you don't get the "Add config transform menu entry"). Environment configurations shouldn't be connected to the build.

There are other awesome products like OctopusDeploy or the Redgate Deplyoment Manager. They also include a variable resolve mechanism or use Microsofts Web Config Transform. But for me as a developer, those tools are too far away or probably I don't even have access to it. The whole configuartion stuff should be closer to the developer so he can deliver a complete feature with configurations. It's also nice to have some simple features like defining default values, be able to define or inherit variables to reduce data duplication.

The pro's:

  • Environment configuration in source control: versioned, diffable, history
  • Easy readable xml file
  • Easy reachable by all developers
  • Production passwords can safely be encrypted

PowerDeploy can easily be integrated in other tools. TODO: Link to article how to integrate

Clone this wiki locally