Automatic Code Generation for Cross-platform, Multi-Device Mobile Apps. An Industrial Experience

With Aldo Bongio (WebRatio), Jordi Cabot (ICREA and UOC), Hamza Ed-douibi (EMN) and Eric Umuhoza (Politenico di Milano), we worked on a research on Automatic Code Generation for Cross-platform, Multi-Device Mobile Apps.

We presented our study at the MobileDeLi workshop, where we reported on a comparative study conducted to identify the best trade-offs between different automatic code generation strategies.
Here are the slides presented there:

We covered the following strategies by implementing them using different technologies and target platforms:

  1. PIM-to-Native Code (NC)
  2. PIM-to-PSM-to-NC
  3. PSM-to-NC.
  4. PIM-to-Cross Platform Code (CPC)
  5. PIM-to-Framework Specific Model (FSM)-to-CPC

Some additional details are available in this post by Eric on Jordi’s blog.

Our study showed that there is no approach better than others in absolute terms but provided useful guidelines (e.g. cross platform approaches are generally advisable for companies with limited resoures) that helped us to identify the best strategy for the WebRatio company in particular.

Obviously, further investigations are ongoing…

To keep updated on my activities you can subscribe to the RSS feed of my blog or follow my twitter account (@MarcoBrambi).

IFML is now adopted and published by OMG, Wikipedia, and YouTube

Along with the continuing consolidation process of the Interaction Flow Modeling Language (IFML) within OMG, we are now starting our effort of documenting and disseminating IFML.

The three most recent resources I wish to point at are:

  • Official publishing of IFML in the OMG specification catalog
  • A new Wikipedia page on the language
  • A new demonstration video on the ongoing implementation effort of an opensource IFML editor

OMG Publishing 

OMG has now officially published IFML in its list of specifications:

and the official specs are now reachable through the official URL of the standard at:

IFML on Wikipedia 

The Wikipedia page regarding IFML is now online at:

The page summarizes the focus and content of the language, as well as the benefits that developers can gain by adopting it.

Demo video

The demonstration video of the new IFML editor that we are developing is available on YouTube.
This implementation consists of an opensource IFML editor based on Eclipse, EMF/GMF and the Graphiti API. At the moment the tool is under development, but it will be released as opensource Eclipse Project as soon as it reaches a reasonable level of completeness. The tool also includes the mappings from the IFML abstract concepts to the platform- specific concepts of Java Swing, Microsoft WPF, and HTML, as described in the IFML specification.

The modeling of the IFML diagrams for the UI part can be complemented with (ex- ecutable) UML diagrams according to fUML specifications combined with Alf scripts for the backend business logic.

A sneak preview of the tool and generation features is reported in the video, also shown below:

To keep updated on my activities you can subscribe to the RSS feed of my blog or follow my twitter account (@MarcoBrambi).

My new book on Model-Driven Software Engineering

Model-Driven Software Engineering in Practice. Book cover
Model-Driven Software Engineering in Practice.
See more on

I’m really proud to announce that a huge joint effort with Jordi Cabot and Manuel Wimmer has finnally reached his end. Our new book on model-driven software engineering, on which we have been working for almost one year, is finally published!

First of all, I wish to extend my thanks to my coauthors for the wonderful teamwork and to Richard Soley, OMG Chairman, who accepted to write the foreword of the book. I actually found it one of the most inspiring outlooks on the field I’ve read.

The book discusses how model-based approaches can improve the daily practice of software professionals. Model-Driven Software Engineering (MDSE) or, simply, Model-Driven Engineering (MDE) practices have proved to increase efficiency and effectiveness in software development, as demonstrated by various quantitative and qualitative studies. MDSE adoption in the software industry is foreseen to grow exponentially in the near future, e.g., due to the convergence of software development and business analysis.

The aim of this book is to provide you with an agile and flexible tool to introduce you to the MDSE world.

This allows you to quickly understand its basic principles and techniques and to choose the right set of MDSE instruments for your needs so that you can start to benefit from MDSE right away.
As such, the book is not addressing only the hard-core software modelers, but also BPM practitioners, enterprise system consultants and analysts, and so on. Indeed, the book is targeted to a diverse set of readers, spanning: professionals, CTOs, CIOs, and IT team managers that need to have a bird’s eye vision on the matter, so as to take the appropriate decisions when it comes to choosing the best development techniques for their company or team; software and business analysts, developers, or designers that expect to use MDSE for improving everyday work productivity, either by applying the basic modeling techniques and notations or by defining new domain-specific modeling languages and applying end-to-end MDSE practices in the software factory; and academic teachers and students to address undergrad and postgrad courses on MDSE.

The book is organized into two main parts.

The first part discusses the foundations of MDSE in terms of basic concepts (i.e., models and transformations), driving principles, application scenarios and current standards, like the well-known MDA initiative proposed by OMG (Object Management Group) as well as the practices on how to integrate MDSE in existing development processes.

The second part deals with the technical aspects of MDSE, spanning from the basics on when and how to build a domain-specific modeling language, to the description of Model-to-Text and Model-to-Model transformations, and the tools that support the management of MDSE projects.

In addition to the contents of the book, more resources are provided on the book’s website we are currently setting up. There you can find the detailed TOC, the sources of the examples presented in the book, and the teaching materials we will build to support training activities based on the book.

If you want to buy the Model-Driven Software Engineering in Practice book, you can find it on Amazon or on the Morgan&Claypool website (printed and electronic versions available).

If you read and like the book, we will be glad if you post a review on Amazon!

To keep updated on my activities you can subscribe to the RSS feed of my blog or follow my twitter account (@MarcoBrambi).

Presentation at Code Generation 2012: User Interaction Modeling: current status of the standardization process

Together with Emanuele Molteni, I will give a speech at Code Generation 2012 on: 
User Interaction Modeling: current status of the standardization process, from the requirements to the language.

In this presentation we will go through our 15-years experience of user interaction modeling for the Web, based on WebML and WebRatio, and we will delve into the challenge of making our own domain-specific language (DSL) a standard. We will present the ongoing activities at OMG towards the standardization of a Interaction Flow Modeling Language (IFML): we will discuss the requirements and the scope of the sought standard, and we will propose a solution based on our 15-year experience in Web interaction design. We will be inspired by our WebML language, but we will also explain how to go beyond that, so as to cover mobile, multi-touch, collaborative applications, independently from the implementation platform.
We will also show how a dedicated interaction modeling tool like WebRatio can ease the development through a plethora of facilities supporting the developer, including: visual debugging, quick prototyping, multi-platform and cloud deployment, and so on.

I look forward to the exciting days in Cambridge and to the feedback we will get from the public.
If you have suggestions or proposals on the topics you wish us to cover during the speech, feel free to let us know!

If you want to know more about the IFML standardization at OMG, you can visit these posts on IFML. The presentation given on IFML at CG 2012 is available on Slideshare and visible here (see below).

WebRatio is a proud sponsor of the event. See you in Cambridge then!

To keep updated on my activities you can subscribe to the RSS feed of my blog or follow my twitter account (@MarcoBrambi).

Building DSLs: who, how and when

Due to a recent discussion I had to spend some time thinking on who should build a DSL (Domain Specific Language) and why, as opposed to who should use it.

Let’s start from some basic assumptions:

  1. Good abstractions must be intuitive and make life easier, not harder.
  2. DSLs are a must-have for most application scenarios (I’m not thinking only to software)
  3. Finding the right abstractions for defining a DSL is hard and time consuming
  4. Domain experts basically care about maximizing their productivity in working in their domain, but do not probably willing to spend huge amount of time defining methods and tools for that.

That’s why good DSLs do not come out of the blue everyday. And despite I can be a fan of language design and open DSLs, I think this is fine as it is.
The final goal of MDSD (Model Driven Software Development) is not to make every developer a language designer. The goal is to have good DSL designers that build good DSLs for the right audience.
Our experience with DSL visual languages in the Web context (WebML, see is that it took years (together with tens of industrial experiences and thousands of users) to refine and polish a good language. That’s why I’m saying that a process like this can’t be in charge of any developer or designer.

Then, obviously a good DSL should be open for extensions and closed for modifications (ahh, the good old open-close principle!).

Finally, about tools: good tools must go with good languages. And I think that domain specific architectures (shall we call them DSAs?) should pair DSLs. As we say that one language does not fit all needs, I would say that an architecture may not fit all languages.
This could give you the impression I’m somewhat skeptical with respect to generic model-based tool/editor generators (and that’s actually true). Tools, design interfaces and publishing architectures should be tailored to the users, otherwise we fall back to the problems that should have been solved by abstraction and simplicity of the DSLs.

Some thoughts on DSLs (Domain Specific Languages)

Domain-Specific Languages (DSLs) are design and/or development languages that are designed to address the needs of a specific application domain. DSLs are particularly useful because they are tailored to the requirements of the domain, both in terms of semantics and expressive power (and thus do not enforce end users to study more comprehensive general-purpose languages) and of notation and syntax (and thus provide appropriate abstractions and primitives based on the domain).
I wish to highlight a few classifications of these languages, namely the dimensions of focus, style and notation. 

The focus of a DSL can be either vertical or horizontal.
Vertical DSLs aim at a specific industry or field. Examples of vertical DSLs may include: configuration lan-guages for home automation systems, modeling languages for biological experiments, analysis languages for financial applications, and so on.
Horizontal DSLs have a broader applicability and their technical and broad nature allows for concepts that apply across a large group of applications. Examples of horizontal DSLs include SQL, Flex , WebML , and many others.

The style of a DSL can be either declarative or imperative.
Declarative DSLs adopt a specification paradigm that expresses the logic of a computation without describing its control flow. In other words, the language defines what the program should accomplish, rather than describing how to accomplishing it. A typical example of declarative definition is the one of service choreography.
Imperative DSLs instead specifically require defining an executable algorithm that states the steps and control flow that needs to be followed to successfully complete a job. A typical example of declarative definition is the one of service orchestration.

The notation of a DSL can be either graphical or textual.
The graphical DSLs (al-so known as Domain Specific Modeling Languages, DSML) imply that the outcomes of the development are visual models and the development primitives are graphical items such as blocks, arrows and edges, containers, symbols, and so on.
The textual DSLs comprise several categories, including XML-based notations, structured text notations, textual configuration files, and so on.

Despite the various experiences in DSL design and application, there is no general assessment on the preferences of the developers for one or the other kind of language. However, typically languages oriented to the end users tend to be more visual and declarative, while the ones for developers are often textual and imperative.
This post is not meant to be a thorough discussion on DSLs though. For more info you can have a look at:

Other thoughts in this regard will be soon available within a chapter of the second Search Computing book, to be published as Springer LNCS volume in March / April 2011.