I've spent a number of hours since I downloaded the Oslo SDK to look around. In this post I want to tell you what I've found out.
Oslo is a funny beast because its multi-layered. With only a couple of hours on its hard to even know if my assumptions are all correct. I am sure we'll see in comments if I am far off or not.
As I read stories about Oslo before I was able to look at actual bits, I felt confused. I heard two stories: "Oslo is about Modeling and Model Driven Development"; and "Oslo is about building Domain Specific Languages". So which is it? Both.
I used to be "The ADO Guy" so lets start with the modeling:
Oslo's Modeling Platform is a layered technology that is made up of several pieces:
In the SDK that I have played with, Quadrant isn't included (it is in the Oslo Virtual PC that is on the PDC attendee hard disk) so I haven't had any opportunity to look at that. What I did spent time with what the "M" language and a simple editor for it that is included called "Intellipad". The "M" language allows you to define quite a lot about an application, but the only part I played with so far is the modeling of data. Using Intellipad I attempted to model some Video Games data that i've been playing with in demos and the Silverlight 2 workshop. Intellipad simply lets me define the types including the data extents:
What is particularly interesting here is how the "M" language can be used to generate SQL scripts to create the storage. In Intellipad we can show a panel that shows the generated SQL:
(Click for a larger view of the SQL)
This is enough to keep my interest. I like where this is going but until I can really see what Quadrant does its hard to see how this fits into the bigger picture. So now lets look at the Domain Specific Language underpinnings:
Of even more interest to me is the infrastructure that they used to build the modeling features. The "M" language is actually a Domain Specific Language called "MSchema" built with the Oslo Domain Specific Language ecosystem. MSchema defines a "little language" that is used to define models. But how is MSchema defined? It uses a lower level Domain Specific Language called MGrammar. MGrammar defines a "little language" for defining Domain Specific Languages. Beneath both of these is another language called MGraph that I haven't totally grok'ed yet.
I haven't had time to try and build one but in the SDK is a cool small example called "Song". This small Domain Specific Language defines a "little language" that supports songs as a list of notes and rests, for example:
Music - - - D C C# F G E E - D A E - E G F - E D C D E A E D D D E A C
More importantly, we can use the MGrammar to define what this language is composed of:
In most other instances I've been pushed to think of Domain Specific Languages being build either in a language (usually something like Ruby with lots of Macro'ing) or in data structures (like JSON or XML) since both of these ideas allow for avoiding building my own parser. The Oslo stack changes this idea for me an really allows me to define small languages without the need for these scenarios.
You may be asking how Domain Specific Languages impact you as a developer though? I recently gave a talk at the Atlanta .NET Users Group to try and cement some of these ideas. My overarching idea is that by writing "little languages" that use the same semantics as the domain, we can 'code' the intent of users in a domain (e.g. a business) and then the domain's stakeholders can validate the 'code' since its written in the language of the domain. But that's a story for another post. Understand that I see Domain Specific Languages as a powerful idea for everyday programmers, not just academic scenarios.
This is just a tiny taste, but so far I am incredibly intrigued by the possibilities of Oslo. In the coming months you can expect to hear quite a bit from me about this topic. But I am no expert. I started down this Domain Specific Language path by trying to read and study information on the topic. By far the best thing I ran across was this great video by Martin Fowler that everyone should watch...its well worth your time:
Since Martin Fowler is important in this space, I was thrilled to see he was shown a preview and had time to give his first impressions as well:
What do you think?
|Building a Web App with ASP.NET Core, MVC6, EF Core and AngularJS (New)|
|Building a Web App with ASP.NET5, MVC6, EF7, and AngularJS (Retired)|
|Best Practices in ASP.NET: Entities, Validation, and View Models|
|Front-End Web Development Quick Start|
|Lessons from Real World .NET Code Reviews|
|Node.js for .NET Developers|
|Implementing ASP.NET Web API|
|Application Name||WilderBlog||Environment Name||Production|
|Application Ver||126.96.36.199||Runtime Framework||.NETCoreApp,Version=v1.0|
|App Path||D:\home\site\wwwroot||Runtime Version||.NET Core 188.8.131.52|
|Operating System||Microsoft Windows 6.2.9200||Runtime Arch||X86|