Contents
preface
acknowledgments
about this book
about the author
about the cover illustration
 
Chapter 1 What are domain-specific languages?
Striving for simplicity
Understanding domain-specific languages
Distinguishing between DSL types
Why write DSLs?
Boo’s DSL capabilities
Examining DSL examples
Summary
Chapter 2 An overview of the Boo language
Why use Boo?
Exploring compiler extensibility
Basic Boo syntax
Boo’s built-in language-oriented features
Summary
Chapter 3 The drive toward DSLs
Choosing the DSL type to build
Building different types of DSLs
Fleshing out the syntax
Choosing between imperative and declarative DSLs
Taking a DSL apart—what makes it tick?
Combining domain-driven design and DSLs
Implementing the Scheduling DSL
Running the Scheduling DSL
Summary
Chapter 4 Building DSLs
Designing a system with DSLs
Creating the Message-Routing DSL
Creating the Authorization DSL
The “dark side” of using a DSL
The Quote-Generation DSL
Summary
Chapter 5 Integrating DSLs into your applications
Exploring DSL integration
Naming conventions
Ordering the execution of scripts
Managing reuse and dependencies
Performance considerations when using a DSL
Segregating the DSL from the application
Handling DSL errors
Administrating DSL integration
Summary
Chapter 6 Advanced complier extensibility approaches
The compiler pipeline
Meta-methods
Quasi-quotation
AST macros
AST attributes
Compiler steps
Summary
Chapter 7 DSL infrastructure with Rhino DSL
Understanding a DSL infrastructure
The structure of Rhino DSL
Codifying DSL idioms
Batch compilation and compilation caches
Supplying external dependencies to our DSL
Summary
Chapter 8 Testing DSLs
Building testable DSLs
Creating tests for a DSL
Testing the DSL scripts
Integrating with a testing framework
Taking testing further
Summary
Chapter 9 Versioning DSLs
Starting from a stable origin
Planning a DSL versioning story
Building a regression test suite
Choosing a versioning strategy
Applying versioning strategies
DSL versioning in the real world
When to version
Summary
Chapter 10 Creating a professional UI for a DSL
Creating an IDE for a DSL
Integrating an IDE with a DSL application
Creating a graphical representation for a textual DSL
DSL code generation
Handling errors and warnings
Summary
Chapter 11 DSLs and documentation
Types of documentation
Writing the Getting Started Guide
Writing the User Guide
Creating the Developer Guide
Creating executable documentation
Summary
Chapter 12 DSL implementation challenges
Scaling DSL usage
Deployment—strategies for editing DSL scripts in production
Ensuring system transparency
Changing runtime behavior based on AST information
Data mining your scripts
Creating DSLs that span multiple files
Creating DSLs that span multiple languages
Creating user-extensible languages
Summary
Chapter 13 A real-world DSL implementation
Exploring the scenario
Designing the order-processing system
Thinking in tongues
Moving from an acceptable to an excellent language
Implementing the language
Using the language
Looking beyond the code
Going beyond the limits of the language
Summary
 
appendix A Boo basic reference
appendix B Boo language syntax
index