Microsoft and DSLs @ OOPSLA

Microsoft gave a demo of their Software Factories & DSL tools and philosophy over at OOPSLA. It would be great to see the slides but as far as I can see they aren't available online.

I want to love the DSL approach, but I still haven't seen enough examples and detailed discussion to be convinced.

I'd be happy to hear what others think about the UML vs. DSL controversy.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Why choose?

Einar Karttunen has a neat example of stream processor Arrows that draw themselves by writing out graphviz data.

At least for the 'Blueprinter' contingent of UML users, this would be perfect solution, DSL code that draws its own summary.

As Einar said:
A modelling language is a DSL.
Now normally one models a problem with a modelling language and then implements it in a host language.

With self drawing arrows we have a DSL which serves the double purpose of modelling itself.


Shae Erisson -

Much easier in Haskell...

Much easier in haskell than in C++! I've been working on a large C++ project where I was required to produce excruciatingly detailed UML class diagrams. I hate working in point-n-click mode, so I came up with a shorthand text description for C++ classes (a very simple DSL I guess) and wrote a parser in scheme that spat out graphviz code to draw the diagrams.

I then added another backend to the parser to spit out the header files and function stubs for the C++ code.

For some strange reason, my part of the project was done a lot quicker than everybody else's... some were still playing with their UML diagrams when I had working code :)

Reverse engineer C++ to UML?

Is there some reason you were unable to simply write the C++ code, and have your UML tool reverse-engineer the diagrams? I think that you would produce working code as quickly as possible, and still satisfy the "excruciatingly detailed UML" requirement.


Those kinds of tools have one good use: taking an old project and getting some UML diagrams made for it quickly.

Any other use is an abuse of UML. However, requireing excurciating detail is also an abuse of UML. This is a modeling language. You use a model because the complete system is too complex to consider all at once. If you're "modeling" every last detail, it's not a model anymore.

There are some people who want to use UML as a programming language, and I can understand in that case why you would need to specify every last detail. I do not agree with this goal, but that's another discussion.

a coworker doesn't understand why I hate UML

He was all surprised, he said:
"why don't you like UML, you can program in it" (danish people speaking english don't necessarily mean exactly what they say, they only mean pretty close to what they say.)

He didn't understand that was the exact reason I hate UML

reverse engineering less fun than scheme

I could have done that, but writing the C++ headers by hand and then using a UML tool was more work and less fun than writing scheme code to generate both at once :) And this way, I have a scheme (pun intended) that allows me to produce hundreds of lines of C++ class headers and function stubs from only a few lines for scheme.

For example, if I can specify that a variable is private, and has a public accessor function that returns a const ref to it in one short line of scheme, that generates about 5-10 lines of C++ with comments.

It saves me a lot of typing, that's all.