Programming languages even a business analyst can use

In plain English, domain-specific languages let users define business rules, help ensure applications do what they're supposed to

By Andrew Oliver, InfoWorld |  Software, Analytics, domain-specific language

Why aren't DSLs in wider use? One reason: To achieve successful results, you need competent business analysts. This may sound harsh, but I've met maybe five of those in my entire career. Most of the business analysts I've met have been PowerPoint artists who couldn't quite make it as marketing people.

More to the point, defining a DSL requires lot of up-front work and planning. It brings to mind a rarely heeded Spanish proverb that Marc Fleury once admonished me with: "Slow down, I'm in a hurry." Yes, DSLs can result in more maintainable, robust, and cleaner software, but only if you're willing to spend the time thinking them through.

Putting DSLs to workSeveral options are available for those who want to create DSLs. Drools is my personal favorite. It's a rules engine, it supports DSLs, and it features Guvnor, which allows you to organize the rules into manageable packages. But beware -- Drools is hardly a lightweight tool; it isn't even a single tool. It's a collection of tools that offers many features that have nothing to do with either rules engines or DSLs.

But there are many other approaches. For Microsoft's .Net platform, Irony offers a means of creating DSLs using a specialized expression grammar.

For Groovy fans, there's easyb. I like the lightweight simplicity, although it lacks the performance optimizations and tooling of Drools. It also leaves you with a bunch of Javaisms, like brackets ({}). I prefer using a language a bit more structured than plain English but that looks like plain English to the greatest degree possible. There are other resources and even an entire book on how to create DSLs for Groovy.

Ruby has a number of plug-ins, including Machinist and Cucumber, plus several great tutorials on the Web. The process of using a dynamic language like Ruby to create a DSL is somewhat different than using a rules engine like Drools or a pseudo-compiler kit like Irony. Ultimately, it's just as powerful.


Originally published on InfoWorld |  Click here to read the original story.
Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Spotlight on ...
Online Training

    Upgrade your skills and earn higher pay

    Readers to share their best tips for maximizing training dollars and getting the most out self-directed learning. Here’s what they said.

     

    Learn more

SoftwareWhite Papers & Webcasts

See more White Papers | Webcasts

Answers - Powered by ITworld

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question