In a previous post I wrote about DSLs as Jargon. I implemented a simple Coffee DSL that would allow code to parse an order written by a human and turn it into a domain model. I used a fairly basic method_missing structure to capture the values.
There’s a much better way to do it in Ruby [...]
Archives for posts tagged ‘dsl’
Coffee DSL Redone With Meta-Programming
Monday, 7 January 2008
When Do DSLs Make Sense?
Saturday, 5 January 2008
Domain Specific Languages (DSLs) are discussed all the time. There is a lot of writing about implementing DSLs and many dynamic languages like Ruby and Groovy make it really fairly easy to do it. But rarely do I see it discussed how you figure out when it makes sense to implement a DSL.
Some people would [...]
Coffee DSL in Groovy
Thursday, 8 March 2007
I thought I’d follow up with my previous post with the Coffee Domain Specific Language in the Groovy Language.
This is really one of my first forays into Groovy, so it’s pretty rough. It’s really just a direct translation of the Ruby code and not what I would expect to be ‘idiomatic Groovy’. I’ll try [...]
Understanding Domain Specific Languages as Jargon
Monday, 5 March 2007
Domain Specific Languages (DSLs) are the idea of creating syntaxes that model a very specific problem domain. Domain Specific Languages are not a new concept. Some people call them ‘little languages’. The Unix world has a bunch of little languages. Grep, awk, sed, lex, and yacc all exhibit features of these domain specific languages. They [...]