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:
- the why and what of DSLs in general (brief)
- Ruby's support for metaprogramming ---
whichthis constitutes the core DSL designs and implementations - brief taste of four Ruby DSLs (including my mashup DSL)
- initial thoughts on design trade-offs for DSLs
- initial list of implementation patterns for Ruby DSLs
- 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
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:
- Martin Fowler's blog entry on DSLs
- Metaprogramming on wikipedia
- "The Art of the Metaobject Protocol" by Gregor Kiczales et al.
- Intentional Software MIT Technology article entitled "Everything you can do I can do meta" by Scott Rosenberg
- OOPSLA 2008 DSM'08: 8th Workshop on Domain-Specific Modeling/Languages
- the { bucklogs :here } blog post entitled "Writing Domain Specific Languages"
- InfoQ's: What's a Ruby DSL and what isn't?
Change Log
- Original version on 05/26/2008
- Minor English and layout fixes and added two more DSL references on 05/28/2008