
Domain-Specific Development with Visual Studio DSL Tools
by Cook, Steve; Jones, Gareth; Kent, Stuart; Wills, Alan CameronRent Book
Rent Digital
New Book
We're Sorry
Sold Out
Used Book
We're Sorry
Sold Out
How Marketplace Works:
- This item is offered by an independent seller and not shipped from our warehouse
- Item details like edition and cover design may differ from our description; see seller's comments before ordering.
- Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
- Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
- Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.
Summary
Author Biography
Table of Contents
List of Figures | p. xvii |
List of Tables | p. xxv |
Foreword | p. xxvii |
Preface | p. xxix |
About the Authors | p. xxxv |
Domain-Specific Development | p. 1 |
Introduction | p. 1 |
Domain-Specific Development | p. 2 |
Examples | p. 4 |
Software Defined Circuitry | p. 8 |
Embedded Systems | p. 9 |
Device Interfaces | p. 9 |
Software Development Process Customization | p. 9 |
Benefits | p. 10 |
Languages | p. 11 |
Textual DSLs | p. 15 |
Graphical DSLs | p. 20 |
Conventions for Representing Structure | p. 21 |
Conventions for Representing Behavior | p. 22 |
Aspects of Graphical DSLs | p. 23 |
Notation | p. 24 |
Domain Model | p. 24 |
Generation | p. 24 |
Serialization | p. 25 |
Tool Integration | p. 26 |
Putting It All Together | p. 26 |
DSLs in Visual Studio | p. 27 |
The Customization Pit | p. 32 |
UML | p. 34 |
Summary | p. 40 |
Creating and Using DSLs | p. 41 |
Introduction | p. 41 |
Process: Incremental Development of DSLs | p. 41 |
Generalizing an Application: Identify Variability, Discover DSLs | p. 42 |
Top-Down and Bottom-Up | p. 46 |
Developing the DSL: From Sketches to Domain Model | p. 48 |
Domain Model and Presentation Are Separate | p. 49 |
Refining the DSL | p. 50 |
Driving the Framework from the DSL | p. 51 |
Using the DSL | p. 53 |
Evolving the DSLs | p. 55 |
Interpretive Architectures | p. 56 |
Creating a DSL in Visual Studio | p. 57 |
Creating a DSL Authoring Solution in Visual Studio | p. 57 |
Trying Out the DSL Solution | p. 61 |
Defining the DSL | p. 64 |
Generating the Code for the Designer | p. 66 |
Adding to the DSL | p. 67 |
Constraints | p. 68 |
Customizing the Explorer Window | p. 71 |
Customizing the Properties Window | p. 72 |
Custom Code for the Designers | p. 73 |
Serialization Format of the DSL File | p. 73 |
Driving Applications from the DSL | p. 74 |
Deployment | p. 76 |
A Second DSL: The Project Definition DSL | p. 77 |
Architecture of the DSL Tools | p. 78 |
The Generated Code | p. 78 |
DSL Tools Architectural Layers | p. 79 |
The Framework Assemblies | p. 79 |
Content of the DSL Project | p. 81 |
Content of the DslPackage Project | p. 83 |
Summary | p. 85 |
Domain Model Definition | p. 87 |
Introduction | p. 87 |
The Domain Model Designer | p. 88 |
The In-Memory Store | p. 89 |
Domain Classes | p. 92 |
Domain Relationships | p. 98 |
Embeddings | p. 101 |
Multiplicity | p. 104 |
References | p. 105 |
Relationship Derivation | p. 106 |
Generating a Designer with No Shapes | p. 108 |
The Generated Code | p. 109 |
Using the Generated Code | p. 113 |
More about Domain Classes | p. 115 |
DomainClassInfo | p. 118 |
More about Domain Properties | p. 119 |
Calculated Properties | p. 121 |
DomainPropertyInfo | p. 121 |
More on Domain Relationships and Roles | p. 122 |
Accessing Links | p. 124 |
More on Relationship Derivation | p. 126 |
DomainRelationshipInfo and DomainRoleInfo | p. 129 |
More about the Store | p. 129 |
Looking Up Elements | p. 129 |
Partitions | p. 130 |
Rules | p. 130 |
DomainModelInfo | p. 130 |
Summary | p. 131 |
Presentation | p. 133 |
Introduction | p. 133 |
Graphical Notation-Overview | p. 134 |
Diagram and Editor | p. 137 |
Diagram | p. 138 |
Editor | p. 141 |
Designer | p. 142 |
Custom Editor | p. 142 |
Shapes | p. 146 |
Kinds of Shapes | p. 147 |
Shape Maps | p. 154 |
Connectors | p. 164 |
Connector Anatomy and Appearance | p. 164 |
Connectors and Inheritance | p. 165 |
Connector Maps | p. 165 |
Advanced Connector Maps | p. 167 |
Decorators | p. 167 |
Kinds of Decorators | p. 168 |
Positioning | p. 169 |
Decorator Maps | p. 170 |
Customizing the Graphical Notation in Code | p. 173 |
Multiline Text Decorators | p. 173 |
Variable Image Shape | p. 174 |
Set a Background Picture | p. 176 |
Set Custom Connection Points | p. 177 |
Change Routing Style of Connectors | p. 178 |
Explorer | p. 180 |
Default Appearance | p. 181 |
Changing the Window Icon and Label | p. 183 |
Customizing the Appearance of Nodes | p. 184 |
Hiding Nodes | p. 186 |
Customizing the Explorer through Code | p. 187 |
Properties Window | p. 188 |
Default Appearance of Properties Window | p. 188 |
Categories, Names, and Descriptions | p. 190 |
Hiding Properties and Making Them Read-Only | p. 192 |
Forwarding Properties | p. 192 |
Customizing the Properties Window through Code | p. 193 |
Summary | p. 195 |
Creation, Deletion, and Update Behavior | p. 197 |
Introduction | p. 197 |
Element Creation | p. 197 |
The Toolbox | p. 198 |
Element Merge Directives | p. 200 |
Custom Element Merge Directives | p. 208 |
Re-Parenting with Element Merge Directives | p. 211 |
Custom Element Tool Prototypes | p. 212 |
Connection Builders | p. 216 |
Multiple Source and Target Role Directives | p. 217 |
Multiple Link Connect Directives | p. 219 |
Custom Connection Builders | p. 222 |
Element Deletion | p. 229 |
Default Delete Propagation Rules | p. 229 |
Controlling Delete Propagation | p. 231 |
Customizing Delete Propagation | p. 232 |
Summary | p. 234 |
Serialization | p. 237 |
Introduction | p. 237 |
Saving and Loading Models and Diagrams | p. 238 |
Model XML File Format | p. 239 |
Elements and Properties | p. 242 |
Relationships | p. 243 |
Relationship Derivation | p. 245 |
Cross-Referencing | p. 245 |
Using Guids as References | p. 246 |
Using Qualified Names as References | p. 248 |
References to Links | p. 249 |
Diagram XML File Format | p. 251 |
Versioning and Migration | p. 254 |
The XML Schema | p. 257 |
Customization | p. 258 |
Modifying XML Element Names | p. 259 |
Element Data | p. 261 |
Implementing Your Own Serializer | p. 264 |
Generated Serialization Code | p. 264 |
Customized Serialization Code | p. 271 |
Impact of Customization on the Schema | p. 272 |
Summary | p. 273 |
Constraints and Validation | p. 275 |
Introduction | p. 275 |
Choosing Hard or Soft Constraints? | p. 277 |
Choices Made by the DSL Tools | p. 280 |
Soft Constraints in the DSL Tools | p. 280 |
Validation Methods | p. 282 |
Enabling Validation | p. 284 |
Invoking Validation | p. 288 |
Custom Validation Categories | p. 289 |
Inheriting Validation Behavior | p. 292 |
Validation Output | p. 292 |
Using Validation Outside the IDE | p. 293 |
Validation Against External Data | p. 294 |
Hard Constraints in the DSL Tools | p. 295 |
Rules | p. 296 |
Putting Together Hard and Soft Constraints | p. 299 |
Summary | p. 307 |
Generating Artifacts | p. 309 |
Introduction | p. 309 |
Artifact Generation Styles | p. 311 |
Extensible Stylesheet Language Transformations | p. 311 |
Making Use of the Domain-Specific API | p. 314 |
A Template-Based Approach | p. 319 |
Complex Relationships and Round-Tripping | p. 321 |
The Templatization Process | p. 325 |
The First Cut Template | p. 328 |
Generation-Specific Model Data | p. 338 |
Starting to Build a Library | p. 340 |
Syntax of a Text Template | p. 341 |
Directives | p. 341 |
Custom Directives | p. 344 |
Control Block Types | p. 346 |
Problems of Large-Scale, Real-World Artifact Generation | p. 349 |
Advanced Customizations | p. 351 |
Text Templating Architecture | p. 352 |
Custom Hosting | p. 354 |
Custom Directive Processor | p. 357 |
Custom Orchestration | p. 359 |
Summary | p. 366 |
Deploying a DSL | p. 369 |
Introduction | p. 369 |
Files Needed to Install a Designer | p. 370 |
Getting Started-Creating a Setup Project | p. 373 |
Setup Project Contents | p. 376 |
Customizing Setup | p. 377 |
Customizing InstallerDefinition.dslsetup | p. 377 |
Customizing settings.ini | p. 377 |
Customizing Strings.wxl | p. 378 |
Customizing Product.ico | p. 378 |
The .dslsetup Format | p. 378 |
[left angle bracket]dslPackage[right angle bracket] | p. 380 |
[left angle bracket]licenseAgreement[right angle bracket] | p. 382 |
[left angle bracket]supportingFiles[right angle bracket] | p. 382 |
[left angle bracket]vsItemTemplates[right angle bracket] | p. 383 |
[left angle bracket]dslSchemas[right angle bracket] | p. 384 |
[left angle bracket]vsProjectTemplates[right angle bracket] | p. 384 |
[left angle bracket]mergeModules[right angle bracket] | p. 384 |
[left angle bracket]textTemplates[right angle bracket] | p. 385 |
Refreshing the Installation Files | p. 387 |
Package Load Key | p. 388 |
Deploying Text Templates for Code Generation | p. 390 |
Creating a Project Template from the Debugging Project | p. 390 |
Using a Text Template Include File | p. 392 |
Including Text Templates in the VS Item Template | p. 393 |
Summary | p. 396 |
Advanced DSL Customization | p. 397 |
Introduction | p. 397 |
Tools for Customization | p. 397 |
Partial Classes | p. 397 |
Double Derived-The Generation Gap | p. 398 |
Custom Constructors | p. 399 |
Customization Switches | p. 399 |
Custom Overrides | p. 401 |
Responding to Changes | p. 402 |
Property Handlers "On Value Changed/Changing" | p. 402 |
Calculated Domain Properties | p. 404 |
Custom Storage Domain Properties | p. 405 |
Notify Value Change | p. 407 |
Propagating Change from Model to Shape: OnAssociatedPropertyChanged | p. 408 |
Rules | p. 412 |
Store Events | p. 417 |
.NET Event Handlers | p. 419 |
Event Overrides | p. 420 |
Bounds Rules | p. 420 |
Summary of Change Propagation and Constraint Techniques | p. 424 |
DSL Shell Architecture | p. 426 |
How to Add a Menu Command | p. 429 |
Add a Command Id for Each Command | p. 430 |
Increment Menu Resource Index | p. 430 |
Add Commands to Command Set | p. 431 |
Define the Command Handlers | p. 432 |
Good Practices for Command Handlers | p. 434 |
Build and Run | p. 435 |
Providing Handlers for Standard Commands | p. 435 |
Building the DSL Diagram into Another Interface | p. 435 |
Implementing Copy and Paste | p. 437 |
The Copy Method | p. 437 |
The Paste Method | p. 438 |
Registering the Menu Handlers | p. 440 |
Shape Containers | p. 442 |
Child Shapes | p. 442 |
A DSL Using Nested Child Shapes | p. 443 |
Shape Containment Using Rules | p. 446 |
Summary | p. 453 |
Designing a DSL | p. 455 |
Introduction | p. 455 |
Identifying Variability | p. 456 |
Bottom-Up or Top-Down? | p. 457 |
Feature Trees | p. 458 |
Feature Trees and DSLs | p. 459 |
Developing the Domain Model | p. 460 |
Sketch Domain Snapshots | p. 460 |
Domain Model from Snapshots | p. 464 |
Developing the Notation | p. 468 |
Project Definition Notation | p. 470 |
Issue State Notation | p. 471 |
Familiar Notations | p. 474 |
Defining Validation Constraints | p. 475 |
Internal Consistency | p. 476 |
Consistency with External Data and Models | p. 478 |
Developing and Evolving the Framework | p. 479 |
Generation versus Interpretation | p. 479 |
Evolving a Generic Framework | p. 481 |
Driving a Framework from the DSL | p. 483 |
Testing | p. 484 |
Validation Constraints | p. 486 |
Generator Templates | p. 488 |
Generated Code | p. 488 |
Rules | p. 489 |
Language Definition | p. 489 |
Evolving a DSL | p. 489 |
What Makes a Good DSL? | p. 491 |
Appropriate Notation: An Example with Regular Expressions | p. 493 |
Candidate Notations | p. 495 |
Graphs Are Not Syntax Trees | p. 498 |
Summary | p. 498 |
Conclusion | p. 499 |
Index | p. 503 |
Table of Contents provided by Ingram. All Rights Reserved. |
Excerpts
An electronic version of this book is available through VitalSource.
This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.
By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.
Digital License
You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.
More details can be found here.
A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.
Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.
Please view the compatibility matrix prior to purchase.