Oslo, Quadrant and the Repository is dead, long live “M”?

What the community (me included) has hoped and feared at the same time and what many foresaw, happened: Microsoft discontinued it’s investment in SQL Modeling Services (aka “Oslo” Repository) as well as “Quadrant”, as Don Box states on the Model Citizen Blog.

One important aspect of that focus is that we will not bring “Oslo” repository to market.

The Winners on the data-side of things are OData and the Entity Framework including EDM.

Given the increasing adoption of both OData and EDM, we have decided to focus our investments in those technologies to make our modeling vision a reality.

But Don also states, that Micrsosoft will further invest in the modeling language codenamed “M”, which also was a former part of Oslo, but clearly didn’t fit into the “SQL” rebranding right from the beginning.

While we used “M” to build the “Oslo” repository and “Quadrant,” there has been significant interest both inside and outside of Microsoft in using “M” for other applications. We are continuing our investment in this technology and will share our plans for productization once they are concrete.

I think, all together this is good news. Both the Repository and Quadrant were very far away from what I consider useful.

Hopefully the “M” team moves over to DevDiv into the ScottGu-Area. Hopefully it then returns to collaborative language design, now that the internal goals are removed.  Hopefully, Microsoft also now listens’ to the modeling community when designing the final language. And hopefully they bring great Visual Studio Support for textual DSLs.

Hey Microsoft, what about open sourcing “M”? This would be a huge step forward, after this very huge step backwards!

Advertisement

What is left of Microsoft “Oslo”? What now with SQL Server Modeling? (Early 2010)

Back in October 2008 Microsoft announced “Oslo” as a new and world-changing modeling platform. While it always consisted of a language, an editor and a repository the community seemed to be mostly interested in the language “M” and it’s grammar features for creating new domain specific languages.

The feedback could be summarized to:

Great! We love model-driven. We love DSLs. But why the heck SQL?

After that they got engaged with that community. Chris hosted the DSL Dev Con. And Doug released “M” under the Open Specification Promise and founded the “M” Specification Community. Mathew Wilson implemented M in JavaScript. Hugo Brunelier elaborated on the possibilities of bridging it with Eclipse Modeling.

Many wrote, spoke and blogged about it. The fellow hope was, that Microsoft could bring model-driven development to a broader audience and by that increase both productivity and quality in software development.

For that community the renaming of “Oslo” to SQL Server Modeling was a slap in the face. Many stated that they were disappointed by Microsoft’s decisions.

Let’s look into the reasoning and the real consequences of that rename.

Even though I think it was a wise decision business-wise both the timing and the messaging was really bad.

The Repository and “Quadrant” were closely tied to SQL right from the beginnings of “Oslo”. The schema, constraints and functions part of “M” had and mostly still has only one implementation: also SQL.

But the languages part of “M” also referenced to as “MGrammar” had nothing to do with SQL at all and it still doesn’t have much to do with it today either.

“M” should have been split out from “Oslo” before the rename and everybody would have been happy.

So where is this going now?

“M” and “Quadrant” today are still code names. The only thing that has a final name is the repository part of “Oslo” which is now named SQL Server Modeling Services. And I think we agree that that is a OK name.

Most probably “M” will not become SQL Server Modeling M and neither will “Quadrant” be named SQL Server Modeling Quadrant.

I think the final “M” will be as much SQL as Entity Framework and OData are SQL today. All those are developed within the same group and I expect it to merge anyway.

“Quadrant” will probably replace the part in SQL Server Management Studio that enables browsing and editing of SQL data – which is horrible today anyway. It also has the potential of replacing Access as a platform for Information Workers.

And maybe some day we’ll see ideas from “Quadrant” in Excel.

Future of DSL Development with Microsoft Tools

Visual: There was a hope, that “Quadrant” could be a better DSL Toolkit. Those teams didn’t talk to each other, but now they do. I think MS gave up on visual DSLs with “Quadrant”. Instead we’ll see the DSL Toolkit getting more attention. In some Demos at PDC we saw diagrams in Visual Studio working together with SQL Server Modeling. That were already DSL Tools operating on “M” models.

Textual: “M” is at maximum a third of the “Oslo” vision. And the languages part again is only a subset of “M”. Maybe that helps seeing the priorities in the big context.

But still the commitment is alive. The November CTP has some great new features. For example more powerful “M” projections for grammar rules or basic debugging support.  Probably some day this will merge with the DSL Tools and we’ll have both graphical and textual DSLs support right within Visual Studio. I think and hope that the connection to SQL will not be very strong in the future.

Model-driven Development

As often when Microsoft starts (mis)using existing terms they or at least many of their employees just don’t get it. At least not in the first place.

An application that uses “M” to define the M in MVC is not automatically model-driven. It’s just a normal application that operates on data as most applications do. If you want to argue like that, then every C# file and all SQL table rows are models.

In my perception model-driven is, when models become part of the implementation. The Workflow Foundation is a good example for what model-driven means. You model something that is the source of truth for your application – instead of C# code.

If tools help building things like the workflow foundation based on either visual or textual DSLs, using interpreters or code generation, then they truly support the vision of model-driven software development.

“M” Samples Review: One-to-Many vs. Many-to-One

Isn’t this title funny? I like it 🙂

As I browse through the samples for the SQL Server Modeling CTP I find a lot of odd “M” code. This is sad, because Microsoft should know how to write “M” code. They are inventing it. Sure I’m expressing my personal opinion, but I think I have no hard time finding people that agree with me.

Why I do this in the “public”? Because I care! I like M and it’s concepts. For me M has the potential to become a great replacement for a variety of technologies. Most of all XSD, and maybe parts of SQL. That it comes with a SQL-code-generator is nice, though. But not too exciting. I still hope that the team adjusts their current direction. But more on that in a longer post 🙂

I’ll just start with one of the first samples I found:

Relationships

It comes with four M-Files:

asdf

 

 

 

 

 

So, what again is the difference between one-to-many and many-to-one?

OneToMany.m and ManyToOne.m

Well, this is OneToMany.m:

// original OneToMany.cs
module OneToMany {
    type A {
        Id : Integer32 => AutoNumber();
    } where identity Id;
    
    type B {
         A : A; 
    } where value.A in As;
    
    As : {A*};
    Bs : {B*};  
}

And this is ManyToOne.m:

// original ManyToOne.m
module ManyToOne {
    type A {
         B : B;  
    } where value.B in Bs;
    
    type B {
        Id : Integer32 => AutoNumber();
    } where identity Id;
    
    As : {A*};  
    Bs : {B*};
}

Do you spot the difference? I do! It would be easier to see, if we changed the ordering on the second one. Now compare this to the first one.

// reordered ManyToOne.m
module ManyToOne {
    type B {
        Id : Integer32 => AutoNumber();
    } where identity Id;
    
    type A {
         B : B;  
    } where value.B in Bs;
    
    Bs : {B*};
    As : {A*};
}

Do you see it now? Exactly. The XPath-function translate(‘AB’, ‘BA’) would have done the job! There is exactly NO difference between except for A and B switched around!

Usually the relationship the sample tries to illustrate is called one-to-many, even though in relational databases the reference goes from the many to one.

The funny part is over. Lets look at one-to-one and many-to-many.

OneToOne.m

This is OK. Although I do not like how coupled the code is. If I used the same style to express the same intent in C# people would blame me for violating every single principle we have learned over the past couple of years. I’ll write about what bothers me here in another post sometime.

// original OneToOne.m
module OneToOne {
    type A {
        Id : Integer32 => AutoNumber();
    } where identity Id;

    type B {
        A : A where value in As;
    } where unique A;
    
    As : {A*};
    Bs : {B*};
}

ManyToMany.m

// original ManyToMany.m
module ManyToMany {
    type A {
        Id : Integer32 => AutoNumber();
    } where identity Id;
    
    type B {
        Id : Integer32 => AutoNumber();
    } where identity Id;
    
    As : {A*};
    Bs : {B*};  

    type AB
    {
        ReferencedA : A;
        ReferencedB : B;
    } where value.ReferencedA in As && value.ReferencedB in Bs;
     
    ABs : {AB*};    
}

What is that. Natural modeling? What you really want to say is, that A has a n2m-Relationship with B, right? Now tell me, how this M-code is any better than SQL! It does not raise the level of abstraction, at least! IMHO this is not a solution for something that claims to be a modeling language, it’s a hack.

In“M” when you model something that naturally would be called a hierarchy or containment, the SQL compiler projects it as n2m anyway.

Relationship vs. Reference

Actually M doesn’t really support relationships (or associations) at all today. It just knows about references. What the difference is?

I’m not too sure if I get it right, but I’ll try.

A relationship is always coherent and integer. Something both sides agree on.

holding-hands1[1] 

A reference, though, is just something holding on something else.

detlef_46983[1] @Pitopia, Detlef

In relational databases relationships are modeled using references plus constraints.

So for example saying to the man, that he isn’t allowed to move as long as this baby holds his finger, you would enforce something that could be called an relation.

Summary

I think samples of this quality rather chase away people than buying them into the language. The language team should review all the documentation and samples. They should discuss them and give good guidance.

What I’ve seen so far is rather bad guidance.

Update: Also check out the MSDN Documentation on Relationships. It’s at least better than the samples. (found it after I wrote this post)

Tired of hearing “M” is to “T-SQL” what X is to Y…

I have heard a couple of variations of these analogies. I do not like them. I think they are simply absurd.

At last PDC, “M” was to “SQL” what C is to Assembler. This year it was, what VB is to C. And now I even read this:

The code name “M” language is like a more manageable (though more limited) form of Transact-SQL, the language normally used to describe data schema and values.

Kraig Blockschmidt, Microsoft Data Development Technologies: Past, Present, and Future 

“M” has some overlaps with T-SQL, ok. But far from every concept in “M” can be translated into T-SQL. What about structural subtyping? Types without identities? Polymorphic references and function arguments? Languages/DSLs? Ordered collections? Lot’s more.

And only a very small, although useful subset of T-SQL maps to “M”. Also most of the translation to SQL is opinionated, not natural.

What the schema and values part of M compares much more to, is XML and XSD.

Would you even try to compare XML to T-SQL?

Microsoft “Oslo” May CTP available (Including Quadrant)

The "Oslo” team has released the third CTP of Microsoft’s forthcoming modeling platform.

Some of the  changes are:

For more detailed information check out the team announcement and the release notes.

New Installer

oslo setup

Empty Quadrant Workspace

empty quadrant

Intellipad Splitting

intellipad-multisplit And yes, I’ll be blogging about my web-layout DSL 🙂

kick it on DotNetKicks.com