I actually suggested using Xml today as a solution for expressing automated tests for the new StoryTeller engine as a short to intermediate term solution. I was immediately jumped on by my ALT.NET-loving cohorts (and if the shoes had been on the other foot I would have felt the same). The kicker was when I got the (joking) remark that “why don’t you just go for the gusto and use VB (classic VB6, not VB.Net. No hate mail, please.)?”
I spent a week pondering how to store this test data in JSON, or YAML, or natural language, or in code generated C#, or in JavaScript. This morning I spent 10 minutes explaining why all of those choices are more mechanical work than is justified. Last night I finally gave in in my own mind and realized that the Xml approach, with a dynamically generated XSD file and VS2008 Intellisense, would be the easiest and best choice in the short term both in terms of my mechanical work and the usage of the tooling.
I’m one of the most vocal detractors of Spring-style XmHell (like the kind of XmHell promoted by StructureMap circa 2004) and I’ve mocked the Xaml team for claiming that Xml is a good choice for authoring DSL’s. Yet I’m still going to use Xml to structure some data, just because it seems to make sense in this one particular case. Is there a lesson for me in all of this? Yeah, there is. Don’t throw away a solution just because it’s uncool. Maybe it even means that you should even reconsider techniques that were stupidly abused and misused before.
And if you think that this whole post reeks of self-justification, then you’re… Oh, nevermind, I’ve got some code to go write.
Posted
Thu, Oct 16 2008 10:33 AM
by
Jeremy D. Miller