… on software that makes a difference

Menu

mdsd+.net

It has been more quiet around “Oslo” the last month. Maybe just about everybody is on vacations. Or people feel that everything will change with the PDC in November and are afraid of publishing nonsense.

Nonetheless, I felt it’s time for an update on what I think, heard and read about “Oslo”.

What I think about Oslo today (May CTP + Announcements)

First of all I want to say, that I’m happy Microsoft released Oslo in such an early state. I think they know the pros and cons of such an open process. The community can help with forming the product, and companies can start to invest early in what they think might be valuable for the future. But It also means more friction for any changes that are made.

I have used M for defining schemas and languages and also played around with the Repository and Quadrant. As Microsoft also states, it’s early Alpha. I stumbled over many bugs which I still plan to report and blog about. But that is OK, no one ever said it was production ready.

“M”

So far I like the schema part of M, also called MSchema. It has a very concise (compared to XSD) c-style syntax and covers a lot of what I want to express when modeling information structures. The M-graph (for values) syntax is also OK, while I don’t like the MGraph API. M-constraints let you restrict your types in a nice way. What I don’t like here, is the missing support for weak constraints. Named M-queries (similar to LINQ syntax), are a nice way to query M structures.

M-grammar is useful for DSLs. I think it could be more opinionated. I feel MS is striving for an expressiveness that let you describe all computer languages in the world using MGrammar. This makes it more complex than necessary for covering DSLs. At the same time it doesn’t support nesting of languages, which would be especially useful for DSLs, because you often need to talk to external models (e.g. pinvoke). The support for editor customizing (crucial language workbench feature) as it is today is not sufficient and too hard to configure.

Another feature I miss here is referencing between nodes and even across files (linking + scoping). For now all references are just values (ids), and the output of a DSL program will be a tree model, no graphs!

The Repository

The Repository basically offers some features on-top of SQL server as are row-level security, hierarchies, localization, versioning, additional constraints. All those features are plain SQL “libraries” in conjunction with M-models which also are compiled down to SQL. I don’t yet know what to think about the Repository.

Naming / Packaging

In the last couple of weeks the Oslo team published two posts that confirmed some of my speculations.

The only thing that I feel bad about is that we kept the “Oslo” name around so long (you will see that change at the next PDC), which has continued to be a confusing point for customers (“I thought Oslo was your new SOA platform”).

Douglas Purdy

I agree. It was confusing. Although people slowly start to accept “Oslo” as for “Modeling”.

Oslo and EF / Data Programmability

With this in mind, we made a decision to merge the Data Programmability team (EDM, EF, Astoria, XML, ADO.NET, and tools/designers) and the “Oslo” team (“Quadrant”, Repository, “M”) together.

Douglas Purdy

I don’t yet know what to think about this. “Oslo” is not and should not evolve to an O/R-Mapper. M’s type system is structural and doesn’t map well to strongly typed objects as used by EF. I can see this choice limiting the modeling capabilities of Oslo. But I guess we have to wait and see.

As I understand today, and as it shows up in the May CTP, it is not a graphical editor or graphical editing toolkit but rather a light WPF-version of Microsoft Office Access that understands Oslo Modeling concepts and relationships and builds up default editors in a generic manner. This is still useful (if it is free), but not far as useful as what I hoped Quadrant to be.

Please, Microsoft, make Quadrant a graphical editing toolkit with good support for configurable diagramming and any custom WPF editors. It should also have the plug-in model VS2010 offers for sharing any extensions.

The “Oslo” Story

Microsoft tries to sell “Oslo” as if it was all one story. It’s a lie.

MGrammar ASTs are hierarchal (tree structure) and for now only supporting nodes and strings.

Databases store flat relational data,

and objects in the .NET world are typed nominally (no multiple inheritance).

DSLs + Repository

There is no story for “DSLs and the repository”, and there is not yet a good story for any runtime support off the repository or DSL files. It’s basically what you had before. You can either access the database via ADO.NET or an O/R-Mapper or you run directly off the parsed MGraph-AST representing your DSL-Script, which feels like visiting xml documents. M has a nice LINQ-ish query language, but that doesn’t work in memory against a graph.

Querying

M has good support for complex data structures. As said there is no support for in-memory queries. But even the database implementation is limited by it’s relational backend. Even though queries can consult complex properties for sorting or filtering, it can only return rows with a list of scalar fields.

Constraints

Most constraints on types are only implemented in the SQL-Mapping. Also here there is no in-memory implementation that would validate your model against a schema. Basically the M-compiler generates a database schema including checks that would not let you insert invalid data into the database.

Data and schema evolution

There is this dream about capturing requirements in quite fuzzy ways and then piece for piece add details to them – until they have reached some formal state that might be executable. This sounds nice in theory, but there is no chance to implement this stuff. M is very easy to change, and it is easy to add constraints and refactor schema structures. But there is no story around how to let your data evolve together with your schemas using the Repository. So, besides nice theories, Oslo doesn’t help here.

More to come

There will be new content and Chris Sells also announced a fresh CTP around this years PDC in November.

I just got back from a good week in Seattle. My plan was to visit the DSL DevCon only, but it turned out that the cheapest option was to stay from Tue, 14th until Sun, 19th. I then had time to visit both Lang.NET and DSL DevCon as well as some friends in the area. Last time in Seattle (ALT.NET Conf) I was occupied with shopping only, but this time I also had a whole day for sightseeing. It was great!

Lang.NET was all about general-purpose languages. The talks were good and I met interesting people. This two tweets from Paul Vick (VB.NET compiler in person) and Amanda Laucher (F# MVP) pretty much sum up, what I felt most of the time:

I’ll write follow-up posts about what I learned as soon as I have time for it.

What’s next?

I’m really tuned to see how our profession will evolve. I hope it will change dramatically. We need better processes, better integrated tools, closer communication of intentions and a significant productivity boost. I can’t believe that we will be able to create software so much faster. But, if our software wasn’t so closely tied to platforms and if it was written in a more flexible manner, so I hope, software could at least survive longer. Software is often dead born. That is, were our industry looses so much of it’s productivity.

I drafted Fowlers state-machine example with MGrammar. While doing so I found a few things I would like to see optimized or find better solutions for.

New line handling. I would like to express one required new line, when it is required, but then ignore all the others. Forum discussion.I could make new lines part of some tokens and then just interleave other tokens. But I don’t think this would be a nice solution. Any ideas?

The blocks events, resetEvents, commands and state+ have to be written in order. It is possible to describe a grammar where unordered blocks would be allowed, but it’s not trivial.Ordered and unordered “Lists” of syntaxes, separated somehow should IMHO be supported directly: forum discussion.

I wrote the Grammar using Intellipad and the three-pane input/grammar/AST view. It’s great! But I’d like to define the Semantic Model (using MSchema) along with the grammar and directly validate my AST against it: forum discussion.

References are not directly supported by MGrammar/MSchema. Forum discussion.