Steve Cook, Gareth Jones, Stuart Kent, Alan Cameron Wills9780321398208, 0321398203
Table of contents :
Domain-specific development with Visual studio DSL tools……Page 1
Contents……Page 8
List of Figures……Page 18
List of Tables……Page 26
Foreword……Page 28
Preface……Page 30
About the Authors……Page 36
Introduction……Page 38
Domain-Specific Development……Page 39
Examples……Page 41
Software Defined Circuitry……Page 45
Software Development Process Customization……Page 46
Benefits……Page 47
Languages……Page 48
Textual DSLs……Page 52
Graphical DSLs……Page 57
Conventions for Representing Structure……Page 58
Conventions for Representing Behavior……Page 59
Aspects of Graphical DSLs……Page 60
Generation……Page 61
Serialization……Page 62
Putting It All Together……Page 63
DSLs in Visual Studio……Page 64
The Customization Pit……Page 69
UML……Page 71
Summary……Page 77
Process: Incremental Development of DSLs……Page 78
Generalizing an Application: Identify Variability, Discover DSLs……Page 79
Top-Down and Bottom-Up……Page 83
Developing the DSL: From Sketches to Domain Model……Page 85
Domain Model and Presentation Are Separate……Page 86
Refining the DSL……Page 87
Driving the Framework from the DSL……Page 88
Using the DSL……Page 90
Evolving the DSLs……Page 92
Interpretive Architectures……Page 93
Creating a DSL Authoring Solution in Visual Studio……Page 94
Trying Out the DSL Solution……Page 98
Defining the DSL……Page 101
Generating the Code for the Designer……Page 103
Adding to the DSL……Page 104
Constraints……Page 105
Customizing the Explorer Window……Page 108
Customizing the Properties Window……Page 109
Serialization Format of the DSL File……Page 110
Driving Applications from the DSL……Page 111
Deployment……Page 113
A Second DSL: The Project Definition DSL……Page 114
The Generated Code……Page 115
The Framework Assemblies……Page 116
Content of the DSL Project……Page 118
Content of the DslPackage Project……Page 120
Summary……Page 122
Introduction……Page 124
The Domain Model Designer……Page 125
The In-Memory Store……Page 126
Domain Classes……Page 129
Domain Relationships……Page 135
Embeddings……Page 138
Multiplicity……Page 141
References……Page 142
Relationship Derivation……Page 143
Generating a Designer with No Shapes……Page 145
The Generated Code……Page 146
Using the Generated Code……Page 150
More about Domain Classes……Page 152
DomainClassInfo……Page 155
More about Domain Properties……Page 156
DomainPropertyInfo……Page 158
More on Domain Relationships and Roles……Page 159
Accessing Links……Page 161
More on Relationship Derivation……Page 163
Looking Up Elements……Page 166
DomainModelInfo……Page 167
Summary……Page 168
Introduction……Page 170
Graphical Notation—Overview……Page 171
Diagram and Editor……Page 174
Diagram……Page 175
Editor……Page 178
Custom Editor……Page 179
Shapes……Page 183
Kinds of Shapes……Page 184
Shape Maps……Page 191
Connector Anatomy and Appearance……Page 201
Connector Maps……Page 202
Decorators……Page 204
Kinds of Decorators……Page 205
Positioning……Page 206
Decorator Maps……Page 207
Multiline Text Decorators……Page 210
Variable Image Shape……Page 211
Set a Background Picture……Page 213
Set Custom Connection Points……Page 214
Change Routing Style of Connectors……Page 215
Explorer……Page 217
Default Appearance……Page 218
Changing the Window Icon and Label……Page 220
Customizing the Appearance of Nodes……Page 221
Hiding Nodes……Page 223
Customizing the Explorer through Code……Page 224
Default Appearance of Properties Window……Page 225
Categories, Names, and Descriptions……Page 227
Forwarding Properties……Page 229
Customizing the Properties Window through Code……Page 230
Summary……Page 232
Element Creation……Page 234
The Toolbox……Page 235
Element Merge Directives……Page 237
Custom Element Merge Directives……Page 245
Re-Parenting with Element Merge Directives……Page 248
Custom Element Tool Prototypes……Page 249
Connection Builders……Page 253
Multiple Source and Target Role Directives……Page 254
Multiple Link Connect Directives……Page 256
Custom Connection Builders……Page 259
Default Delete Propagation Rules……Page 266
Controlling Delete Propagation……Page 268
Customizing Delete Propagation……Page 269
Summary……Page 271
Introduction……Page 274
Saving and Loading Models and Diagrams……Page 275
Model XML File Format……Page 276
Elements and Properties……Page 279
Relationships……Page 280
Cross-Referencing……Page 282
Using Guids as References……Page 283
Using Qualified Names as References……Page 285
References to Links……Page 286
Diagram XML File Format……Page 288
Versioning and Migration……Page 291
The XML Schema……Page 294
Customization……Page 295
Modifying XML Element Names……Page 296
Element Data……Page 298
Generated Serialization Code……Page 301
Customized Serialization Code……Page 308
Impact of Customization on the Schema……Page 309
Summary……Page 310
Introduction……Page 312
Choosing Hard or Soft Constraints?……Page 314
Soft Constraints in the DSL Tools……Page 317
Validation Methods……Page 319
Enabling Validation……Page 321
Invoking Validation……Page 325
Custom Validation Categories……Page 326
Validation Output……Page 329
Using Validation Outside the IDE……Page 330
Validation Against External Data……Page 331
Hard Constraints in the DSL Tools……Page 332
Rules……Page 333
Putting Together Hard and Soft Constraints……Page 336
Summary……Page 344
Introduction……Page 346
Extensible Stylesheet Language Transformations……Page 348
Making Use of the Domain-Specific API……Page 351
A Template-Based Approach……Page 356
Complex Relationships and Round-Tripping……Page 358
The Templatization Process……Page 362
The First Cut Template……Page 365
Generation-Specific Model Data……Page 375
Starting to Build a Library……Page 377
Directives……Page 378
Custom Directives……Page 381
Control Block Types……Page 383
Problems of Large-Scale, Real-World Artifact Generation……Page 386
Advanced Customizations……Page 388
Text Templating Architecture……Page 389
Custom Hosting……Page 391
Custom Directive Processor……Page 394
Custom Orchestration……Page 396
Summary……Page 403
Introduction……Page 406
Files Needed to Install a Designer……Page 407
Getting Started—Creating a Setup Project……Page 410
Setup Project Contents……Page 413
Customizing settings.ini……Page 414
The .dslsetup Format……Page 415
……Page 417
……Page 419
……Page 420
……Page 421
……Page 422
Refreshing the Installation Files……Page 424
Package Load Key……Page 425
Creating a Project Template from the Debugging Project……Page 427
Using a Text Template Include File……Page 429
Including Text Templates in the VS Item Template……Page 430
Summary……Page 433
Partial Classes……Page 434
Double Derived—The Generation Gap……Page 435
Customization Switches……Page 436
Custom Overrides……Page 438
Property Handlers “On Value Changed/Changing”……Page 439
Calculated Domain Properties……Page 441
Custom Storage Domain Properties……Page 442
Notify Value Change……Page 444
Propagating Change from Model to Shape: OnAssociatedPropertyChanged……Page 445
Rules……Page 449
Store Events……Page 454
.NET Event Handlers……Page 456
Bounds Rules……Page 457
Summary of Change Propagation and Constraint Techniques……Page 461
DSL Shell Architecture……Page 463
How to Add a Menu Command……Page 466
Increment Menu Resource Index……Page 467
Add Commands to Command Set……Page 468
Define the Command Handlers……Page 469
Good Practices for Command Handlers……Page 471
Building the DSL Diagram into Another Interface……Page 472
The Copy Method……Page 474
The Paste Method……Page 475
Registering the Menu Handlers……Page 477
Child Shapes……Page 479
A DSL Using Nested Child Shapes……Page 480
Shape Containment Using Rules……Page 483
Summary……Page 490
Introduction……Page 492
Identifying Variability……Page 493
Bottom-Up or Top-Down?……Page 494
Feature Trees……Page 495
Feature Trees and DSLs……Page 496
Sketch Domain Snapshots……Page 497
Domain Model from Snapshots……Page 501
Developing the Notation……Page 505
Project Definition Notation……Page 507
Issue State Notation……Page 508
Familiar Notations……Page 511
Defining Validation Constraints……Page 512
Internal Consistency……Page 513
Consistency with External Data and Models……Page 515
Generation versus Interpretation……Page 516
Evolving a Generic Framework……Page 519
Driving a Framework from the DSL……Page 520
Testing……Page 521
Validation Constraints……Page 523
Generated Code……Page 525
Evolving a DSL……Page 526
What Makes a Good DSL?……Page 528
Appropriate Notation: An Example with Regular Expressions……Page 530
Candidate Notations……Page 532
Summary……Page 535
Conclusion……Page 536
A……Page 540
C……Page 541
D……Page 544
E……Page 546
F……Page 547
G……Page 548
I……Page 549
M……Page 551
N……Page 552
P……Page 553
R……Page 555
S……Page 556
T……Page 558
V……Page 559
X……Page 560
Z……Page 561
Reviews
There are no reviews yet.