Upload
eric-booth
View
219
Download
2
Embed Size (px)
Citation preview
Introduction to “Oslo”
Jeremy BoydDirector – Mindscape
MSDN Regional Directorhttp://turtle.net.nz/blog
What is “Oslo”?
• “Platform for Model Driven Applications”Capture the intent of the business in terms that are equally understood by humans and computers
aka Next Generation Application Platform
• Language for describing Data and DSL’s• Repository for Models• Tools for building models
MODEL-ASSISTEDModels used to understand or manipulate code Examples: Static Structure, Sequence, …
DRAWINGSModels used to communicate with othersExamples: Dataflow, Use Case, …
MODEL-DRIVENModels executed by runtimes directlyExamples: HTML, CSS, XAML, BPEL, …
What is a Model?
Domain Models
• Complex Domain Designs should be based on a model– If we can decouple from infrastructure– Underpins other patterns– Sits well in an Object Oriented world
“An object model of the domain that incorporates both behaviour and domain”
- Martin Fowler
Why is this happening?
TRANSPARENCYBetter understanding of your application
FLEXIBLITYFaster changes to your application
PRODUCTIVITY“More essence, less ceremony”
Domain Driven• Both a way of thinking, and a set of priorities when
building software• Encourages/requires tighter collaboration between
development team and domain experts• Evolved by continuous learning
“For most software projects the primary focus should be on the domain and the domain logic”
- Eric Evans
What is "Oslo"?
“M”The language for authoring models & DSLs
“Quadrant”The tool for interacting with models & DSLs
RepositoryThe database for storing & sharing models
Domain Specific Languages
• A programming or specification language dedicated to a particular problem domain
• Less comprehensive as a language• More expressive about the domain• At the level of abstraction of the domain• Enhances reuse and maintainability• Can be used by “lay-programmers”
[Your Models]
Base Models
“M” Runtime
REPOSITORYSQL SERVER
[Your Models]
Base Models
“M” Runtime
REPOSITORYSQL SERVER
"Oslo" Architecture
RUNTIMES
[Your Runtime]
“Dublin”
ASP.NET
WF
WCF
SQL/EDM
WindowsOther ISV Runtimes
ADO .NET
XML, Custom Formats, …
“QUADRANT”
Composition
Generic Viewers
Dataflow
EDITORFRAMEWORK
[Your Visual DSL] [Your Textual DSL]
MSchema
MGrammar
MGraph
LANGUAGEFRAMEWORK
[Your Models]
.Net Models
Repository Models
REPOSITORYSQL SERVER
OTHER TOOLS
(VSTS, EXCEL, …)
XML, Custom Formats, …
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
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
3 Basic Concepts
• A value is simply data that conforms to the rules of the M language
• A type describes a set of values• An extent provides dynamic storage of
values
What is “M”?
• MSchema– Describes types– What XSD is to XML for MGraph
• MGraph– Describes instance data (Entities)– Similar to JSON format
• MGrammar– Allows authoring of DSLs over your type
system/data
MSchema
type Address{ Street: Text; City: Text; State: Text; ZipCode: Integer32; } where identity Street;
MGraph Products { LightSpeed { Id = 1, Name = "LightSpeed", Description = “A Domain Modelling Framework" }, WPFPropertyGrid { Id = 2, Name = "WPF Property Grid", Description = “A Property Grid for WPF" } };
MGrammar
• Tokens define the “words” of your language• Syntax defines the “sentences” of your
language
1,2e.g. syntax Number = “0”..”9”or h:Number("," v:Number)?
=> Point { X { h }, Y { v }};
language DemoCoder{
syntax Main = Prefix “, “ Suffix;syntax Prefix = “Hello”;syntax Suffix = “World” | “Oslo”;syntax Greetings(pre, suf) = pre suf;syntax Foo = “Foo” => Product { 1 };
};
What “M” Is Not
• An object-oriented language– No polymorphism, virtual dispatch
• 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
“Quadrant”
• Tool for building and manipulating visual models and DSLs.
• Design workflows, processes and generally manipulate instances of models
• Not currently available except on PDC VPC• Has been shown in relation to WF 4.0 editing
experience
So what does this mean?
• Its all about this whole Model Driven Development idea..
• Nicely complements all the other code gen/automation we are likely to be doing currently
• Brings the business closer to the software
What are others doing?
• Microsoft– “Dublin” process server provides a runtime for
hosting workflow models– Windows Workflow 4.0 describes models in M
• ISV’s– Leveraging M and Quadrant for CASE style tools– Mschema/Mgraph as input to code generation /
software factories within existing tool sets
What we are doing?
• Domain Model / ORM Framework
• Using M as inputs for domain modelling• Infer validation constraints etc from schema• Mgraph as input for in test data sets
Thank you!
• Links:– http://msdn.microsoft.com/oslo– http://www.mindscape.co.nz
• Email: [email protected]• Blog: http://turtle.net.nz/blog