InfoQ

InfoQ

Presentation

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Recorded at:
Recorded at

Business Natural Languages Development in Ruby

Presented by Jay Fields on May 08, 2008 Length 00:52:46
Sections
Enterprise Architecture,
Process & Practices,
Development,
Architecture & Design
Topics
Ruby ,
Domain Specific Languages ,
Business Process Management ,
Language ,
Specifications ,
Customers & Requirements
Tags
QCon ,
Business Natural Languages ,
Metaprogramming ,
QCon San Francisco 2007 ,
Domain Modeling
The next QCon is in London March 5-9, Join us!
 

How would you like to view the presentation?

In case you are having issues watching this video, please follow these simple steps to help us investigate the issue:
1. Right click on the video player and select Copy log
2. Paste the copied information in an email to video-issue@infoq.com (clicking this link will fill in the default details in most email clients).
Note: in case your email client hasn't automatically picked up the email subject, please include in your email the URL of the video too.
3. Done.
We will investigate the issue and get back to you as soon as possible. Thanks for helping us improve our site!
Summary
Jay Fields presents his concept of Business Natural Languages (BNL). BNLs are a type of Domain Specific Language, designed to be readable by any subject matter expert, which allows to create maintainable specifications and documentation. The example language is shown using Ruby.

Bio
Jay Fields is a software developer at ThoughtWorks. He is a early adopter who is constantly looking for new exciting technologies. His most recent work has been in the Domain Specific Language space where he delivered applications that empowered subject matter experts to write the business rules of the applications.

About the conference
QCon is a conference that is organized by the community, for the community.The result is a high quality conference experience where a tremendous amount of attention and investment has gone into having the best content on the most important topics presented by the leaders in our community.QCon is designed with the technical depth and enterprise focus of interest to technical team leads, architects, and project managers.
BNL or simple UI by Michael Niv Posted
Re: BNL or simple UI by Jay Fields Posted
  1. Back to top

    BNL or simple UI

    by Michael Niv

    I enjoyed the presentation. Thanks!


    Two related questions:


    1. If I understand correctly, the system is not forcing the user to type syntactically-well formed string in some controlled grammar. Instead, the regexes do the magic under the hood. If so, does/could it happen that the business user naively uses a novel language construct (and instead of or, or a meaningful "not" or "could" instead of "does") which the BNL designer did not anticipate, but which get swept up in general regexes, and the meaning is harmed in some subtle way that may be hard for a business user to defend against using the testing tools available?


    2. Given the narrowly targeted domain specificity of the language, a similarly targeted UI might work as well. for example:


    compensate $ [number] per [enum: $1M-profit, deal] if
    [enum: gross, recent_deals, all_deals] exceeds [number]


    (where the stuff in square brackets is shorthand for the appropriate HTML form-tags)


    Do you have insights as to which circumstances favor a UI vs BNL?


    Thanks again!


    Michael Niv.

  2. Back to top

    Re: BNL or simple UI

    by Jay Fields

    Hi Michael,



    Like almost everything in software: it depends. There are so many ways to translate external DSLs to executable code that it will depend on which solution you go with. If you have a strong security (or just general) concern you can use something such as TreeTop to create an entirely external DSL and pretty much entirely mitigate the risk. On the other hand, if you do something as simple as replace spaces with dots, then you are allowing for potential issues. Of course, those issues might be acceptable given timelines, trust, etc.



    Using form elements instead of a DSL is a commonly discussed option. I think it generally depends on how dynamic the language is. For example, I always thought trying to create SQL statements with forms was dreadfully painful. I would go with forms when possible, but if things are dynamic, I would quickly start considering a language.



    For example, my current project allows you to specify the following conditions:
    Date Range is 5/10/99
    Date Range is from 4/10/99 to 5/10/99
    Profit is greater than X
    Profit is less than X
    Profit is X
    Cost is greater than X
    Cost is less than X
    Cost is X



    And, so on, for many different conditions. This is something dynamic enough that it's painful to do in forms.



    I hope that's helpful, please shoot me another question if you want more info.



    Cheers, Jay

Educational Content

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?

Wrap Your SQL Head Around Riak MapReduce

Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.

Polyglot Persistence for Java Developers - Moving Out of the Relational Comfort Zone

Chris Richardson shows how he ported a relational database to three NoSQL data stores: Redis, Cassandra and MongoDB.

The Golden Circle – Why How What

Jean Tabaka challenges the audience to reflect on what Agile practices they are employing, how they are using them, ending with the questions “Why have their organization chosen to go Agile?

The Web Platform as a Limitless Pool of Innovation, with Andreas Gal

Andreas talks about the benefits of the Open Web and how it compares to proprietary stacks. He also talks about various projects that push the envelope like Boot to Gecko, Broadway and pdf.js.

Hadoop and NoSQLin a Big Data Environment

Ron Bodkin discusses early adoption of Hadoop, NoSQL and describes MapReduce and related libraries and Frameworks. Other topics include Hive, Pig, multi tenancy, and security in a big data environment

Spring and Platform Interoperability

Stephen Bohlen explains how Spring helps with interoperability between Java and .NET, demoing it with the help of a sample application.

How to Stop Writing Next Year's Unsustainable Piece of Code

Guilherme Silveira mentions some of the turning points in project development that may affect the quality of the code offering advice on avoiding writing crappy code.