preface |
|
xv | |
acknowledgments |
|
xvii | |
about this book |
|
xviii | |
about the author |
|
xx | |
about the cover illustration |
|
xxi | |
|
What are domain-specific languages? |
|
|
1 | (21) |
|
|
2 | (3) |
|
|
3 | (1) |
|
|
3 | (1) |
|
Creating intention-revealing code |
|
|
4 | (1) |
|
Understanding domain-specific languages |
|
|
5 | (2) |
|
|
6 | (1) |
|
Creating your own languages |
|
|
6 | (1) |
|
Distinguishing between DSL types |
|
|
7 | (6) |
|
|
7 | (2) |
|
|
9 | (1) |
|
|
10 | (2) |
|
Internal or embedded DSLs |
|
|
12 | (1) |
|
|
13 | (3) |
|
|
14 | (1) |
|
|
14 | (2) |
|
Automatic or extensible DSLs |
|
|
16 | (1) |
|
|
16 | (2) |
|
|
18 | (2) |
|
|
18 | (1) |
|
|
19 | (1) |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
20 | (2) |
|
An overview of the Boo language |
|
|
22 | (17) |
|
|
23 | (1) |
|
Exploring compiler extensibility |
|
|
24 | (1) |
|
|
25 | (4) |
|
Boo's built-in language-oriented features |
|
|
29 | (8) |
|
|
29 | (1) |
|
|
30 | (1) |
|
|
30 | (1) |
|
|
31 | (1) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
33 | (1) |
|
|
34 | (1) |
|
|
34 | (3) |
|
|
37 | (2) |
|
|
39 | (24) |
|
Choosing the DSL type to build |
|
|
40 | (3) |
|
The difference between fluent interfaces and DSLs |
|
|
40 | (2) |
|
Choosing between a fluent interface and a DSL |
|
|
42 | (1) |
|
Building different types of DSLs |
|
|
43 | (4) |
|
|
43 | (2) |
|
|
45 | (2) |
|
Building Extensibility DSLs |
|
|
47 | (1) |
|
|
47 | (1) |
|
Choosing between imperative and declarative DSLs |
|
|
48 | (3) |
|
Taking a DSL apart---what makes it tick? |
|
|
51 | (2) |
|
Combining domain-driven design and DSLs |
|
|
53 | (3) |
|
Language-oriented programming in DDD |
|
|
53 | (1) |
|
Applying a DSL in a DDD application |
|
|
54 | (2) |
|
Implementing the Scheduling DSL |
|
|
56 | (3) |
|
Running the Scheduling DSL |
|
|
59 | (2) |
|
|
61 | (2) |
|
|
63 | (23) |
|
Designing a system with DSLs |
|
|
64 | (1) |
|
Creating the Message-Routing DSL |
|
|
65 | (7) |
|
Designing the Message-Routing DSL |
|
|
65 | (7) |
|
Creating the Authorization DSL |
|
|
72 | (6) |
|
Exploring the Authorization DSL design |
|
|
73 | (3) |
|
Building the Authorization DSL |
|
|
76 | (2) |
|
The ``dark side'' of using a DSL |
|
|
78 | (1) |
|
|
78 | (6) |
|
Building business-facing DSLs |
|
|
80 | (3) |
|
Selecting the appropriate medium |
|
|
83 | (1) |
|
|
84 | (2) |
|
Integrating DSLs into your applications |
|
|
86 | (22) |
|
Exploring DSL integration |
|
|
86 | (2) |
|
|
88 | (3) |
|
Ordering the execution of scripts |
|
|
91 | (3) |
|
Handling ordering without order |
|
|
91 | (1) |
|
|
92 | (1) |
|
|
92 | (2) |
|
Ordering using external configuration |
|
|
94 | (1) |
|
Managing reuse and dependencies |
|
|
94 | (2) |
|
Performance considerations when using a DSL |
|
|
96 | (2) |
|
|
97 | (1) |
|
|
97 | (1) |
|
|
98 | (1) |
|
|
98 | (1) |
|
Segregating the DSL from the application |
|
|
98 | (4) |
|
Building your own security infrastructure |
|
|
99 | (1) |
|
|
99 | (2) |
|
Considerations for securing a DSL in your application |
|
|
101 | (1) |
|
|
102 | (3) |
|
|
102 | (2) |
|
Handling compilation errors |
|
|
104 | (1) |
|
Error-handling strategies |
|
|
104 | (1) |
|
Administrating DSL integration |
|
|
105 | (1) |
|
|
106 | (2) |
|
Advanced complier extensibility approaches |
|
|
108 | (26) |
|
|
109 | (1) |
|
|
110 | (3) |
|
|
113 | (2) |
|
|
115 | (11) |
|
|
116 | (2) |
|
Building macros with the MacroMacro |
|
|
118 | (2) |
|
Analyzing the using macro |
|
|
120 | (3) |
|
|
123 | (1) |
|
|
124 | (2) |
|
|
126 | (2) |
|
|
128 | (4) |
|
|
129 | (1) |
|
Building the implicit base class compiler step |
|
|
130 | (2) |
|
|
132 | (2) |
|
DSL infrastructure with Rhino DSL |
|
|
134 | (16) |
|
Understanding a DSL infrastructure |
|
|
135 | (1) |
|
The structure of Rhino DSL |
|
|
136 | (7) |
|
|
136 | (1) |
|
|
137 | (2) |
|
Creating a custom IDslEngineStorage |
|
|
139 | (4) |
|
|
143 | (3) |
|
ImplicitBaseClassCompilerStep |
|
|
143 | (1) |
|
AutoReferenceFilesCompilerStep |
|
|
144 | (1) |
|
|
144 | (1) |
|
|
144 | (1) |
|
UnderscoreNamingConventionsToPascalCaseCompilerStep |
|
|
145 | (1) |
|
|
146 | (1) |
|
Batch compilation and compilation caches |
|
|
146 | (2) |
|
Supplying external dependencies to our DSL |
|
|
148 | (1) |
|
|
149 | (1) |
|
|
150 | (23) |
|
|
150 | (1) |
|
|
151 | (9) |
|
|
152 | (3) |
|
|
155 | (3) |
|
|
158 | (2) |
|
|
160 | (6) |
|
Testing DSL scripts using standard unit testing |
|
|
160 | (2) |
|
|
162 | (4) |
|
Integrating with a testing framework |
|
|
166 | (5) |
|
|
171 | (1) |
|
Building an application-testing DSL |
|
|
171 | (1) |
|
|
171 | (1) |
|
|
172 | (1) |
|
|
173 | (21) |
|
Starting from a stable origin |
|
|
174 | (1) |
|
Planning a DSL versioning story |
|
|
175 | (3) |
|
Implications of modifying the DSL engine |
|
|
175 | (1) |
|
Implications of modifying the DSL API and model |
|
|
176 | (1) |
|
Implications of modifying the DSL syntax |
|
|
177 | (1) |
|
Implications of modifying the DSL environment |
|
|
177 | (1) |
|
Building a regression test suite |
|
|
178 | (1) |
|
Choosing a versioning strategy |
|
|
179 | (6) |
|
|
179 | (1) |
|
|
179 | (1) |
|
|
180 | (1) |
|
|
181 | (1) |
|
|
182 | (2) |
|
The great-migration strategy |
|
|
184 | (1) |
|
Applying versioning strategies |
|
|
185 | (5) |
|
Managing safe, additive changes |
|
|
185 | (2) |
|
Handling required breaking change |
|
|
187 | (3) |
|
DSL versioning in the real world |
|
|
190 | (2) |
|
|
190 | (1) |
|
|
190 | (1) |
|
|
191 | (1) |
|
|
192 | (1) |
|
|
193 | (1) |
|
Creating a professional UI for a DSL |
|
|
194 | (27) |
|
Creating an IDE for a DSL |
|
|
195 | (3) |
|
Using Visual Studio as your DSL IDE |
|
|
196 | (2) |
|
Using #develop as your DSL IDE |
|
|
198 | (1) |
|
Integrating an IDE with a DSL application |
|
|
198 | (11) |
|
Extending #develop highlighting for our DSLs |
|
|
200 | (3) |
|
Adding code completion to our DSL |
|
|
203 | (3) |
|
Adding contextual code completion support for our DSL |
|
|
206 | (3) |
|
Creating a graphical representation for a textual DSL |
|
|
209 | (7) |
|
|
209 | (2) |
|
|
211 | (1) |
|
|
212 | (4) |
|
|
216 | (3) |
|
The CodeDOM provider for Boo |
|
|
216 | (1) |
|
|
217 | (2) |
|
Handling errors and warnings |
|
|
219 | (1) |
|
|
220 | (1) |
|
|
221 | (18) |
|
|
222 | (1) |
|
Writing the Getting Started Guide |
|
|
223 | (2) |
|
Begin with an introduction |
|
|
224 | (1) |
|
|
224 | (1) |
|
|
225 | (7) |
|
Explain the domain and model |
|
|
225 | (2) |
|
Document the language syntax |
|
|
227 | (3) |
|
Create the language reference |
|
|
230 | (1) |
|
Explain debugging to business users |
|
|
231 | (1) |
|
Creating the Developer Guide |
|
|
232 | (5) |
|
Outline the prerequisites |
|
|
232 | (1) |
|
Explore the DSL's implementation |
|
|
232 | (1) |
|
Document the syntax implementation |
|
|
233 | (3) |
|
Documenting AST transformation |
|
|
236 | (1) |
|
Creating executable documentation |
|
|
237 | (1) |
|
|
238 | (1) |
|
DSL implementation challenges |
|
|
239 | (24) |
|
|
240 | (4) |
|
Technical---managing large numbers of scripts |
|
|
240 | (1) |
|
Performing precompilation |
|
|
241 | (2) |
|
Compiling in the background |
|
|
243 | (1) |
|
|
243 | (1) |
|
Deployment---strategies for editing DSL scripts in production |
|
|
244 | (2) |
|
Ensuring system transparency |
|
|
246 | (5) |
|
Introducing transparency to the Order-Processing DSL |
|
|
246 | (2) |
|
Capturing the script filename |
|
|
248 | (1) |
|
Accessing the code at runtime |
|
|
248 | (2) |
|
Processing the AST at runtime |
|
|
250 | (1) |
|
Changing runtime behavior based on AST information |
|
|
251 | (2) |
|
|
253 | (1) |
|
Creating DSLs that span multiple files |
|
|
254 | (2) |
|
Creating DSLs that span multiple languages |
|
|
256 | (1) |
|
Creating user-extensible languages |
|
|
256 | (6) |
|
The basics of user-extensible languages |
|
|
256 | (2) |
|
Creating the Business-Condition DSL |
|
|
258 | (4) |
|
|
262 | (1) |
|
A real-world DSL implementation |
|
|
263 | (22) |
|
|
264 | (1) |
|
Designing the order-processing system |
|
|
265 | (2) |
|
|
267 | (2) |
|
Moving from an acceptable to an excellent language |
|
|
269 | (2) |
|
Implementing the language |
|
|
271 | (7) |
|
Exploring the treatment of statement's implementation |
|
|
273 | (1) |
|
Implementing the upon and when keywords |
|
|
274 | (2) |
|
Tracking which file is the source of a policy |
|
|
276 | (1) |
|
|
276 | (2) |
|
|
278 | (2) |
|
|
280 | (2) |
|
|
280 | (1) |
|
Integrating with the user interface |
|
|
281 | (1) |
|
|
282 | (1) |
|
Going beyond the limits of the language |
|
|
282 | (1) |
|
|
283 | (2) |
appendix A Boo basic reference |
|
285 | (17) |
appendix B Boo language syntax |
|
302 | (11) |
index |
|
313 | |