Here at work, we have been running into a lot of issues synchronizing the default configurations provided by the developers with those that have been provided by the team responsible for packaging releases. The system as it is right now is, how shall we say, clunky, at best, requiring the developers to go back and reconfigure new features multiple times throughout an iteration, often every evening before the nightly build. This simply will not stand.
We have discussed many times the issues and some possible solutions. The developers want something they can check into source control, run diffs on, and track changes over time. The other team wants something that they can manipulate through the User Interface. We have kicked the idea around several times to make use of XML files to store the configuration, and writing methods to read and write those files based on the changes made in the UI.
This is probably a classic approach (I don’t know; in my career, I don’t think I’ve ever encountered a “classic” approach before.), but I have some misgivings. First off, XML is hard to read, and hard to write. Secondly, and perhaps a bigger issue (for me), when the framework outputs the configurations generated via the UI, it may look signifigantly different than it did before, effectively ruining the advantages of using tools like diff on the files as they change. But the biggest issue in our environment is merging the configurations coming from other teams and ours. Unless a developer does it (at least partially) by hand, the chances are high that the final product will end up as bad XML, and we are suddenly staring at the same problem we initially set out to solve.
Enter YAML. Simple on the surface, complex as you delve into it, but easy to read and write, diff or merge. I think that’s the solution to all of our problems. Problem is, I haven’t (in my ten minutes of research) yet found a good .NET implementation to read and write it.
Now, I realize that there may be something awesome out there, and if I find it, I’ll likely use it for the job at hand, but now I’ve found myself a project. Over the next couple of weeks/months/whatever, I’m going to write my own implementation of Yaml.NET.
Wish me luck!