Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

An Evening Of DSLs: Microsoft Oslo


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.

  • Be the first to comment

  • Be the first to like this

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:<br />Blog:<br />Email:<br />Twitter: lynchjames<br />