DSL DSL * * Tools in Visual Tools in Visual Studio Studio Stuart Kent Stuart Kent Senior Program Manager Senior Program Manager Visual Studio Team System – DSL Tools Visual Studio Team System – DSL Tools http://blogs.msdn.com/stuart_kent http://blogs.msdn.com/stuart_kent http://lab.msdn.microsoft.com/vs2005/teamsystem/worksho http://lab.msdn.microsoft.com/vs2005/teamsystem/worksho p/dsltools/ p/dsltools/ * DSL = Domain Specific Language
20
Embed
DSL * Tools in Visual Studio Stuart Kent Senior Program Manager Visual Studio Team System – DSL Tools
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
DSLDSL** Tools in Visual Studio Tools in Visual Studio Stuart KentStuart Kent
Senior Program ManagerSenior Program Manager
Visual Studio Team System – DSL ToolsVisual Studio Team System – DSL Tools
To write interpreted configuration filesTo write interpreted configuration files
Often expressed in XMLOften expressed in XML
To provide a domain-specific abstractions for the purposes of…To provide a domain-specific abstractions for the purposes of…
Simulation/animationSimulation/animation
Monitoring system executionMonitoring system execution
What-if analysisWhat-if analysis
Metric takingMetric taking
Generating business plans and reportsGenerating business plans and reports
……
As part of a software factoryAs part of a software factory
Combines all of the above Combines all of the above
How are DSLs implemented now?How are DSLs implemented now?
XMLXMLSyntax very raw, no graphicsSyntax very raw, no graphics
Validation weakValidation weak
Multiple cross-referencing docs are difficult to manageMultiple cross-referencing docs are difficult to manage
N.B. Required for large models in a team environmentN.B. Required for large models in a team environment
UML profiles (UML + stereotypes / tagged values)UML profiles (UML + stereotypes / tagged values)XML persistence ugly & hard to handleXML persistence ugly & hard to handle
Stereotypes / tagged values not very powerfulStereotypes / tagged values not very powerful
UML profiles can bear little semantic resemblance to UML profiles can bear little semantic resemblance to mainstream UMLmainstream UML
Game of square peg in round holeGame of square peg in round hole
Packaging in UML is not so conducive to working with large Packaging in UML is not so conducive to working with large models in a team environmentmodels in a team environment
How are DSLs implemented now?How are DSLs implemented now?
MOF/EMFMOF/EMFDeals with conceptual aspects of languageDeals with conceptual aspects of language
Rest of designer/editor is hand-codedRest of designer/editor is hand-coded
In meta-environmentsIn meta-environmentsReleases a meta-monster that can be hard to tameReleases a meta-monster that can be hard to tame
Often doesn’t scale to large models in a team Often doesn’t scale to large models in a team environmentenvironment
Tools not integrated into familiar IDEsTools not integrated into familiar IDEs
DSL Tools in Visual Studio – V1DSL Tools in Visual Studio – V1
To make it cost-effective to develop DSL-To make it cost-effective to develop DSL-specific, visual designers hosted in Visual Studiospecific, visual designers hosted in Visual Studio
For SI’s & large enterprises (at least)For SI’s & large enterprises (at least)
For a particular class of DSLsFor a particular class of DSLs
In a way that makes the model data easily In a way that makes the model data easily accessible by automation tools, that are easy to accessible by automation tools, that are easy to author using XML and/or .Net technologyauthor using XML and/or .Net technology
In a way that enables working with large models in a In a way that enables working with large models in a team environmentteam environment
To make it cost-effective to author DSL-driven To make it cost-effective to author DSL-driven code/artefact generatorscode/artefact generators
Mainline scenarioMainline scenarioWizard
Creates and configures VS “MDF Designer”
solution from (a) template(s)
Define DSL
Object model editorStructure
SerializationConstraints
Notation editorNotationExplorer
Properties gridValidation behaviour
Add codeBody of constraints
Diagram layoutOther enrichments
F5Generate
BuildLaunch VS Exp on debugging
solution
Debug
Build installer for deployment
DemoDemo
We’ll build a designer from scratchWe’ll build a designer from scratch
Here’s a screenshot of the target Here’s a screenshot of the target designer…designer…
DSL Tools in Visual Studio DSL Tools in Visual Studio Stuart KentStuart Kent
Senior Program ManagerSenior Program Manager
Visual Studio Team System – DSL ToolsVisual Studio Team System – DSL Tools