170 likes | 285 Views
TL27. "Oslo" – The Language Building Domain Models in “ M ”. David Langworthy Architect Microsoft Corporation. Don Box Distinguished Engineer Microsoft Corporation. What Is "Oslo"? The platform for model-driven applications. “ M ” Modeling language . “Quadrant” Modeling tool.
E N D
TL27 "Oslo" – The LanguageBuilding Domain Models in “M” David Langworthy Architect Microsoft Corporation Don Box Distinguished Engineer Microsoft Corporation
What Is "Oslo"?The platform for model-driven applications “M” Modeling language “Quadrant” Modeling tool Repository Model 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 DSLX DSLY Point.m Domain Model DomainX.m Domain Model DomainY.m Domain Model GPSLanguage.mg Domain Grammar DomainX.mg Domain Grammar DomainY.mg Domain Grammar "M" Domain-specific data models • type Point { • X : Integer where X < 100; • Y : Integer?; • DistanceFromOrigin() { SQRT(X*X + Y*Y) } • } MSchema Domain-specific grammars • language GPSLanguage { • syntax Main = h:Integer ("," v:Integer)? • => Point { X { h }, Y { v }};} MGrammar Abstract data model • Point { X { 100 }, Y { 200 } } 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
Sample Fill Sample Fill Sample Fill Domain Model Toolchain M.exe Domain Model Compiler MX.exe Domain Model Loader ModelA.m ModelB.m ModelC.m ModelABC.mx SQL Server M Framework M Framework
demo "M" in Action
Domain Modeling Constructs • Extents declare storage for values • Types constrain values in a given context • Explicit identity enables references • Functions name parameterized expressions
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 The M Framework
demo MrEPL
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 • SEE THE OTHER TALKS • “Oslo”: The Language • “Oslo”: Customizing and Extending the Visual Design Experience • “Oslo”: Repository & Models • “Oslo”: Building Textual DSLs USE THE BITS VPC in the “Goods” Hard Drive http://msdn.microsoft.com/oslo GIVE US FEEDBACK douglasp@microsoft.com vijayeg@microsoft.com
Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
Q&A Please use the microphones provided
© 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.