Download presentation
Presentation is loading. Please wait.
Published byIrene Stevens Modified over 9 years ago
1
DSL * Tools in Visual Studio Stuart Kent Senior Program Manager Visual Studio Team System – DSL Tools http://blogs.msdn.com/stuart_kent http://lab.msdn.microsoft.com/vs2005/teamsystem/workshop/dsltools/ * DSL = Domain Specific Language
2
What is a domain? Implementation Specification Requirements Deployment Business Systems Real-Time Systems Aircraft control systems Airline Baggage Handling Systems Insurance Management Systems
3
What is a language? C(x) h C(x) t 2m x ih = – TextualPictorial Declarative Procedural class Magnox : NuclearPowerStation { public void dropRods () jo biscuits 24 green pat cakes 32 pink Employee name address promote Job description pay assign 0..* a>b && c==d call Call Record call length base rate: £/s store 07713248
4
Domain Specific Languages (DSLs) make problems “Small Scale” Small scale = Not much design beyond existing platform easy to understand agile small team early prototypes easy maintenance changes inexpensive
5
Finding prime numbers is Small Scale … If we have a system that can: do multiplication and division do things repeatedly _*_ _/_ _%_ while (…) {…} C, Pascal, Fortran,… Von Neumann computer with conventional CPU language: platform:
6
Finding parts lists is Small Scale … If we have a system that can: keep large lists of parts & scan them quickly combine and filter the lists efficiently CREATE … JOIN … … WHERE … JOIN … … WHERE … SELECT … Relational Database SQL platform: language:
7
Developing a GUI is Small Scale … If we have a system that can: display combinations of windows and widgets show things and interact with user in them Visual programming languages Interactive app platform platform: language:
8
if we have a language of phone billing and a platform to run it on Phone billing systems are Small Scale … Phone Billing Engine call calendar month Call Record call length base rate: £/s call length friend discount rate: £/s store friends calls other calls - bill billing period store Telephone Billing Scheme
9
prospect initiated prospective sale empty overflow Sat weekly accumulator 4 £20 1 week delay £30 prospect cancels salesperson’s account 31 monthly bank a/c pay 7 £ tablet PC customer -facing developer animator prototype for review tweak hack Using a domain specific language generator phone bill system
10
Other things you can do… prospect initiated prospective sale empty overflow Sat weekly accumulator 4 £20 1 week delay £30 prospect cancels salesperson’s account 31 monthly bank a/c pay 7 £ generator phone bill system animator prototype for review generator list of parts generator business plan C# XML C# C#, Java XML SQL mixed code and config files
11
prospect initiated prospective sale empty overflow Sat weekly accumulator 4 £20 1 week delay £30 prospect cancels salesperson’s account 31 monthly bank a/c pay 7 £ animator prototype for review generator phone bill system Other inputs to generation functional model data model existing api model tweak hack functional model refined/augmented for performance refine etc
12
“Mind The Gap” – DSLs & Code Generation
13
What are (could) DSLs (be) used for? To write models that drive code generators Configuring code frameworks, configuring deployment DSL unifies points of variability scattered amongst artefacts Delivers software product lines To write interpreted configuration files Often expressed in XML To provide a domain-specific abstractions for the purposes of… Simulation/animation Monitoring system execution What-if analysis Metric taking Generating business plans and reports … As part of a software factory Combines all of the above
14
How are DSLs implemented now? XML Syntax very raw, no graphics Validation weak Multiple cross-referencing docs are difficult to manage N.B. Required for large models in a team environment UML profiles (UML + stereotypes / tagged values) XML persistence ugly & hard to handle Stereotypes / tagged values not very powerful UML profiles can bear little semantic resemblance to mainstream UML Game of square peg in round hole Packaging in UML is not so conducive to working with large models in a team environment
15
How are DSLs implemented now? MOF/EMF Deals with conceptual aspects of language Rest of designer/editor is hand-coded In meta-environments Releases a meta-monster that can be hard to tame Often doesn’t scale to large models in a team environment Tools not integrated into familiar IDEs
16
DSL Tools in Visual Studio – V1 To make it cost-effective to develop DSL- specific, visual designers hosted in Visual Studio For SI’s & large enterprises (at least) For a particular class of DSLs In a way that makes the model data easily accessible by automation tools, that are easy to author using XML and/or.Net technology In a way that enables working with large models in a team environment To make it cost-effective to author DSL-driven code/artefact generators
17
Mainline scenario
18
Demo We’ll build a designer from scratch Here’s a screenshot of the target designer…
20
DSL Tools in Visual Studio Stuart Kent Senior Program Manager Visual Studio Team System – DSL Tools http://blogs.msdn.com/stuart_kent http://lab.msdn.microsoft.com/vs2005/teamsystem/workshop/dsltools/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.