ARC411 Domain Specific Language Tools For Model-Driven Development In Microsoft

ARC411
Domain Specific Language
Tools For Model-Driven
Development In Microsoft
Visual Studio 2005
Jochen Seemann
Program Manager
Enterprise Tools
Microsoft Corporation
Visual Languages
Important
Shapes
Links, ends, style
Labels
Nesting
Layout, routing
Corona
property
label
Shape
members
Corona
Base
Corona
Group
playing
waiting
pause
begin
running
stop
R
0.1R
C
+v
0.1R
R
C
0.7CR
0v
Domain Specific Languages In
The Context Of The DSL Tools
Visual Languages…
To understand or define requirements
To understand or define design
To generate parts of the solution
To implement design patterns for
specific frameworks and architectures
To customize applications and
application components
To visualize existing systems
Building A Designer For
Visual Studio
Toolbox
Explorer
Property
Browser
Validation
Drawing surface
with domain
specific notation
Visual Studio Team Edition
Visual Studio Team Edition
Visual Studio Team Edition
Software Architects
Software Developers
Software Testers
Application Designer
Dynamic Code Analyzer
Load Testing
System Designer
Static Code Analyzer
Manual Testing
Logical Datacenter Designer
Code Profiler
Test Case Management
Deployment Designer
Unit Testing
Modeling Platform
DSL Tools
Code Coverage
Class Designer (in Visual Studio Standard Edition and higher)
Visio for Enterprise Architects
(in MSDN Premium Subscription)
Team Explorer (includes Team Foundation Server CAL)
Visual Studio Professional Edition
Visual Studio
Team Foundation Server
Change Management
Reporting
Integration Services
Team Build
Work Item Tracking
Project Portal
Project Management
Visual Studio Industry Partners
Process and Architecture Guidance
Visual Studio Team System
A SDK To Build Visual
Modeling Tools
DSL Tools for Visual Studio
Visual
Studio
2005
Distributed
Systems
Designers
Class
Designer
Your new
Designer
Microsoft Modeling Platform
In Visual Studio
Modeling Platform
Visual Studio UI
Integration for
components like
Toolbox, Menus
Shell
Framework
Extensible drawing
surface with
support for routing
Microsoft
Modeling Platform
and auto-layout
In Visual Studio
Validation
Framework
Constraint checking
and guides user to
resolve issues
Design Surface
Framework
Artifact
generation
Template
Engine
Domain Model
Framework
In-Memory graph database with
rich services (e.g., transactions,
serialization…) and queries
A Simple Workflow Language
Already
Thirsty
Attend
DSL Session
Fascinated
by DSL Tools
Thirsty
now
Try out
DSL Tools in
Hands-On Lab
Too late
TechEd
Party
Tonight
Define Domain Model
Task Class
Attend
DSL Session
Try out
DSL Tools in
Hands-On Lab
TechEd
Party
Tonight
Define Domain Model
Inheritance
Attend
DSL Session
Try out
DSL Tools in
Hands-On Lab
TechEd
Party
Tonight
Define Domain Model
Relationships
Attend
DSL Session
Try out
DSL Tools in
Hands-On Lab
TechEd
Party
Tonight
Define Shape
Rounded Rectangle
 Outline color: black
 Fill color: gray
Attend
DSL Session
Text Decorator
 Position: center
Define Connector
Appearance
Attend
DSL Session
Text Decorator
 Position: Source, Top
Fascinated
by DSL Tools
Try out
DSL Tools in
Hands-On Lab
Connector
 solid
 black
 filled arrowhead
Define Connector
Visual Syntax
Attend
DSL Session
Try out
DSL Tools in
Hands-On Lab
TechEd
Party
Tonight
Define Mapping
Shape
Attend
DSL Session
Domain Model
Building A Designer
Notation
Definition
Mapping
Definition
Code/
Artifact
Generation
Custom
XML
Serialization
Validation/
Constraints
Domain
Model
Definition
Code generated
by DSL Tools
Custom
Behavior
Custom Code
(SDK)
First Example
Building a simple
workflow designer
Define a domain model
Define shapes
Define mapping
Generate code
Build designer
Run designer
Generators Based On Templates
Model
7
prospect
initiated
prospective sale prospect
cancels
1 week delay
overflow
accumulator
Sat
4
weeklyempty
£30
£20
£
31
salesperson’s
account
monthlypay
bank a/c
Template
Queries
standardStuff;
standardStuff;
<# foreach Task t in this.Workflow.Tasks
{
#>
class <#= t.Name #> : TaskBase
{…}
<# }
#>
moreStandardStuff; …
Generated
Code
standardStuff;
standardStuff;
class DoFirst : TaskBase {…}
class DoNext : TaskBase {…}
…
Software Factories
Multiple Designers
Model 1 – Flow
7
prospect
initiated
prospective sale prospect
cancels
1 week delay
overflow
accumulator
Sat
4
weeklyempty
31
7
£30
£20
£
Model 3 – Control
<xxx yyy>
<zzz />
</xxx>
£
salesperson’s
account
monthlypay
bank a/c
Model 2 – Entities
Flow aspect
code
Control aspect
code
Entities aspect
code
Generating Artifacts
From Models
Define a simple html report
Create a report
Example: Entity Designer
Example: Utility For VSTS
Second Example
Building a business entity
designer with code generation
Review domain model
Review shape definition
Build and run designer
Build sample model
Review code generation
Generate WinForm code for business entity
Open WinForm for business entity
What’s Next?
DSL Tools are in an early stage
CTP releases for Visual Studio 2005 available
Continue to release every 2-3 months with
growing feature set
Designer SDK
Model Data Access
Model Validation
UI and Designer Behavior
Custom XML Serialization
Richer design experience for Domain Models,
Notation and Mapping
Multiple Views and Multiple Models
Designer Deployment Support
Microsoft Domain Specific Language
(DSL) Tools For Visual Studio 2005
Generates executable designer based
on description of the “Domain Specific
Language” (DSL) used in the designer
Generated Designer
Is a complete usable tool (fully functional,
undo, persistence/XML file support… )
Is starting point of designer development
(SDK, artifact generation… )
Community And Resources
DSL Tools Homepage
http://lab.msdn.microsoft.com/teamsystem/workshop/dsltools/
DSL Tools Community Forum
http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=61
Software Factories
http://msdn.microsoft.com/architecture/overview/
softwarefactories/
Your Feedback
is Important!
Please Fill Out a Survey for
This Session on CommNet
© 2005 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.