Domain-specific language (noun): a computer programming language of limited expressiveness focused on a particular domain.
- Regular Expressions
- rails validations
- JMock expectations
- (many more examples)…
A quick outline of the common questions, and answers, about DSLs
I’ve done a few interviews on DSLs, which help provide an introduction to the topic and how I’ve approached it.
I made the first chapter of my DSL book act as an introductory example to help the reader get an overview of DSLs and how I talk about them. As a result it makes a good introduction to DSLs, so it’s particularly nice that Addison-Wesley made this chapter freely available. You can use it to judge whether the full book is likely to be worthwhile, or just use it as a brief overview of the topic if you don’t want to dig further.
The DSL book uses patterns to help structure its content. I keep a brief summary of these patterns here, primarily to act as a reliable URI for reference purposes.