Should DSL use UML

I have been quietly following the ongoing conversations regarding Domain Specific Languages (DSL) and whether UML should be used as the mechanism to describe them.  My UML and DSL knowledge is not nearly as deep as some of my colleagues, but I believe that the noise level from this space will only increase over the next 12-18 months.

As part of my blog reading (via Don Box), I came across a number of postings from Grady Booch and Alan Cameron Wills talking about both sides of the issue. But to me, the most interesting part was actually in one of the comments to Alan's post.  Specifically, Lloyd Fischer says:

Anyway, we spent a lot of time thinking about visual representations of software. It turned out that the times we were successful was when the system in question *already* had a visual representaion. Examples are piping and instrumentation diagrams, electronic schematic diagrams, ladder logic diagrams, etc.

In those cases where we tried to create new visual representations we failed. The "business users" invariably rejected our attempts to turn their knowledge into diagrams because they were unnatural to experts in the field. The fact that they had not yet created such diagrams was a telling sign that no such representation was possible. Those fields where such representations were useful had long ago created them.

That is probably the best argument in favor of using something *other* than UML to describe DSLs that I have heard.  That UML (or diagrams, in their world) doesn't fit with the mental model that the domain experts already have is very telling.  After all, the experts aren't constrained by anything when it comes to describing their world outside the realm of software.  They have white board, diagramming tools, everying that a designer would need.  If that was the way they wanted to go, they'd already be there.  And yet they're not.  I think this is one case where we need to listen to the experts and find a way to represent the mental model that they have spent years developing.  Seems more productive than forcing our way upon them.

Comments

  • bruce January 14, 2005 5:47 AM

    Bruce, you said:
    > After all, the experts aren't constrained by anything when it comes to describing their world outside the realm of software. They have white board, diagramming tools, everying that a designer would need. If that was the way they wanted to go, they'd already be there. And yet they're not.

    I'm not sure this is generally true. I have seen business SMIs (subject matter experts) very happily draw diagrams, such as process diagrams. They also happily draw boxes to represent resources such as people (i.e. actors), systems, organizations, and entities (such as "customer" by which they mean their own record of a a customer). About 40 years ago (good grief! is it that long?) I designed business systems with SMIs who were very happy with flowcharts to specify processes. (This was before I discovered computers and fell in love with software, when the practice of design of non-computerized "systems" went under the name of "organization and methods".)

    Coming bang up-to-date, Richard Pawson has had significant success with an approach he calls "naked objects" (see www.nakedobjects.org), where SMIs define entities and lower-level processes or procedures, they are coded in Java, and the naked objects framework automatically produces a working visualization of the objects (a process such as filling in an order form being seen (rightly imho) as a process specification). The SMIs apparently lve this. Again, working with Haim Kilov (who wrote "Business Specifications" and other things) I saw SMEs, after about 20 minutes of education by Haim, happily using - on a whiteboard - a very small subset of UML that Haim had (carefully!) defined.

    So I conclude that SMEs are happy with diagrams, that sometimes they do use their own self-developed techniques, and where they do not already have a preference, wlcome the introduction of a *SIMPLE* techique to express their expertise.

    Bruce, you also said:
    > I think this is one case where we need to listen to the experts and find a way to represent the mental model that they have spent years developing.

    Hear hear! The key point it seems Lloyd Fischer was making is that we should not be presenting diagrams of software to SMEs. We should be helping them to specify their area of expertise. The trick then is to do so in such a way as to make the resulting design expressable in software. I have been involved in work along these lines for the past several years, and there is indeed light at the end of this tunnel. Several practitioners are using this already (e.g. COSM - see http://www.herzumsoftware.com). Part of the key is to use a component-based design approach for the application software. Not the "anything that sells is a component" approach, but the software engineering approach where you realize your designs in the kinds of components supported by COM, CORBA CCM, and EJB.


  • bruce January 21, 2005 7:25 AM

    Actually I disagree that we need to help them specify their area of expertise. In many cases, they already have a method of specifying that information. The example I'm drawn to would be accountants. If you've ever discusses the transactions that need to be done in order to book depreciation across multiple states, odds are pretty good that the numbers person didn't turn to a UML diagram. In my experience, they fill the white board with T-accounts. I think what we need to do, and the reason why DSL should not depend upon UML, is find a way to allow them to use whatever notation they are comfortable with. Will some SMEs uses UML? Of course. But don't force those that don't think that way into the same box.

Leave a Comment

(required) 
(optional)
(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS