Oct. 5, 2006 SDF David Pollack

SDForum copy.jpgSDF Dec06 Ruby DSL.jpgPollack Kevin face1.jpg
Ruby SIG: How To Design a Domain Specific Language (DSL)

On October 5, 2006 at Google Headquarters in Mountain View, The SDForum’s Ruby SIG asked David Pollack to talk about designing a Domain Specific Language (DSL).

Founder of Athena, Pollack has developed software for three decades, including Mesa, the first real-time spreadsheet and Integer, the first collaborative spreadsheet. Recently he has developed domain specific languages for security and web development.

First, this DSL has nothing to do with Digital Subscriber Line (DSL) technology. Examples of general Domain Specific Languages are Excel, SQL and HTML. With these tools, high level semantics and simple syntax can describe real world behaviors of subject matter experts (SMEs). Once these business rules are described, they can be expressed in code and maintained. Ruby has its own XML-based syntax, processing tools and class creation and can then create a graphical front-end for business users.

Like with any large project, to develop a DSL, you must identify all the players and interview them to determine if costs and benefits of DSL outweigh hand coding what they need. Among the players, find the subject matter expert or thought leader and break down their decision-making process into a syntax that can be coded in the DSL. Next, create a mock-up of the DSL and get feedback from the expert. Find out the points to integrate the process into the application. It is important to build flexibility into the system so that changes in business rules can be updated. As the process changes, the DSL should change with it.

Copyright 2006 DJ Cline All rights reserved.