If you are interested in the Cloud Computing announcements at PDC2008 as well as transcripts, go to http://blogs.msdn.com/cloudcomputing. This post concerns Oslo.

Vijaye Raji (Super Ninja and Small Basic developer) and Douglas Purdy are presenting.

This is a lap around Olso, there will be 5 other sessions which will go deeply. Let’s jump into it. Why are we doing Oslo ? What it is ?

First, what is a model ? A description of a given domain : drawings (WhiteBord, Visio), model-assisted (diagrams that generate code, or diagrams from code – UML / Class Designers), model-driven software development (HTML, CSS, XAML, BPEL).

When we talk about domains at Microsoft, we do not only code about business / vertical domains but also technical domains. Modeling is a way of writing code. It is not something new (COM+, .Net 1.0 appconf & attributes, Web Services schema and contract, .Net 3.0 xaml WPF and WF). It starts from data and a runtime makes something interesting out of it.

Model-driven applications :they put the entire application information inside a database

  • MOSS 2007 : textual domain specific language (CAML), Visual Designer, Application definition stored in db,
  • Microsoft Dyanmics

Why we care about model driven software development ? Transparency (understand the application better), Flexibility (faster changes), Productivity (More essence and less ceremony).

What is Oslo ? it is the platform for model driven applications. We built this from scratch because we needed, and now we give you this toolset. Composed of 3 very simple things :

  1. “M” : the language for authoring models & textual DSLs. The best thing is to think of M as in MVC (takes data and presents it). M is a captural language. It is something we can build on top.
  2. Quadrant : the tool for interacting with models & DSLs
  3. Repository : the database for storing and sharing models

Key Oslo concepts : Models from which you build a textual DSL and a visual DSL then you run it.

Oslo Architecture

  • The repository (IntelliPad to move around, your models, .Net models, Repository Models)
  • Quadrant : textual & visual DSLs
  • Runtimes : dublin, ASP.Net, WF, WCF, SQL/EDM, Windows…

Quadant contains an editor framework (composition, generic viewers, dataflow) and the M language framework (MSchema, MGrammar, MGraph). From here you can edit and view your model through Visual and Textual DSLs.


Start from IntelliPad. Blank page. Name it MusicLangauge.mg. IntelliPad can be donwloaded from http://msdn.microsoft.com/oslo.

module Microsoft.Samples { type MusicItem { ID : Integer64 = AutoNumber(); Album:Text; Rating : Integer32 where value <= 3; } MusicLibrary : MusicItem*; }

You get instant translation to TSQL to fill the Oslo Repository with our DSL.

Compile it with mschema2db.cmd : compile then populate

Let’s have a look wih Excel. Data –> Open SQL Server. Repository DB. Locate the MusicLibrary table we just populated.

Now let’s write data (values in the model). New file in IntelliPad, Name it MyMusic.m.

module  Microsoft.Samples { MusicLibrary { { Album = “… Baby on more time”, Artist = “”, Rating = 3 }, {…} }

You get basic insert statements generated.

m2db.cmd validates the data against the schema, then inserts the data.

Go back to excel, and refresh the data, you get it filled into the database.

Now create a new file with textual info : “Four” by “LedZep” is awesome! “Bad” from “Michaël” is terrible.

Open Intellipad in Authoring Mode. It uses a specific DSL called MGrammarMode. It gives you the ability to transform. Possible to add attributes @{Classification[“Keyword”]} on token for example.

Run another script : mg2m.cmd compiles the grammar to an image and generate a new file.m as output of the grammar. Now load with m2db.cmd.

MSchema is like XSD, MGraph is like infoset, and MGrammar is like SLT

Launching Quadrant. It is completely model driven. It loads itself from a model. You get the models in the repository. Very reflective environment. Launch the Explorer. Get the Model, drag and drop on the surface.

Quadrant can be customized. Generic viewers and editors are embedded. Any model can be viewed. For the Music library, two views are displayed : List and Tree collection. We believe in MVC. If modifications happen, they get affected everywhere.

Let’s define a Visual DSLs. Take the ViewerHint and customize the view.

Now let’s experience the runtime. Generate Xml from the data file.

mgx.exe MoreMusic.m –r:MusicLibraryLanguage.mgx –t:xml.

Switch to Visual Studio 2010. Create a Web application. Create a XML Datasource and affect it the XML file we just generated. Load a DataGrid from it.

The value you can get out of Oslo

Oslo will be the foundation for the Microsoft platform. Everything will get described in through multiple domains. For example, here are development domains :

Quadrant Web Editor works on the MWeb Textual DSL for the ASP.Net runtime,

Quadrant Service Editor works on the MService Textual DSL for the WCF/WF Dublin Runtime.

… Quadrant Entity Editor, Quadrant Schema Editor…

Demo : Build a REST service with DSL { module / service / operation , endpoint }

Demo : Build an application that upload photos from 38 lines of a DSL. Use invoke for .Net CLR calls.

Demo : Debug the DSL model.

Writing the same application in .Net 3.5 is about 160 lines of codes.


Public Oslo SDK CTP today (it is pre alpha, we want to get your feedback)

M language specification will be released under OSP (Anyone can implement this approach, third parties can leverage this).