by Esther Schindler

Exploring Oslo’s Modeling Language Promises

Feature
Oct 28, 20086 mins
DeveloperOpen SourceSoftware Development

Microsoft is sharing bits of Oslo at the Microsoft Professional Developers Conference (PDC) this week. Learn what's new in M, the company's language for creating domain-specific languages, and why Microsoft thinks it's such a big deal.

Fundamentally, software modeling is about describing an application. Modeling has long held promise for software developers, especially as they struggle with ever-more-complex, distributed, composite applications built on IT silos that Do Not Play Well With Others. But modeling has not gained mainstream adoption, explains Burley Kawasaki, Microsoft director of product management, Connected Systems Division.

“Until now,” is the unspoken addition. With Oslo, Microsoft wants to bring modeling to the software development mainstream. Among Oslo’s pieces: a modeling-specific language—code-named M—in which to write domain specific languages (DSLs); a way to build visual DSLs (code-named Quadrant); and a repository that brings all the models together to be viewed and managed as a cohesive whole (mysteriously, the repository does not have a code name). “This represents us going from a world of general programming languages and domain-specific APIs to a more domain-specific language world,” says Doug Purdy, Microsoft product unit manager for Connected Systems Architecture.

Today, M will be made available under the open specification promise, which allows anyone to implement the language spec. “As much as we’re proud of the intellectual property we’ve put into it,” says Kawasaki, “It’s what you do with the language that matters.”

We do, however, hope that the company resists the recent tendency to turn the code name into the final product name. Some developers inevitably will hate M just as some hate C# and others hate Java. Just thinking of the phrase, “Anti-M” makes us contemplate a future in which developers chant, “There’s no place like home. There’s no place like home.”

So what’s the big deal about modeling? Hasn’t it been around for years? Yes—but only to a degree. When it’s used in enterprise development, modeling is most often adopted for the software design phase. That can be helpful in drawing a picture of what the business wants, Kawasaki says, and “it can help developers implement what they thought the picture meant.” But it’s what they thought the picture meant; how often is that actually the case? Even when the model matches the original software vision, it goes out of sync very quickly.

But just as “the map is not the territory,” the software model isn’t the picture; the model has to describe the application. If the business rules change or the software intent changes, the application needs to change too.

Which brings us to Oslo, Microsoft’s next-gen environment for Web services and service-oriented architecture (SOA), which the company will use to span mobile, client, server and—with the introduction of Windows Azure yesterday—the cloud.

Modeling has gained momentum in certain computing circles, but it hasn’t had much of an impact on the run-of-the-mill programmer—at least not consciously. Developers might not think they’re doing modeling when in fact that’s what they’re engaged in; they might imagine they’re writing metadata or configuration data, says Kawasaki.

However, modeling has taken off in Silverlight development and in Web services development, says Kawasaki—anyplace where the majority of the application isn’t in executable files but may be based on, say, Web services or Web 2.0 technology. “XAML is nothing more than a declarative model for presentation,” says Robert Wahbe, Microsoft vice president of the Connected Systems Division.

Oslo modeling is about working with and creating domain-specific languages (DSLs), which Kawasaki says “makes it directly connected to what you’re trying to do.” It makes it a turnkey process to go from what you need to XAML, adds Wahbe.

Wahbe describes M as “a more human-approachable representation for writing down data.” The language is a family of DSLs. M-Graph is like the XML info center: a data representation that looks a lot like JSON and represents arbitrary values. M-Grammar is a DSL that allows you to define other DSLs, like XSLT. “You don’t need to be an XML person to get it, though,” adds Wahbe. The pattern match for M-Schema is XSD, a schema language that constrains what you can express in M-Graph.

You can write the DSL in any way you want, he says. Extend the language in M-Schema with your domain-specific concepts, with the results going to XAML or a database. When stored as a database in the repository, you can analyze results and perform impact analyses (such as “What will happen to our other line of business apps if we make this change?”).

The typical examples that people trot out to explain the attraction of DSLs are for vertical development, such as creating a language for financial traders for quotes or stock purchases, or a language tuned to applications for the pharmaceutical industry. However, Purdy points out, DSLs can be horizontal, too, whether it’s to access databases, user interface tools, Web services or rich client tools. It applies just as well to a language for writing apps that target the cloud (something that Microsoft intends to do to support Windows Azure), as it does to writing Web applications.

This sounds a lot like the early promises for XML, for good reason. Says Wahbe, “We’re building a lot on the foundations of XML” such as its transparency and flexibility. The XML promise that hasn’t yet been met, though, is that it hasn’t been as approachable for humans.

Microsoft is particularly pleased with the user interface distinctions it’s made in Oslo’s components. While modeling is an old idea, says Wahbe, people have traditionally conflated visualization and modeling. Quadrant is a boxes-and-lines visual tool. But they’ve discovered, “To really get this to critical mass, you need both text and visual [interfaces],” he says. Although developers (and end users) appreciate the ability to describe software visually, when it comes time to talk about models, they usually turn to some kind of text description, such as a block of XML, a snippet of code or some other brief, e-mail-friendly way to show someone else what the developer is talking about. “How do you do a diff on lines and charts?” asks Kawasaki.

By making the language spec freely available, Microsoft is hoping to engage the community. “We’re doing this from the inception of the language,” Kawasaki points out, and the company is hoping to attract the attention and involvement of the open source language activists.

Need more data? Addison Wesley is about to publish The “Oslo” Modeling Language (ISBN 0-321060635-3). The company also has a new Oslo development center at MSDN.