THE “OSLO” BACK STORY
A LAP AROUND “OSLO”
What is a Model? A DESCRIPTION OF A GIVEN DOMAIN MODEL-ASSISTED Models used to understand or manipulate code Examples: Static Structure, Sequence, … DRAWINGS Models used to communicate with others Examples: Dataflow, Use Case, … MODEL-DRIVEN Models executed by runtimes directly Examples: HTML, CSS, XAML, BPEL, …
Model-driven Platform COM (+) midl.exe [Transaction] DECLARATIVE CONTENT TIME.NET 1.0 [YourAttributeHere] app.config Web Services wsdl:definitions xsd:schema.NET 3.0 wf:StateMachine wpf:ContentControl
Model-driven Applications Textual domain specific language (CAML) Visual designer (SharePoint Designer) Application definition stored in database Textual domain specific language (X++) Visual designer (MorphX) Application definition stored in database
Why is this happening? TRANSPARENCY Better understanding of your application FLEXIBLITY Faster changes to your application PRODUCTIVITY “More essence, less ceremony”
SQL Server SQL Azure Visual Studio“Quadrant” SQL Server Modeling Services Entity Framework ADO.NET“M”/EDM Data Services … Data and Modeling
What is "Oslo"? THE PLATFORM FOR MODEL-DRIVEN APPLICATIONS SQL Server Modeling Services Model store “Quadrant” Modelling tool “M” Modelling language
Key "Oslo" Concepts MODELS TEXTUAL DSLs VISUAL DSLs RUNTIMES
“QUADRANT” Composition Generic Viewers Dataflow EDITOR FRAMEWORK [Your Visual DSL] [Your Textual DSL] MSchema MGrammar MGraph LANGUAGE FRAMEWORK [Your Models] Base Models “M” Runtime REPOSITORY SQL SERVER [Your Models] Base Models “M” Runtime REPOSITORY SQL SERVER "Oslo" Architecture RUNTIMES [Your Runtime] “Dublin” ASP.NET WF WCF SQL/EDM Windows Other ISV Runtimes ADO.NET XML, Custom Formats, … [Your Models].Net Models Repository Models REPOSITORY SQL SERVER OTHER TOOLS (VSTS, EXCEL, …) XML, Custom Formats, …
ONE TRUTH
SQL SERVER MODELING SERVICES
To provide a database designed for models – Focuses on application metadata – Optimizes storing many models in one database – Supports secure data sharing and reuse To provide common model schemas – Build models that relate to the application lifecycle – Enable Microsoft and third-party solutions
Modeling Services Database: A SQL Server 2008 database with the Base Domain Library (BDL) SQL Server Modeling Services Database Base Domain Library
Modeling Services database features: – Contains each model in its own SQL Server schema – Organizes data hierarchically – Implements fine-grained security (row-level) – Supports localized strings and resources – Supports change tracking and audit trails – Uses a “natural” database structure that supports standard data access technologies and ad hoc queries
Repository Capabilities Repository features are built on SQL Server – Repository install also turns on useful features, e.g. replication and mirroring system catalog, Change Data Capture, replication, SSIS, mirroring, security, etc. SQL Server Features Repository catalog, secure views, auditing, versioning, claims-based security, glob/loc, etc. Repository Features
Types of Models Structural Models – Model definitions – Represented by table structure Instance Models – Model instances – Represented by data in structural model tables
Repository Summary Repository is optimized for many reads, few writes Contains models for “Oslo” app domains Can be extended with M Models can be deployed, secured and versioned
THE MODELLING LANGUAGE
Why “M”? Interacting with Oslo content needs to be simple and natural Textural based modelling language
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
codename “m”: a language for data “M” EDMX Specification T-SQL Specification Grammar Specification
The "M" Language DSL "M""M" Domain-specific grammars Abstract data model Domain-specific data models language PointLanguage { syntax Main = h:Integer "," v:Integer => Point { X { h }, Y { v }}; } type Point { X : Integer; Y : Integer; } Point { X { 100 }, Y { 200 } } Point.m Domain Model Point.m Domain Model DSL Y DomainY.mg Domain Grammar DomainY.mg Domain Grammar DSL X DomainX.m Domain Model DomainX.m Domain Model DomainY.m Domain Model DomainY.m Domain Model DomainX.mg Domain Grammar DomainX.mg Domain Grammar PointLanguage.mg Domain Grammar PointLanguage.mg Domain Grammar MSchema MGrammar MGraph
“M” Code “M” Command-Line Tools System_Runtime Microsoft.Uml2 System.Identity BDL
M Tool Chain M.exe Domain Model Compiler MX.exe Domain Model Loader ModelA.m ModelB.m ModelC.mModelABC.mx SQL Server M Framework
INTELLIPAD
IntelliPad Editing Tool Simple text based code editor Supports “M” languages Provides instant feedback of code compilation – Great for learning “M” languages Visual Studio can also be used for “M” – Most likely scenario in real projects
IntelliPad Editing Tool Modelling data in IntelliPad TSQL code is created instantly
M: Visual Studio
DEMO
QUADRANT A DEVELOPER TOOL FOR SQL
What is "Quadrant"? Graphical tool used for managing instance models – Targeted at architects and business analysts Loads model definitions from repository database – Allows management of instances – Changes are saved to database immediately
Quadrant Modelling Tool
REPOSITORY SHELL AND SURFACESERVICESCOMPOSITION ENGINE Nesting Sizing Layout Snapping "Quadrant" Architecture Core Services Undo/Redo Commands Drag/Drop Selection Activation Error Handling General Services Search Validation Annotations Relationship Highlighting DATAFLOW ENGINE Caching, Virtualization, Change tracking, and Notification DATAFLOW ENGINE Caching, Virtualization, Change tracking, and Notification Target DataView StateConfiguration
SUMMARY
pit of success start with the database – “database is the truth” – why? it already exists, or you want low level control over the database – what? import model into edmx and tweak start with an edmx model – “edmx is the truth” – why? you want separation from code and database in a declarative format – what? create a model and tweak start with.net classes – “code is the truth” – why? primarily focused on code shape, database is an implementation detail – what? define classes in code, adjust shape using contextbuilder
Future Domain Models
Bits SDK Download SDK Contains Repository database “M” modelling language (MSchema, MGrammer) IntelliPad editor NOW WITH ADDED “Quadrant” Community BoggersGuides.net Use “Oslo” today Use “M” to model a database! MGrammar Language for creating textual DSLs Specification will be released under OSP