A couple weeks ago, Kevin, Ben, and myself headed out to the
December NovaRUG meeting to catch
Rich Kilmer's talk on
Domain Specific Languages (DSLs) in Ruby. People who have read the testing chapter in the latest
Agile Web Development with Rails book may be familiar with the DSL that Dave presents when demonstrating integration tests in Rails:
def test_buying_a_product
dave = regular_user
dave.get '/store/index'
dave.is_viewing 'index'
dave.buys_a @ruby_book
end
Rich provided many examples of DSLs that he's used, including one that he created for the DoD to handle planning of in-flight airplane refueling. He also discussed his work with GUITopia to create an intuitive GUI DSL which was a bit more accessible to me as a newcomer to Ruby:
window.close(:button)
window.close(:button).click
Rich also discussed differences between both implicit and explicit DSLs and the scoping issues resulting from both. My limited understanding of blocks and closures put me at a bit of a disadvantage here – something that I hope to resolve when we have our training event in January.
Training?
Yes. We will be hosting a
Rails training event here in the DC Metro area (Reston, to be exact) January 15
th - 17
th with
Chad Fowler. The session is geared toward people who have web development experience and have played a bit with Rails but want to get more in-depth. The skill level required for this course falls between the
Basic and
Advanced Rails Studio classes offered by the
Pragmatic Studio folks.
Cost is $750 per person for all 3 days, email
training@viget.com if you'd like to attend – space is limited. Hope to see you there.