hide all comments


Microsoft DSLs + UML = ???

August 15, 2008 12:36:01 +0300 (EEST)

As you will no doubt have heard, Microsoft is planning on including more UML support in Visual Studio. Adding UML support is of course fine: MetaEdit+ has included UML support since the first version, and currently has ten different UML diagram types. The big question is how Microsoft intends UML to be used. In a blog post, DSL + UML = Pragmatic Modeling, Microsoft's Cameron Skinner tries to explain:

UML is great for describing higher level concepts and for defining the initial glossary that can be used to describe the concepts necessary to facilitate broader communication. For those folks who have decided on an implementation strategy, and do not want to be encumbered by the more general nature of the UML to describe that implementation choice, use DSLs.

That's surprising to me. I'd always thought of UML as being more specific about implementation choices than DSLs -- e.g. the restriction to an object-oriented language, and the individual classes, fields and methods of an implementation specified directly in the models. DSM languages are almost invariably on a higher level of abstraction than UML. The only part of UML that is on a high level of abstraction is the Use Case diagram, and that's only at the total loss of precision. It's hard to see how anyone could mistake, say, the individual method calls of a Sequence diagram as being on a higher level of abstraction than DSM languages. Chapter 1 of our Domain-Specific Modeling book shows the same application described in UML models or built in a DSM language (pp 7-15), and I don't think there's any real competition as to which describes the application on a higher level -- yet with sufficient precision that the working app can be generated from the models. Cameron owes us some more explanation:

In the coming months, you will very likely hear me or others on the team talk about using UML at the "logical" layer and DSLs at the "physical" layer. [and from an answer in the comments:] start with a logical class diagram, then transform that into a DSL that is specific to you implementation or domain choice. Said in another way, the logical designers are meant to describe higher level, more general constructs, while the physical more about how to realize those higher level ideas.

Now things start to become a little clearer! The UML models are being used like MDA's PIMs, and the DSL models are the PSMs. The DSLs are thus not specific to the problem domain, as they should be, but to the solution domain: they have the implementation concepts of a particular Microsoft framework or library. (I've blogged earlier about the problems of such framework-based DSLs.) Putting UML before DSLs in this way isn't just putting the cart before the horse: it's putting the horse firmly into the cart -- and pulling it yourself.

What makes this all the more ironic is how eager Microsoft were to put the boot into UML and MDA back at the start of the DSL Tools project. If you want to look back at calm, polite, reasoned discussions, try Microsoft's Alan Cameron Wills' and IBM's Simon Johnston's blog posts. If you want to see the big guns fighting it out with good old FUD-slinging, try Steve Cook vs. Grady Booch (Dec 3, 2004). Interestingly, neither Alan nor Steve are part of the DSL Tools team anymore. I'm not quite sure what to make of the fact that Steve has moved to Cameron Skinner's team, to work on their architect tools, including the new UML tools. One thing's for sure: Steve Cook will face some interesting questions on panel discussions in the future!


A not-so-short reaction

[Johan den Haan] August 20, 2008 13:06:35 +0300 (EEST)

Hi Steven,

Nice post. I agree with most of your statements, I only think framework DSLs aren't always a bad thing. See DSL in the context of UML and GPL for my full reaction (a bid long to post in a comment ;) ).

Framework-based DSLs

[ Steven Kelly] August 21, 2008 16:37:32 +0300 (EEST)

Comment by Steven Kelly

Hi Johan, and thanks for an interesting article. It's always reassuring to see smart people coming to the same conclusions as I have. I agree there are situations where framework-based DSLs make sense, and that one of the major criteria for such situations is the cost-benefit analysis. This analysis is very different if you want to sell your DSL (as you do at Mendix) rather than use it yourself. I've written more in a new blog entry, DSLs: to buy, to build or to sell?