show all comments


Small languages, large frameworks (at LWC2013)

March 08, 2013 14:37:08 +0200 (EET)

The 3rd Language Workbench Challenge takes place next month in Cambridge, UK. One of my colleagues, Risto Pohjonen, will take part in the challenge having implemented the modeling language and code generators with MetaEdit+. The domain for 2013 challenge is questionnaires, and the language to be implemented is called QL (Questionnaire Language). QL allows specifying form-based questionnaires with conditions.

I was playing with the QL and an example of the language in MetaEdit+ is shown below. The diagram shows the specification of one of the assignment tasks related to house owning. With QL, questionnaire developers create such models using questionnaire concepts and then run the generator producing the application code and running it in the browser. The level of abstraction is raised since programming (now JavaScript, HTML) and framework details are hidden allowing the person to focus on the domain: questionnaires.

Model based on QL in MetaEdit+ along with generated questionnaire

What strikes me a bit is that this year the language and generator parts are relatively simple. To test and run the QL without having to install any additional components/programs actually most effort went to the framework. While we described in the book ( different ways to divide the work among language, generator and framework, the tasks of LWC 2013 were clearly requiring more framework development than language or generator development.

Small language, large framework in LWC 2013 case

On the other hand, a particularly nice part of the assignment is that it calls for language integration: reusing and referencing among language concepts. Such integration is usually always better than model-to-model transformation since we don't want to create copies of the same information to be changed, checked and kept consistent in different places. That just adds unnecessary complexity. In the assignment such modular language integration can be used when defining questionnaire logic with one language (as above) and integrate it with another language focusing on layout and styling. Interesting to see how other tools support language modularity and evolution.