Channels ▼
RSS

Jolt Awards

Jolt Awards: The Best Books


Jolt Finalist: Domain-Specific Languages, by Martin Fowler with Rebecca Parsons

Martin Fowler's Domain Specific Languages is a big book. Weighing in at over 600 pages, this book attempts to cover the broad field of domain specific languages (DSLs). Unlike other books that attempt to cover a broad field, there is a lot of code in this book.

DSLs receive considerable coverage today as an approach to bring computing closer to users. A DSL is a specialized language where someone familiar with a particular domain, or area of expertise, can create software by expressing computation using familiar terms. If you are new to DSLs or want to understand the mechanics of how to implement your own DSL this book is for you.

Fowler makes liberal use of examples to illustrate deep concepts. He organizes the book into six parts beginning with a survey of the DSL neighborhood and then proceeds into the technical details. A reader who wants to understand what a DSL is and what it is good for need only read part I to gain a conversational knowledge of DSLs. His example in the first chapter of a Gothic security system is entertaining and informative and sets the stage for the rest of the book. Part I leads the reader on a journey through DSL land that winds through different types of DSLs, alternatives to DSLs, and some engineering details on how to implement DSLs.

Fowler divides DSLs into two categories: internal and external. External DSLs use a programming language to create a different executable language. Internal DSLs use stylistic variants of a programming language to make it easier to create executable programs in that language. Three parts follow, containing the basic patterns one should understand when constructing either type of DSL. After Part I, the reader should understand the basics of how to create a DSL. However, the devil is in the details. These three sections provide those details. Fowler presents the details as patterns, with each chapter illustrating a single pattern.

Part II provides patterns needed for any type of DSL, including the all-important Semantic Model. Parts III and IV offer the patterns needed to construct external and internal DSLs. Readers familiar with language translation technology such as compilers will feel at home in Part III that focuses on external DSLs. External DSLs require more core computer science knowledge, such as parsing theory. Someone without an understanding of compilers should probably skip Part III on first reading.

The book does not use one specific language for its examples. In fact, Fowler uses common languages like Java, Ruby, and C# as well is widely available tools such as the ANTLR parser generators. Many readers will learn something about languages and tools that they have not experienced before as a side effect of reading this book.

The final parts of the book are relatively short. Part V presents alternative computational models, such as decision tables, production rule systems, and other models that into the DSL space. Part VI covers code generation. One might skip these two parts on the first reading.

This book omits details about engineering a DSL. If you want to understand how to organize a project and determine the process needed to engineer a DSL, you should refer to the ample body of software reuse literature. Domain Specific Languages does not address these issues, nor is that Fowler's intent. He is focusing on the nitty-gritty decisions and details — and there are plenty of them — that will help the software developer produce a robust DSL. If you are such a developer, get this book. Read it lightly at first and then refer to it often.

— Gary Pollice


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Jolt Awards Video