liveBook · Manning

What you will learn in Building User-Friendly DSLs

by Meinte Boersma
Foreword by Federico Tomassetti

Chapter by chapter

Chapter 1: What is a domain-specific language?

1.1 A business case: A car rental company · 1.2 Using a DSL-based approach for software development · 1.2.1 The design of the Domain IDE · 1.2.2 The architecture of the Domain IDE · 1.2.3 What we’ll be doing in this book · 1.3 Why use a DSL-based approach for software development? · 1.3.1 Empowering the domain experts · 1.3.2 Improving the efficiency of the software development process · 1.3.3 New possibilities · 1.3.4 Criteria for adopting a DSL-based approach · 1.4 What is a DSL? · 1.4.1 A DSL’s notation · 1.4.2 A DSL’s structure · 1.4.3 A DSL’s meaning · 1.4.4 A DSL’s constraints · 1.5 Summary

What you learn in chapter 1 →

Chapter 2: Representing DSL content as structured data

2.1 Establishing an object-relation diagram notation for structured data · 2.2 Going from concrete to abstract syntax · 2.3 Summary

What you learn in chapter 2 →

Chapter 3: Working with ASTs in code

3.1 Turning ASTs into code · 3.1.1 Encoding containment relations · 3.1.2 Encoding reference relations · 3.2 Interacting with ASTs · 3.2.1 Accessing concept labels and settings’ values · 3.2.2 Recognizing AST and reference objects · 3.3 Traversing ASTs · 3.3.1 The general recipe for DFTT · 3.3.2 Example: Counting the leaves of an AST · 3.3.3 More about ASTs · 3.4 Summary

What you learn in chapter 3 →

Chapter 4: Projecting the AST

4.1 Preparing the implementation of the projection · 4.2 Implementing the projection iteratively · 4.2.1 Projecting record types · 4.2.2 Projecting attributes · 4.2.3 Projecting the initial values · 4.3 Summary

What you learn in chapter 4 →

Chapter 5: Editing values in the projection

5.1 Changing names · 5.1.1 Starting the editing · 5.1.2 Using edit state · 5.1.3 A reactive architecture for projectional editors · 5.1.4 Reacting to change with MobX · 5.1.5 Stopping the editing · 5.1.6 Updating the AST · 5.2 Changing the value of a number object · 5.3 Choosing the type of an attribute · 5.4 Choosing an attribute for a reference · 5.5 Summary

What you learn in chapter 5 →

Chapter 6: Editing objects in the projection

6.1 Adding new objects to the AST · 6.1.1 Adding an attribute · 6.1.2 Adding an initial value · 6.2 Selecting objects · 6.2.1 Selecting an attribute · 6.2.2 Deselecting an attribute · 6.2.3 Selecting and deselecting any object · 6.3 Deleting objects · 6.3.1 Deleting initial values · 6.3.2 Deleting attributes · 6.3.3 Deleting any object · 6.4 Summary

What you learn in chapter 6 →

Chapter 7: Implementing persistence and transportation of ASTs

7.1 Implementing and using a simple backend · 7.2 Serializing an AST · 7.3 Deserializing an AST · 7.4 Making an AST observable during deserialization · 7.5 Implementing save functionality · 7.6 Summary

What you learn in chapter 7 →

Chapter 8: Generating code from the AST

8.1 Integrating the build system with the software development process · 8.2 Using a reference implementation · 8.3 A Runtime for Rental · 8.4 Implementing a code generator using templates · 8.4.1 Iterating from reference source to template · 8.4.2 Composing template functions · 8.4.3 Indenting declaratively · 8.4.4 Finishing the code generator · 8.4.5 Alternative approaches for writing templates · 8.5 Summary

What you learn in chapter 8 →

Chapter 9: Preventing things from blowing up

9.1 Preventing failures by adding constraints · 9.2 A template case: Dealing with an attribute without a name · 9.2.1 Constraint strategies · 9.2.2 Implementing the constraints checker · 9.3 Dealing with all attribute-related faults · 9.3.1 An attribute without a type · 9.3.2 An attribute with an initial value “with holes” · 9.3.3 Related attributes with unequal types · 9.3.4 Sorting attributes according to dependency order · 9.3.5 Detecting cycles of attributes · 9.3.6 Attributes with too similar names · 9.4 Summary

What you learn in chapter 9 →

Chapter 10: Managing change

10.1 Managing DSL content change · 10.2 Categorizing and charting coupling · 10.3 Changing the DSL · 10.3.1 Versioning the Domain IDE · 10.3.2 Changing the DSL’s structure · 10.3.3 Deprecating concepts and properties · 10.3.4 Changing a DSL key aspect other than structure · 10.4 Summary

What you learn in chapter 10 →

Chapter 11: Implementing expressions: Binary operations

11.1 Representing expressions as DSL content · 11.1.1 Changing the structure · 11.2 Changing the projection · 11.3 Changing the runtime · 11.4 Changing the code generator · 11.5 Postscript: Expressions in general · 11.5.1 Characterizing expressions by arity · 11.5.2 Compositionality and expressiveness · 11.5.3 Characterizing expressions by operator · 11.6 Summary

What you learn in chapter 11 →

Chapter 12: Implementing expressions: Order of operations

12.1 Evaluating and building expression ASTs · 12.2 Adapting the projection for operator precedence · 12.3 Adapting the projection for associativity · 12.4 Using side-transforms to improve editing · 12.5 Summary

What you learn in chapter 12 →

Chapter 13: Implementing a type system

13.1 Computing types of expressions · 13.2 Implementing type checking constraints · 13.3 Representing types as objects · 13.4 Summary

What you learn in chapter 13 →

Chapter 14: Implementing business rules

14.1 Extending the DSL with business rules · 14.1.1 Defining business rules · 14.1.2 Writing logical expressions · 14.1.3 Defining consequences · 14.2 Implementing the business rules in the Runtime · 14.2.1 Running each business rule separately · 14.2.2 Combining effects · 14.2.3 The execution model of business rules · 14.2.4 Changing the Runtime · 14.2.5 Generalizing the implementation · 14.3 Generating the business rules’ code · 14.3.1 Identifying affected attributes · 14.3.2 Generating and using the rulesEffects method · 14.3.3 Adapting the UI of affected attributes · 14.4 Summary

What you learn in chapter 14 →

Chapter 15: Some topics we didn’t cover

15.1 Parsing, and textual DSLs · 15.2 Using the word “model” · 15.3 Using terms with the prefix “meta” · 15.4 Using language-oriented tooling · 15.4.1 Using a language workbench · 15.4.2 Implementing the example DSL with MPS · 15.4.3 Using language-oriented frameworks · 15.5 Summary

What you learn in chapter 15 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.