An Evening Of DSLs: Microsoft Oslo

1,546 views
1,479 views

Published on

It could be argued that the most valuable aspect of Microsoft’s ‘Oslo’ framework is the tooling it provides to create external DSLs. This talk will cover the basics of what is required to create and implement a DSL using Oslo.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,546
On SlideShare
0
From Embeds
0
Number of Embeds
434
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

An Evening Of DSLs: Microsoft Oslo

  1. 1. An Evening of DSLs: ‘Oslo’<br />James Lynch<br />
  2. 2. Whatis Microsoft ‘Oslo’?<br />Difficult to define<br />Connecting Visual and TextualDSLs and SQL Server on the stack<br />Questionablemerits/benefits<br />An immature technology – ‘nascent’ (3rd CTP)<br />
  3. 3.
  4. 4. An ‘Oslo’ Use Case:&lt;plug&gt;bdUnit&lt;/plug&gt;<br />
  5. 5. Whatis Microsoft ‘Oslo’?<br />Create a new language, parser and compiler…<br />BDD Style DSL with C# Unit Tests output<br />WPF IDE<br />Agnostic Unit Tests -&gt; Structure Map to the Rescue!<br />
  6. 6. bdUnit IDE Demo<br />
  7. 7. The Parser: MGrammar<br />
  8. 8. MGrammar and Intellipad<br />Intellipad<br />Tokens and Syntaxes<br />Language Projection(verb, noun, adjective...?)<br />Syntax Delegation<br />Functional Expressions<br />
  9. 9. IntellipadDemo<br />
  10. 10. LowLevel Projection<br />When a @User(Chris) ~Username is &quot;chriscanal&quot; <br /> and a @Post(DSLs) ~Title is &quot;An Evening of DSLs&quot;<br /> and @Blog(ScotAltNet) ~Author is Chris<br /> and @User(Chris) #Publish a @Post(DSLs)<br /> @Blog(ScotAltNet) should have more than0~Entries<br /> and @Blog(ScotAltNet) ~Entriesshould contain a @Post with DSLs ~Title<br /> and @Post(DSLs) ~PublicationDateshould belater than@Blog(ScotAltNet) ~CreatedDate<br /> and @User(Chris) ~PostCountshould be equal to1<br />Object/Entity Token<br />Property Token<br />Method Token<br />Constraint Token<br />Operator Syntax<br />Value Syntax<br />
  11. 11. Projection at a HigherLevel<br />When a @User(Chris) ~Username is &quot;chriscanal&quot; <br /> and a @Post(DSLs) ~Title is &quot;An Evening of DSLs&quot;<br />and @Blog(ScotAltNet) ~Author is Chris<br />and @User(Chris) #Publish a @Post(DSLs)<br />@Blog(ScotAltNet) should have more than 0 ~Entries<br />and @Blog(ScotAltNet) ~Entries should contain a @Post with DSLs ~Title<br />and @Post(DSLs) ~PublicationDate should be later than @Blog(ScotAltNet) ~CreatedDate<br />and @User(Chris) ~PostCount should be equal to 1<br />WhenStatement Syntax<br />TargetList Syntax<br />Constraint Syntax<br />
  12. 12. Textual DSL Pipeline<br />
  13. 13. ‘Oslo’ DSL Pipeline<br /> ‘M’ Language Framework and Tooling<br />You’re on your own!<br />
  14. 14. bdUnit Project: http://assembla.com/spaces/bdunit<br />Blog: http://lynchjames.co.uk<br />Email: lynchjames@gmail.com<br />Twitter: lynchjames<br />

×