Enjoy today’s guest post on the new EMF on Rails by its creators:
EMF on Rails is a model-driven process that automates the construction of domain-specific generators for web applications. This work was presented at the ICSOFT 2012 conference by Rosa López-Landa, Julieta Noguez, Esther Guerra and Juan de Lara.
Our proposal consists in the combination of rapid application development (RAD) frameworks for web information systems, (in the style of Ruby on Rails or Spring Roo) with the model-driven methodology.
Such frameworks are used as back-end code generators for the construction of domain-specific web application generators, using a modelling layer that facilitates the description of web applications even from non-technical people. RAD frameworks accelerate web development by using conventions over configurations, freeing the programmer from repetitive tasks and automating the generation of skeleton code from top-level commands. Hence, they become an ideal target for code generation in model-driven web engineering, instead of building hand-made code generators. In our case, we use Spring Roo as back-end for code generation.
This way, EMF on Rails develops software from models and model transformations, rather than by hand-crafted code. In particular, the design of a customized web generator comprises building a meta-model or domain specific language (DSL) of the domain (marked as (1) in the figure), as well as an add-on model (2) with specific commands that the code generation will need. Then, through an ATL transformation and a code generator it produces: a profile that will be used to automatically annotate the models defined by the user of the generator framework (3), and a set of Java classes with a skeleton of the Roo add-on that will be used for code generation (4). The generated Java classes are skeletons that the designer needs to complete by hand with the specific functionality.
Once the domain-specific framework is built, it can be used to generate families of web applications within a particular domain. The user of the generator only needs to describe the application using a model, which is an instance of the meta-model of the domain (5). Then, this model is automatically annotated using the profile that was generated from the add-on model (6), and a Roo script is subsequently generated based on these annotations (7). The Roo script utilizes the add-on previously defined, and is used to synthesize the final web application using Spring Roo (8).
The advantage of this approach is that it automates the creation of code generators for families of web applications, enabling the rapid generation of domain-specific web applications from annotated domain-specific models by Spring Roo scripts.
EMF on Rails is still under development, and we are working actively on improving tool support, building libraries of add-on models and further case studies. The full paper is available here.
If you liked this post, you should subscribe to the blog feed or facebook page and follow my thoughts on twitter about software development or web design and social media .