Generating Business Applications from Executable Models Using Xtend and Eclipse UML2
This presentation will describe the anatomy of an open-source code generator written in Xtend that can produce fully functional data-centric applications on the Java EE and MEAN* stacks from executable models created with Eclipse UML2 (via TextUML), and the challenges in building such generator. The generated application will include a REST API, a user interface, database persistence, domain layer, and a suite of functional tests.
While code generation from models is common place, the typical code generator will take care of producing only the boilerplate code, leaving to the user the task of writing the actual business logic in the target language by hand, which defeats some key benefits of model-driven development. In order to fully reap those benefits and be able to produce entire running applications from models: i) models must address not only structural but also behavioral aspects of the application domain and ii) code generators must be able to translate the behavioral aspects to the target platform. This presentation illustrates this approach using Xtend as the programming language for the code generator, Eclipse UML2 for traversing rich UML models and TextUML for building such models, and the JavaEE and MEAN* stacks as target platforms.
The target audience is made of architects and developers with previous exposure to code generation (with or without Xtend). After the presentation, attendees should be able to use the generator described as-is, modify and extend it to satisfy their specific needs, or use it as a basis for writing full code generators for other target platforms.
Much of the functionality described here is available today as part of Cloudfier (http://cloudfier.com), a web-based platform for rapid development and deployment of business apps that uses Eclipse Orion as its development environment. It will also soon be available as a set of Eclipse plug-ins.
* MEAN stands for: Mongo / Express / Angular / Node.js