Book review: DSLs in Boo: Domain-Specific Languages in .NET

For most .NET developers XML files are the sole means of enabling users to extend their application, why mot – it’s a “human readable” extendible format – after reading this book I know better…

in DSLs in BOO Oren Eini a.k.a Ayende Rahien (or is it the other way around) explains what are DSLs (Domain specific Languages) and shows how to easily build one using the BOO and plain old .NET.image 

This book is an easy read and overall makes the subject of creating a new language seems simple and easy – while reading this book I felt as if I was pair programming with the author.

The book starts with the all too familiar introduction to domain specific languages – but quickly gets down to business of creating new languages using BOO.

The author sets a good rhythm – each feature and use case are explained just enough so you won’t get overwhelmed with information but somehow manages not to get you bored.

As can be understood from its name this book is about creating DSLs using BOO programming language, this also means that  this book is about internal DSLs – languages created on top of existing languages and not creation of new fully functional programming languages – which is exactly what I need in my daily work. The examples in the book use RhinoDSL (also created by Ayende) to create the new languages and it has its own chapter (#7) that explains all about it.

The book can be divided into three parts –

  • Chapters 1 – 3: an introduction to domain specific languages with a brief explanation about DDD (Domain Driven Design), the BOO programming language and choosing which DSL type to implement (there are four)  by the end of the 3rd chapter you’ll be presented with your very first DSL.
  • Chapters 4 – 7:  Basic DSL creation and how to extend the BOO compiler. In this chapter you get to see how various syntaxes are possible using BOO extendibility and RhinoDSL.
  • Chapters 8 – 13: There is more to a new language than syntax – these chapters discuss how to test and document the newly created DSL as well as option for creating a UI for the new language. The last chapter act as a summery of the whole book showing how to implement a new DSL from the ground up with real world consideration.

I enjoyed reading DSLs in BOO, the minuet I’ve finished reading it I’ve used what I’ve learnt in my current project – how cool is that!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s