UML vs DSL
Tuesday, August 5th, 2008The latest issue of ESE (Embedded Systems Engineering) landed on my desk this morning. Of interest to readers of this blog would be the article by Mark Dalgarno and Matthew Fowler entitled ‘UML versus Domain-Specific Languages’, which mentions MetaCase.
I would agree with most of the distinctions the authors made between UML and DSLs, but I do think they were a little to lenient on the UML side. Particularly the comment that “Using UML profiles gives you as much expressive power as DSLs”. I would disagree with this in theory, but more important, in real terms. I’ve yet to see any UML+profile language that has nearly the expressive power of a well constructed DSL. The numbers just aren’t there to support the claim either. Users of MetaEdit+ (the leading DSL/DSM tool) consistently report productivity increases of 500-1000%; there is nothing being put forwarded from the UML supporters that even comes close to this. Using profile makes sense if you want to add few minor constructs to the UML. By basing the language on UML the possibilities on raising the abstraction higher are not available. Keeping in the low abstract level hinders then the possibilities for productivity increase.
An issue where the authors hit the nail right on the head was in the idea of code generation. The ability to generate full, production-quality code from models is what it’s all about. However, again here I see that DSLs have a big leg up on UML and is fundamentally why the authors and I agree that UML tools will continue to lose out to DSLs.
The article concludes with the statement that UML tools can add non-UML support (i.e. DSL support) and then compete with DSL tools. But at this point is it still a UML tool? UML has its place, but its not code generation. It will still take a while before it will disappear as a code generation approach, but the signs are certainly there that it will happen. The issue is that software vendors have invested money and time in developing these tools and as its clear the market is turning away from them they are trying now to re-brand themselves as DSL tool vendors (”we’ll slap profile support on it and call it a DSL tool”). The problem is that the underlying tool architecture just isn’t there for these UML tools to adequately support DSLs. This leaves nothing left for these companies to do except promote themselves as some sort of ‘hybrid tool’ which to me means that they are good at doing something you don’t want to do (i.e. UML) and poor at supporting what you actually want to do (i.e. DSL / DSM). What’s the advantage of that? The fundamental idea of DSM is that it’s better to use a modeling language that you design to meet your organization’s specific needs. After all, who knows better than you how your software should be developed? Doesn’t it make sense that having a tool specifically designed for that purpose would be better as well?