400 likes | 527 Views
The “Oslo” Back Story. “Oslo” 2007: Multi-year, Multi-product vision. “Oslo” 2008: Modeling Platform. “Oslo” 2009: SQL Server Modeling. A LAP AROUND “OSLO”. A DESCRIPTION OF A GIVEN DOMAIN. What is a Model?. DRAWINGS Models used to communicate with others
E N D
A DESCRIPTION OF A GIVEN DOMAIN What is a Model? DRAWINGS Models used to communicate with others Examples: Dataflow, Use Case, … MODEL-ASSISTED Models used to understand or manipulate code Examples: Static Structure, Sequence, … MODEL-DRIVEN Models executed by runtimes directly Examples: HTML, CSS, XAML, BPEL, …
Model-driven Platform DECLARATIVE CONTENT .NET 3.0 wpf:ContentControl wf:StateMachine Web Services xsd:schema wsdl:definitions .NET 1.0 app.config [YourAttributeHere] COM (+) [Transaction] midl.exe TIME
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”
Data and Modeling Visual Studio “Quadrant” Entity Framework Data Services ADO.NET “M”/EDM SQL Azure SQL Server … SQL Server Modeling Services
THE PLATFORM FOR MODEL-DRIVEN APPLICATIONS What is "Oslo"? “M” Modelling language “Quadrant” Modelling tool SQL Server Modeling Services Model store
Key "Oslo" Concepts TEXTUALDSLs VISUAL DSLs MODELS RUNTIMES
"Oslo" Architecture “QUADRANT” RUNTIMES [Your Textual DSL] [Your Visual DSL] EDITOR FRAMEWORK LANGUAGE FRAMEWORK Composition [Your Runtime] Generic Viewers MSchema “Dublin” Dataflow MGrammar ASP.NET MGraph XML, Custom Formats, … WF WCF REPOSITORY SQL SERVER REPOSITORY SQL SERVER SQL/EDM ADO .NET Windows Other ISV Runtimes REPOSITORY SQL SERVER [Your Models] [Your Models] Base Models Base Models [Your Models] OTHER TOOLS (VSTS, EXCEL, …) XML, Custom Formats, … “M” Runtime “M” Runtime .Net Models Repository Models
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) Base Domain Library BDL SQL ServerModeling Services Database
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 BDL Modeling Services Database
Repository Capabilities • Repository features are built on SQL Server • Repository install also turns on useful features, e.g. replication and mirroring Repository catalog, secure views, auditing,versioning, claims-based security, glob/loc, etc. Repository Features system catalog, Change Data Capture,replication, SSIS, mirroring, security, etc. SQL Server 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
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” T-SQL Specification Grammar Specification EDMX Specification
The "M" Language DSL DSLX DSLY Point.m Domain Model DomainX.m Domain Model DomainY.m Domain Model PointLanguage.mg Domain Grammar DomainX.mg Domain Grammar DomainY.mg Domain Grammar "M" Domain-specific data models • type Point { • X : Integer; • Y : Integer; • } MSchema Domain-specific grammars • language PointLanguage { • syntax Main = h:Integer "," v:Integer • => Point { X { h }, Y { v }};} MGrammar Abstract data model • Point { X { 100 }, Y { 200 } } MGraph
Your Models “M” Code Microsoft.Uml2 “M” Command-Line Tools System_Runtime BDL System.Identity Modeling Services Database
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
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
SERVICES SHELL AND SURFACE COMPOSITION 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 Target Data View State Configuration REPOSITORY
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
Bits • http://msdn.com/data • 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