So is UML really contradictory to DSLs?  Do they really represent different philosophies? I don’t think so.  After all, UML is just a set of domain specific languages.  If you want to model use cases, or state transition diagrams, what other DSLs would you use?

Software architecture is all about tradeoffs, and there’s obviously one here. On the one hand UML is relatively standard, so that costs of implementation, documentation, training, deployment etc can be amortized across multiple installations.  On the other hand, it may not match your target problem very well.  There are plenty of domains that UML does not encompass.  That is why the OMG has branched out into business modelling.  Database design is another; user interface a third; and we could list many more, including vertical domains - the design of software radio, mobile phone, or insurance systems - and very platform-oriented domains, such as the direct visual depiction of code.

The UML-oriented approach to DSLs is “profiles” – adding extra data to UML models so that they appear to target more specialized domains than the original UML definitions do.  A frequent question about the DSL approach is the danger of proliferation of different approaches to the same problem, and I think that’s a valid concern.  On the other hand, the UML+profile approach can end up with cumbersome solutions to essentially simple problems, and can lead to ghastly chimeras, like class diagrams with classes labelled “Web page” or “marketing department”.

To resolve these issues long-term I think we need a new architecture for modelling languages in which the false distinction between UML and DSLs would evaporate.  Widely used languages would be standardized; new languages could emerge and evolve; different languages could be loosely-coupled yet interoperate. To achieve such architecture we first need to understand some basics about language anatomy, such as making an accurate distinction between syntax and semantics.  I'll talk more about this in future postings.