Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Article: Writing A Texual DSL Using 'OSLO'

Article: Writing A Texual DSL Using 'OSLO'


Microsoft unveiled the building blocks of their “OSLO” vision during the PDC event in Los Angeles in October. As the article explains

Oslo has three main components:

  • A modeling language M for textual DSLs
  • Quadrant a design surface for graphical DSLs
  • A relational database repository that stores these models.

The textual language development consists of is a three core languages, technically two that any given developer can author in:

  • MGrammar: defines grammars for Syntax Directed Translation.
  • MSchema: Is a language that defines schemas for a Semantic Model, that, model-aware runtimes can use.
  • MGraph: represents an object graph of a translation of a given textual input against a parser defined using MGrammar.

This article is an attempt to try and use the MGrammar language to write our own language, a DSL, for expressing dates in natural language using the OSLO tool chain.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Oslo and DDD

    by Colin Jack,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    "OSLO really opens up the possibilities of true domain-driven-design, very simply, by allowing different domain representations to be transformed into a standard structured data form. This affords different model-aware/assisted systems domains interaction with each other in their own dialects of the DSL, including visual dialects"

    Do you know of any examples because from what I've seen this approach is a bit of a red herring. Not saying its not possible but are you saying completely do away with a normal object-oriented domain model and do everything in Oslo?

  • Re: Oslo and DDD

    by Dilip Krishnan,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    IMHO, What OSLO is trying to do is get us closer to that vision. I don't know of any examples of software that are completely model-driven (in the classic sense) and I'm guessing it'll be a long time before we do see them in the wild. But I do know a lot of the software we write is certainly model aware/assisted. Its a very subtle difference between the two. To illustrate with an example, consider a configuration file that an application uses to load up the the required settings/environment; this can simply be thought of as a model, specifically a domain model for the application settings/environment.

    Now there is a plethora of such tiny domain models scattered across the applications thats consumed by different pieces in the application. At the most basic level OSLO tries to solve the problem of configuration at a platform level (model assisted). Now, when we take this notion to the next level where the application runtime is aware of these models as a whole, you get a different class of applications that is model aware. This is not to say that no object-oriented development is required, as one still needs to create the application runtime. OSLO gives a standard way to define these models and store/retrieve them.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p