SOA.WRK.

Tuesday Oct 28, 2008

Oslo modeling platform: my first impressions...

Microsoft finally released to public its long-awaited Oslo modeling platform that was announced more than a year ago. There were a lot of press coverage on Oslo leading to the PDC this year. After reading Martin Fowler's somewhat postive review of Oslo, I decided to give it a test drive.

I downloaded the Oslo SDK from MSDN. The SDK contains two of the three Oslo components: M (the modeling language) and Oslo Repository, but missing the visual model editor, Quadrant. Follow instructions shown in videos on the Oslo developer site, I was able to create several simple models and store them into the repository. The SDK includes an implementation of Business Process Modeling Notation (BPMN) model. The BPMN model shows how typical DSL models can be implemented in M. The implementation style is similar to what one would do using other schema languages, e.g., XSD or RELAX NG.

M provides features not available in typical XML schema languages. For example, M supports import/export of types and allows functions be defined to compute values. M reminds me of a couple Object-Oriented DataBase (OODB) schema languages. In fact, Oslo is tightly coupled with the SQL server. M models are compiled into T-SQL code that can be run on the SQL server. The following is an example of an addresses model implemented in M:

module CV
{
    type Address 
    { 
        Id : Integer32 = AutoNumber();
        Street : Text;
        Zip : Integer32; 
    } where identity(Id);
		
    Addresses : Address*;  // a collection, i.e., table
		
    MatchingZips(TargetZip : Integer32)  // a function
    { 
      from a in Addresses 
      where a.Zip == TargetZip 
      select a
    }
}

and the corresponding compiled T-SQL code:

create table [CV].[Addresses]
(
  [Id] int not null identity,
  [Street] nvarchar(max) not null,
  [Zip] int not null,
  constraint [PK_Addresses] primary key clustered ([Id])
);
go

create function [CV].[MatchingZips]
(
  @TargetZip as int
)
returns table
  as return (
    select [a].[Id] as [Id], [a].[Street] as [Street], [a].[Zip] as [Zip]
    from [CV].[Addresses] as [a]
    where [a].[Zip] = @TargetZip
  )
go

After few hours, my first impression of Oslo is not as warm as Martin's. I found that M and Oslo repository work without problems. The idea of translating models into SQL is interesting. There are also other interesting features in Oslo, but nothing that can be considered as great innovations in modeling yet. Overall, I think Oslo can become a solid product... and will likely revisit it again later.

Comments:

[Trackback] Microsoft "Oslo" Resources " Oslo" Developer Center Download the "Oslo" SDK Ask a Question About "Oslo

Posted by System.Blog.Martens.Ben on November 04, 2008 at 11:57 AM PST #

Post a Comment:
Comments are closed for this entry.

Calendar

Feeds

Search

Links

Navigation

Referrers