Reviews

Domain-Specific Languages by Martin Fowler

rodhilton's review against another edition

Go to review page

3.0

I loved Fowler's Refactoring and Patterns of Enterprise Application Architecture, so when I saw he was working on a book about DSLs, I was extremely excited. I've been really into fluent interfaces for a while, and I wanted to learn more about some best practices, patterns, and other stuff to think about.

Fowler's Domain Specific Languages is good, but I wouldn't call it great. At least, not as great as Refactoring or PoEAA. One problem is that it's a little disjointed. DSLs are a large topic, and Fowler admits in numerous places that he wasn't sure how much detail to cover on a particular topic or where that topic should go, simply because of how resistant the material is to that kind of organization. He admits that he didn't want to be stuck writing the book forever, and wanted to release it earlier as opposed to never. I think he made the right call, and though he acknowledges that this decision has a downside, the downside is a bit noticable.

The book can also be a tad hand-wavey at times. Fowler repeatedly stresses the importance of building a semantic model when developing a DSL, but I read the entire book from cover to cover and never felt like I got a truly good understanding of how best to do that for anything other than an extremely tiny DSL.

A lot of the material on External DSLs I was able to understand because of my Computer Science degree, which focused on systems and stressed language design, lexing, parsing, compilation, and the like. If I didn't have that background, I think a lot of the External DSL content would have been over my head, as it felt like very high-level coverage of a very deep topic (a depth without which nothing practical can be done).

Overall, I really enjoyed the book, as I do all of Fowler's books. His writing style can be a bit dry (he seems to have been made aware of this criticism, as this book contains a number of jokes peppered throughout its pages), but it is also dense and informative. I learned an awful lot, and I'd recommend the book to anyone who wanted to dive deeper into DSLs. That said, I think the book would have been better as two smaller books, one on internal DSLs and one on external DSLs (and all of the language workbench crap could just be completely dropped).
More...