1. Introducing domain-specific languages
Chapter 1. Learning to speak the language of the domain
1.1. The problem domain and the solution domain
1.2. Domain modeling: establishing a common vocabulary
Chapter 2. The DSL in the wild
2.1. Building your first Java DSL
2.2.1. Externalizing the domain with XML
2.3. DSL implementation patterns
2.4. Choosing DSL implementations
Reusing existing infrastructure
Learning curve with external DSLs
Chapter 3. DSL-driven application development
3.1. Exploring DSL integration
3.2. Internal DSL integration patterns
3.2.1. Using the Java 6 scripting engine
3.3. External DSL integration patterns
3.4. Handling errors and exceptions
Chapter 4. Internal DSL implementation patterns
4.2. Embedded DSLs: patterns in metaprogramming
4.2.1. Implicit context and Smart APIs
4.2.2. Reflective metaprogramming with dynamic decorators
4.3. Embedded DSLs: patterns with typed abstractions
4.3.1. Higher-order functions as generic abstractions
4.3.2. Using explicit type constraints to model domain logic
4.4. Generative DSLs: boilerplates for runtime generation
4.5. Generative DSLs: macros for compile-time code generation
4.5.1. Metaprogramming with Clojure
Chapter 5. Internal DSL design in Ruby, Groovy, and Clojure
5.1. Making DSLs concise with dynamic typing
5.2. A trade-processing DSL in Ruby
5.2.1. Getting started with an API
5.2.2. A little bit of monkey-patching
5.3. The order-processing DSL: the final frontier in Groovy
5.3.1. The order-processing DSL so far
5.4. Thinking differently in Clojure
5.4.1. Building a domain object
5.5. Recommendations to follow
5.5.1. Honor the principle of least complexity
5.5.2. Strive for optimal expressivity
5.5.3. Avoid diluting the principles of well-designed abstractions
Chapter 6. Internal DSL design in Scala
6.2. Your first step toward a Scala DSL
6.2.1. Testing Java objects with a Scala DSL
6.4. Building a DSL that creates trades
6.5. Modeling business rules with a DSL
6.5.1. Pattern matching as an extensible Visitor
6.6. Stitching ’em all together
6.7.1. Composing using extensions
6.7.2. Composing different DSLs using hierarchical composition
6.8. Monadic structures in DSL
Chapter 7. External DSL implementation artifacts
7.1. Anatomy of an external DSL
7.2. The role of a parser in designing an external DSL
7.3.1. Simple top-down parsers
7.4. Tool-based DSL development with Xtext
7.4.1. Grammar rules and the outline view
Chapter 8. Designing external DSLs using Scala parser combinators
8.2. The Scala parser combinator library
8.2.1. The base abstractions in the parser combinator library
8.2.2. The combinators that glue parsers together
8.3. DSL design with parser combinators: step-by-step
8.3.1. Step 1: Executing the grammar
8.3.2. Step 2: Building the semantic model for the DSL
8.3.3. Step 3: Designing the Order Abstraction
8.3.4. Step 4: Generating the AST using function application combinators
8.4. A DSL that needs a packrat parser
8.4.1. Introducing the domain problem
3. Future trends in DSL development
Chapter 9. DSL design: looking forward
9.1. Growing language support for DSL design
9.1.1. Striving to be expressive
9.1.2. More power with metaprogramming
9.4. The mature evolution of a DSL
Appendix A. Role of abstractions in domain modeling
A.1. Qualities of well-designed abstractions
A.2. Minimalism publishes only what you promise
A.2.1. Evolve by being generic
A.3. Distillation keeps only what YOU need
A.4. Extensibility helps piecemeal growth
A.4.2. Mixins: a design pattern for extensibility
A.4.3. Mixins for extending Map
A.5. Composability comes from purity
A.5.1. Design patterns for composability
Appendix B. Metaprogramming and DSL design
Appendix C. A cheat sheet for Ruby’s DSL-friendly features
Appendix D. A cheat sheet for Scala’s DSL-friendly features
Appendix E. A cheat sheet for Groovy’s DSL-friendly features
Appendix F. A cheat sheet for Clojure’s DSL-friendly features
Appendix G. Polyglot development
G.1. What features should you look for in an IDE?
G.2. Bootstrapping a Java-Groovy development environment
18.222.109.4