David Langworthy Architect Microsoft Corporation Don Box Distinguished Engineer Microsoft...

17
"Oslo" – The Language Building Domain Models in “M David Langworthy Architect Microsoft Corporation Don Box Distinguished Engineer Microsoft Corporation TL27

Transcript of David Langworthy Architect Microsoft Corporation Don Box Distinguished Engineer Microsoft...

Page 1: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

"Oslo" – The LanguageBuilding Domain Models in “M”

David LangworthyArchitectMicrosoft Corporation

Don BoxDistinguished EngineerMicrosoft Corporation

TL27

Page 2: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

What Is "Oslo"?The platform for model-driven applications

“M”Modeling language

“Quadrant”Modeling tool

RepositoryModel store

Page 3: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

Why “M”?

We want creating and interacting with Oslo content to be simple and natural Having a box-and-line design experience is an

important enabler Having a complementary textual experience is

equally important “M” is how we achieve the latter

Page 4: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

What Is “M”?

“M” is a language for defining domain models and textual domain-specific languages (DSLs)

M domain models define schema and query over structured data Values, Constraints, and Views Natural projection to SQL

M DSLs define projections from Unicode text to structured data Rule-based transformation Grammar-driven text editor integration

Page 5: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

The “M” Language

DSL

"M"

Domain-specific grammars

Abstract data model

Domain-specific data models

language GPSLanguage { syntax Main = h:Integer ("," v:Integer)? => Point { X { h }, Y { v }};}

type Point { X : Integer where X < 100; Y : Integer?; DistanceFromOrigin() { SQRT(X*X + Y*Y) }}

Point { X { 100 }, Y { 200 } }

Point.mDomain Model

DSLY

DomainY.mgDomain Grammar

DSLXDomainX.mDomain Model

DomainY.mDomain Model

DomainX.mgDomain Grammar

GPSLanguage.mgDomain Grammar

MSchema

MGrammar

MGraph

Page 6: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

What “M” Is Not

An object-oriented language No polymorphism, virtual dispatch “Is-a” determined based on structural

subtyping, not stipulation A data access technology

M domain models compile down to T-SQL Tool chain supports course-grained

loading/unloading of schemas and values – not an OLTP solution

A replacement for T-SQL Far less expansive feature set Tool chain supports linking/invoking T-SQL

Page 7: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

Domain Model Toolchain

M.exeDomain Model

Compiler

MX.exeDomain Model

Loader

ModelA.mModelB.m

ModelC.m ModelABC.mx

SQLServer

M Framework

M Framework

Page 8: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

"M" in Action

demo

Page 9: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

Domain Modeling Constructs

Extents declare storage for values Types constrain values in a given context Explicit identity enables references Functions name parameterized expressions

Page 10: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

The M Framework

M is itself implemented as M DSL Parser exposed using M DSL machinery Type flow exposed as framework component

SDK ships with an evaluator (MrEPL) that builds on both

Page 11: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

MrEPL

demo

Page 12: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

Where Are We?

“M” is the language for defining domain models and textual DSLs in Oslo

“M” domain models based on values, views and constraints

“M” domain models have a natural projection to SQL

Page 13: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

Call To Action

USE THE BITSVPC in the “Goods” Hard Drivehttp://msdn.microsoft.com/oslo

GIVE US [email protected]@microsoft.com

SEE THE OTHER TALKS“Oslo”: The Language“Oslo”: Customizing and Extending the Visual Design Experience“Oslo”: Repository & Models“Oslo”: Building Textual DSLs

Page 14: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

Evals & Recordings

Please fill

out your

evaluation for

this session at:

This session will be available as a recording at:

www.microsoftpdc.com

Page 15: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

Please use the microphones provided

Q&A

Page 16: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.

© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market

conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 17: David Langworthy Architect Microsoft Corporation  Don Box Distinguished Engineer Microsoft Corporation TL27.