DSLs, BNLs, and Ruby

Published on 09 August 2006 by James in Ruby

0

Jay Fields of ThoughtWorks has started a great series on Domain Specific Languages, and specifically, Business Natural Languages. The post I am particularly fond of is “BNL 03 – The Solution”, where he demonstrates how to take a BNL with the following format:

apply bonus of the total profit times one percent if the current month is equal to february
apply bonus of the drug profit times two percent if the current month is equal to february

and calculate bonuses for any number of employees using around 60 lines of Ruby.

His chapters so far:

01 – Introduction
02 – The Problem
03 – The Solution
04 – DAMP BNLs
05 – Multiple Contexts

His chapters are great for learning about DSLs and BNLs, and are written so that you can begin to imagine how you may use BNLs to solve common needs within your own projects. My hope is to start coupling a BNL with Fitnesse for doing acceptance testing on an upcoming project.

Leave a Reply