Unified Modeling Language (UML) is a popular choice for object-oriented systems analysis, so it is interesting that Microsoft’s development products currently have limited support for UML. Because Microsoft is a major player in the world of software development, it is important to understand its position and how it plans to interact with UML.
In this article, I will review UML, domain-specific languages (DSLs), and Microsoft’s “Oslo” initiative. I will demonstrate that UML has challenges, but it will continue to be an important tool for software modeling; at the same time, DSLs are likely to increase in importance, especially given Microsoft’s commitment to “Oslo.”
An important goal of UML and the related Model-Driven Architecture (MDA) is to separate the specification of functionality from the implementation, which reduces work involved when the platform changes. UML also has the potential to serve as the thread that ties the development process together from requirements gathering through code generation. These capabilities should result in significantly increased productivity.
Unfortunately, UML is not capable of expressing specialized concepts; and though UML provides a feature called “profiles” to overcome this problem, it is difficult to remove the parts of UML that are not relevant (Fowler, 2008). In fact, there are a number of common criticisms of UML, including it suffers from language bloat; it tries to be all things to all programmers; and it has a dysfunctional interchange format. The interchange format, XML Metadata Interchange (XMI), is used to integrate multiple UML models.
In May 2005, the Visual Studio 2005 Team System Modeling Strategy and FAQ said, “Many people who read our views on model-driven development assume that our emphasis on DSLs somehow has put us into an anti-UML position. We want to make it clear that this is not true. … But for whatever reasons, the existence of UML and UML-based tools has not significantly changed the way developers build applications. Nor has it significantly contributed to developer productivity” (Microsoft, 2005). Furthermore, the document explained that UML is not a good choice for code generation. In short, there were a number of reasons that Microsoft decided against UML as the foundation for their modeling strategy.
Rather than UML, Microsoft believed that DSLs were the best choice. “A domain-specific language (DSL) is a programming language or specification language dedicated to a particular problem domain, a particular problem representation technique, and/or a particular solution technique” (Domain-Specific Languages, 2009). Such DSLs have been around for decades; for example, one could describe the DOS batch language of the early PCs as being a DSL for file manipulation and SQL as a DSL for database access.
DSLs have important benefits. Because DSLs do not attempt to cover all possibilities, they are both simpler and also more expressive within their respective domain. Being simpler and more expressive, domain experts (business people) can often understand the DSL code without requiring a programmer to interpret. Furthermore, DSLs enhance quality, productivity, reliability, and portability. Finally, DSLs address Microsoft’s key complaint of UML—they can generate code as demonstrated by Yet Another Compiler Compiler (Yacc).
Yacc illustrates several benefits of DSLs. Yacc, a tool to create compilers for new programming languages, takes as input a high-level syntax, or language description, and produces the C code for a compiler for the new language as output. The format for the input is a DSL for computer programming languages. As an undergraduate in computer science at Purdue in 1985, I used Yacc to create a compiler. It was much more efficient to produce a compiler for a new language using Yacc than it would have been to write the compiler from scratch in C. There were fewer opportunities to make mistakes because the syntax was much shorter than the corresponding C code. It is unlikely that an undergraduate student would have been able to complete the project within one semester without such a tool, but with Yacc, nearly everyone in the class finished the project. This is a clear example of the benefits Microsoft claimed.
Microsoft initially decided to use a DSL approach to modeling rather than using UML. Microsoft uses code names for products before the products are shipped, and “Oslo” is the code name for Microsoft’s model-driven applications. There is no announced release date for “Oslo;” however, there is a “Customer Technology Preview.”
Two key goals of “Oslo” were to produce the increased programmer productivity that was promised by UML and to serve as the thread tying together the development lifecycle. Oslo consists of three components: the M programming language, the Quadrant visual modeling tool, and the repository. M is a DSL which enables programmers to create new DSLs for their particular industry. For example, there could be a DSL for processing auto insurance applications. M is analogous to Yacc in that it is a tool to create new languages. Quadrant allows for the visual creation of new models and specifies access rights for people accessing the models. The repository stores multiple models for a corporation and enables the models to access data from other models. Note that the repository solves the dysfunctional interchange problem of UML.
On May 26, 2009, in an important development, Keith Short, who leads the Enterprise Frameworks and Tools Architecture Team at Microsoft, announced the creation of an M implementation of the UML “metamodel.” The implementation would initially be a subset of UML 2.0; however, it would eventually be a full implementation (Short, 2009). There were two reasons for the change: 1) to respond to customer feedback that the UML standard was important and successfully being used for code generation, and 2) to provide access to UML models that address the needs of developers. This development gives Microsoft the right to claim standards compliance while also providing capabilities beyond UML.
UML is an important standard that addresses the needs of developers in many industries; because of that broad reach, it is heavy and has opportunities to improve. Microsoft’s decision to incorporate UML in “Oslo” is a powerful tribute to the voice of the customer, the strength of UML, and the likelihood that UML will continue to improve and thrive. At the same time, Microsoft has demonstrated that DSLs have an important role to play and can coexist with UML as part of the solution for enterprise development. Perhaps it should not be surprising that the answer is not “either or,” but “both,” so Microsoft should also be well positioned for success.
Microsoft, (2005, May). Visual Studio 2005 Team System Modeling Strategy and FAQ. Retrieved June 7, 2009, from Microsoft Website: http://msdn.microsoft.com/en-us/library/ms379623.aspx
Short, K. (2009, May 26). Keith Short’s Blog. Retrieved June 7, 2009, from Keith Short’s Blog Website: http://blogs.msdn.com/keith_short/archive/2009/05/26/oslo-and-uml.aspx
Fowler, M. (2008). UML vs. Domain-Specific Languages. Methods and Tools, Summer 2008, Retrieved June 7, 2009, from http://www.methodsandtools.com/archive/archive.php?id=71