Monday, May 26, 2008

On the Design of Ruby DSLs

I recently gave an invited talk at the East Bay Ruby meetup at the UC Berkeley's RAD Lab entitled "On the Design of Ruby Domain-Specific Languages" [PDF and PPT slides and some code examples (Zip)].

The talk distills my experiences using Ruby and Rails to create Domain-Specific Languages (DSLs). In particular, I cover:

  1. the why and what of DSLs in general (brief)

  2. Ruby's support for metaprogramming --- which this constitutes the core DSL designs and implementations

  3. brief taste of four Ruby DSLs (including my mashup DSL)

  4. initial thoughts on design trade-offs for DSLs

  5. initial list of implementation patterns for Ruby DSLs

  6. short conclusion and some references

William Sobel and Alan Miller encouraged me to put together this presentation; and based on the number of positive feedback so far, it may be was worth it in spades. Nothing helps focus the mind or ideas like 'writing things down on paper' or presenting them succinctly.

I'll surely have more to say about this topic, since it currently forms a central part of my research. I have some related publications if you want a better idea of the previous works.

For related materials on DSLs see the reference slide and in particular the following:

Change Log

  1. Original version on 05/26/2008

  2. Minor English and layout fixes and added two more DSL references on 05/28/2008