David Langworthy Architect Microsoft Corporation Don Box Distinguished Engineer Microsoft...
Transcript of David Langworthy Architect Microsoft Corporation Don Box Distinguished Engineer Microsoft...
"Oslo" – The LanguageBuilding Domain Models in “M”
David LangworthyArchitectMicrosoft Corporation
Don BoxDistinguished EngineerMicrosoft Corporation
TL27
What Is "Oslo"?The platform for model-driven applications
“M”Modeling language
“Quadrant”Modeling tool
RepositoryModel store
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
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
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
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
Domain Model Toolchain
M.exeDomain Model
Compiler
MX.exeDomain Model
Loader
ModelA.mModelB.m
ModelC.m ModelABC.mx
SQLServer
M Framework
M Framework
"M" in Action
demo
Domain Modeling Constructs
Extents declare storage for values Types constrain values in a given context Explicit identity enables references Functions name parameterized expressions
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
MrEPL
demo
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
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
Evals & Recordings
Please fill
out your
evaluation for
this session at:
This session will be available as a recording at:
www.microsoftpdc.com
Please use the microphones provided
Q&A
© 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.