Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
ALMOsT.js: an Agile Model to Model and Model to Text
Transformation Framework
Carlo Bernaschina
Rome, June 6, 2017
Model Driven Development
MDD is the branch of software engineering that advocates the use of models.
(Abstract representat...
Model Transformations (M2M)
Model Transformations are a Key ingredient of MDD.
Iteratively adding details.
Model Transformations (M2T)
Model Transformations are a Key ingredient of MDD.
Generating final artifacts.
Agile Software Development
Agile Software Development is an incremental and iterative approach based on
principles that ai...
Agile Model Driven Development (AMDD)
The majority of the attempts to use apply Agile techniques to Model
Driven Developme...
What about tools/meta-models?
We need to integrate tool into the loop.
Tools need to co-evolve iteratively with the models...
Model Transformation Languages
We have a plethora of transformation languages, that can be
organized as follow:
 Declarat...
Requirements
1. No installation
2. No new language
3. Fast start-up
4. Parallel development
5. Customized output
6. Custom...
We present
ALMOsT.js
AgiLe MOdel Transformations
https://www.npmjs.com/package/almost
What you need to know is ALMOsT Java...
Architecture
The Model
The model must be an object with two array properties
(elements, relations)
The Rule (Model)
Rules are pairs of plain functions.
(condition & action)
The Rule (element)
Rules are pairs of plain functions.
(Condition & Action)
The Rule (relation)
Rules are pairs of plain functions.
(Condition & Action)
The Reducer
All the results of the rules are merged following a custom reduction policies.
ALMOsT.js has two predefined re...
Reducer (Model2Model)
In a Model2Model transformation each rule must export a partial model.
They will be reduced my conca...
Reducer (Model2Text)
In a Model2Text transformation each rule must export an object where each
attribute is a descriptor f...
Usage (put everything together)
What About Meta-Models?
No explicit definition of Meta-Model is present in ALMOsT.js
There is though a suggested element a...
What About Meta-Models? (2)
Using the ALMOsT-Extend plugin it is possible to extend the input model
with helper functions ...
Running Example (Model2Model)
Running Example (Model2Text)
No installation
It must be possible for the team to use the framework
instantly, with no installation.
ALMOsT.js is develo...
No new language
It must be possible to start using the environment
without learning languages that are not normally
employ...
Fast start-up
It must be possible to create a minimum viable model
editor and model transformation in a very short time.
A...
Parallel Development
It must be possible to work in a team on different
aspects of the same sprint.
ALMOsT.js model format...
Customized output / Customized generation
It must easy to turn the generated code into a
complete version by adding non fu...
User Case
IFMLEdit.org
Model Editing
IFML Model Editing
Model to Model transformations
PCN Model Generation and Analysis
Model to Text transformation
Code Generation & Simulation
Future Work
 More Case-Studies
 Better Documentation
 More Plugins
 Create a Community
THANK YOU
any questions?
carlo.bernaschina@polimi.it
Upcoming SlideShare
Loading in …5
×

ALMOsT.js: an Agile Model to Model and Model to Text Transformation Framework

592 views

Published on

Model Driven Development (MDD) requires model-to-model and/or model-to-text transformations to produce application code from high level descriptions.
Creating such transformations is in itself a complex task, which requires mastering meta-modeling, ad hoc transformation languages, and custom development tools.
This paper presents ALMOsT.js, an agile, in-browser framework for the rapid prototyping of MDD transformations, which lowers the technical skills required for Web and mobile developers to start be proficient with modeling and code generation. ALMOsT.js is shown at work in the creation of IFMLedit.org, a browser-based, online/offline environment for the MDD specification and rapid prototyping of web and mobile applications.

  • Be the first to comment

ALMOsT.js: an Agile Model to Model and Model to Text Transformation Framework

  1. 1. ALMOsT.js: an Agile Model to Model and Model to Text Transformation Framework Carlo Bernaschina Rome, June 6, 2017
  2. 2. Model Driven Development MDD is the branch of software engineering that advocates the use of models. (Abstract representations of a System)
  3. 3. Model Transformations (M2M) Model Transformations are a Key ingredient of MDD. Iteratively adding details.
  4. 4. Model Transformations (M2T) Model Transformations are a Key ingredient of MDD. Generating final artifacts.
  5. 5. Agile Software Development Agile Software Development is an incremental and iterative approach based on principles that aim at increasing productivity and adherence to requirement, while keeping the process as lightweight as possible.  Extreme Programming Test Driven Development  SCRUM
  6. 6. Agile Model Driven Development (AMDD) The majority of the attempts to use apply Agile techniques to Model Driven Development focus on the mapping of the development process.  Incremental & Iterative Development support for incomplete models  Test Driven Development  SCRUM mapping MDD development steps to the SCRUM workflow
  7. 7. What about tools/meta-models? We need to integrate tool into the loop. Tools need to co-evolve iteratively with the models in order to support new functionalities/requirements that were not foreseen during the initial phases.
  8. 8. Model Transformation Languages We have a plethora of transformation languages, that can be organized as follow:  Declarative EMF Henshin  Imperative Kermeta  Hybrid ATLAS Transformation Language (ATL) They all require specific tools and environment, making them not easy to integratee inside other tools.
  9. 9. Requirements 1. No installation 2. No new language 3. Fast start-up 4. Parallel development 5. Customized output 6. Customized generation
  10. 10. We present ALMOsT.js AgiLe MOdel Transformations https://www.npmjs.com/package/almost What you need to know is ALMOsT JavaScript
  11. 11. Architecture
  12. 12. The Model The model must be an object with two array properties (elements, relations)
  13. 13. The Rule (Model) Rules are pairs of plain functions. (condition & action)
  14. 14. The Rule (element) Rules are pairs of plain functions. (Condition & Action)
  15. 15. The Rule (relation) Rules are pairs of plain functions. (Condition & Action)
  16. 16. The Reducer All the results of the rules are merged following a custom reduction policies. ALMOsT.js has two predefined reduction policies:  Model2Model The results of the rules must be partial models  Model2Text The results of the rules must objects in which every attribute describes a file or a folder in the generated filesystem.
  17. 17. Reducer (Model2Model) In a Model2Model transformation each rule must export a partial model. They will be reduced my concatenating elements and relations.
  18. 18. Reducer (Model2Text) In a Model2Text transformation each rule must export an object where each attribute is a descriptor for a file or a folder. Mandatory properties are type and name. If an isFolder property is found it will be considered as a folder and the children properties will be concatenated.
  19. 19. Usage (put everything together)
  20. 20. What About Meta-Models? No explicit definition of Meta-Model is present in ALMOsT.js There is though a suggested element and relations structure.
  21. 21. What About Meta-Models? (2) Using the ALMOsT-Extend plugin it is possible to extend the input model with helper functions that can be used to simplify the graph navigation:  Id  Element Lookup toElement(), toId()  Type Checking isType(), isOtherType()  Relation Navigation getChildren(), getParent()  Custom Walks getDescendants(), getAncestors()
  22. 22. Running Example (Model2Model)
  23. 23. Running Example (Model2Text)
  24. 24. No installation It must be possible for the team to use the framework instantly, with no installation. ALMOsT.js is developed using pure JavaScript. It can be integrated inside any web based platform, both on client- side and on server-side (Node.js)
  25. 25. No new language It must be possible to start using the environment without learning languages that are not normally employed for application development. ALMOsT.js is developed using pure JavaScript. Both data structures and rules are plain JavaScript objects and code.
  26. 26. Fast start-up It must be possible to create a minimum viable model editor and model transformation in a very short time. ALMOsT.js is plug-in based, you use/learn just what you need.  Graphical editors ALMOsT-Joint  Advanced graph analysis ALMOsT-Extend  Rule tracing ALMOsT-Trace
  27. 27. Parallel Development It must be possible to work in a team on different aspects of the same sprint. ALMOsT.js model format can be easily customized to introduce new concepts without the introducing breaking changes. ALMOsT.js rules can be easily modularized.
  28. 28. Customized output / Customized generation It must easy to turn the generated code into a complete version by adding non functional aspects like graphics and sample data collections. ALMOsT.js generation rules can be easily extended using state of the art template engines like PUG and EJS.
  29. 29. User Case IFMLEdit.org
  30. 30. Model Editing IFML Model Editing
  31. 31. Model to Model transformations PCN Model Generation and Analysis
  32. 32. Model to Text transformation Code Generation & Simulation
  33. 33. Future Work  More Case-Studies  Better Documentation  More Plugins  Create a Community
  34. 34. THANK YOU any questions? carlo.bernaschina@polimi.it

×