Querbalken

SMDA - The SimpleMDA Project

On behalf of several non german speaking requests this project site is english now - tries to be. Anyway, I hope, I will be able to show a bit about my way of MDA. This is a way, that is rather straight to the OMG's one. So dealing with MDA means to me dealing with formally specified modeling languages like UML, BPMN and so on, with MOF and QVT.

Part 1 - The SMDA Workbench
I will work with a free MDA workbench. That is not the best solution yet it is more or less a free cost solution. So that is not to bad, isn't it?

Part 2 - The MDA Process Using SMDA
Second let us learn something about MDA by learning a bit about my "simple" MDA project.

"Model-2-Model"-Transformation with QVT - Examples
Let us dive deaper into the MDA ocean and discuss some M2M with QVT examples.

"Model-2-Text"-Transformation with MTL, JET, OAW - Examples
Last before least I want to demonstrate code generation, the last step before coding.

Some Questions, Some Answers
This link leaps to another site of my profile, where I gather some questions an answers to the MDA topic.

References and Literature

Publications from the Project

All of the publications from the project are in German, yet. If there is any more interest from English speaking folks, please tell me.
QVT-Relations
A book about QVT - Relations Language, Springer. The main topic of my SMDA project.
Published in June 2009.
QVT-Operations
A book about QVT - Operational Mappings, Springer. The other main topic of my SMDA project.
Published in November 2009.
[SMDA09] freeMDA - Eine Plattform für integrierte, modellgetriebene Anwendungsentwicklung;
Nolte, S.; EclipseMagazin, Heft 01, 2010
Main topic: freeMDA is a free MDA platform based on Eclipse Modeling Framework and TOPCASED.
[SMDA08a] Eclipse steht Modell - Anwendung eines MDA-Konzeptes auf der Eclipse Plattform;
Nolte, S.; EclipseMagazin, Band 15, 3.2008
Main topic: On using metamodels with QVT transformations on an Eclipse based platform.
[SMDA08b] Modelle und Transformationen - eine pragmatische Betrachtung der MDA QVT;
Nolte, S.; ObjektSpektrum, Heft 5, 08/2008
Main topic: Models and transformations, a pragmatic approach
- discussing an example UML2EJB with mediniQVT (relational).
[SMDA07] Modelle und Metamodelle im Eclipse-Kontext; Nolte, S.; ObjektSpektrum, Heft 6, 11/12.2007
Main topic: Representation of models and metamodels in an Eclipse based environment.

Intro

SMDA means "Simple MDA". This project mainly aims for collecting some practical experiences with the OMG's MDA approach [MDA1] and especially the MOF/QVT specification [MOF2], which is finalized as V1.0 April 2008. It's simple, because I first did some work with the simple examples from the OMG's specification. Certainly model transformation is not that simple at all. Everybody who is doing some work using QVT knows. One of the bigger problems is getting some good tool for doing it. Another problem of course is doing it.

Well, I'm trying and I'm working on both first building an simple and free workbench, the SMDA workbench, and secondly showing how to do model transformation using QVT Relations Language (RL) and Operational Mappings (OM). I'm not so much concerned with Core Language. In this project it's just the virtual machine for RL and OM solutions. And I'm not (yet) aiming for code generation (Model2Text) either. I would say that's Model Driven SW Development (MDSD) and not exactly MDA in the OMG's sense of humor. Code generation from models is another topic for future work, especially since OMG's M2T template language has meanwhile been finalized, too [MOF3]. Let's wait for tools. Yes, I know, there is for example the openArchitectureWare [OAW] and the AndroMDA [AMDA]. And they are not bad indeed, in spite of not being based on MOF/QVT. But that's not what I want to talk about.

I want to talk about SMDA - Why is it simple?

As mentioned before MDA is not simple at all. QVT is not simple either. SMDA should be simple for two reasons:

  1. The workbench should be build with free components and therefore it is completely free as well. It's for experimental and not commercial use. So far I've managed that task and you're welcome to take a look at the SDMA workbench.


  2. I have chosen the OMG's simple metamodels SimpleUML and SimpleRDBMS to keep my model transformation samples simple. I've intensively worked on the Uml2Rdms sample of the QVT specification with RL and OM and I put them to work. So I hope anybody can understand those examples and learn from them something about MOF metamodeling and QVT model transformation.
Anyway, I'm looking forward to your feedback. And by the way, I'm working on books about MOF QVT, Relations Language and Operational Mappings, both in German. The first part, RL, is going to be printed soon, the second part, OM, is on it's way to the publisher. If anybody is interested in an English version, tell me. But I will want to have some money for it.

Let's have a little chat about MDA, simple or not

MDA on the one hand side is modeling - modeling with formal modeling languages. For this point of view we may need metamodels based on the MOF approach. Metamodels are useful for defining modeling languages. Let's say modeling languages based on metamodels are formal. Formal modeling languages are for example UML, BPML, SysML. Metamodels are also useful for model transformation and that's what we want them for. Because on the other hand besides of modeling another main idea of MDA is transformation.

Sometimes you may hear of something like domain specific languages (DSL). That's no OMG notion, as far as I know, and it's more or less comparable with UML Profiles. And, nevermind, UML Profiles are really useful, too. So are DSLs.

Anyway, we need to have metamodels to use them as modeltypes, let's say data structures for transformations. For example the UML2 metamodel for transforming UML models into other ones like EJB models. So apart from transformation SMDA should enable metamodeling what is somehow modeling UML class diagrams.

The SMDA workbench is based on Eclipse. For modeling and metamodeling reasons we take the Eclipse UML2 Modeling Toolkit (UML2 MDT)[EUML1]. We may take any other modeling tool, free or not free, that uses the Eclipse UML2 framework, for example topcased which accidentally is for free. For transformation we need to have metamodels in a serialized representation. This should be the Ecore-format from the Eclipse Modeling Framework [EMF2].

The main quest for SMDA is transformation using the QVT languages RL and OM. For this job we will use the free tools mediniQVT for RL and SmartQVT for OM, both of them are Eclipse Plug-ins that work on Eclipse EMF or UML based models. The first project will be discovering the Uml2Rdbms transformation from the OMG QVT specification. I have brought it to work in both variants, RL and OM, and thus I will try to make it clear. Take a look at the project-folder in the zipped SMDA project that can be downloaded. Those are more or less simple so far. You will find projects with preparing and building metamodels and you will find the Uml2Rdbms projects. Of course there can be found some more examples even with other, "real" metamodels like the UML one and maybe sooner or later some more useful sample transformations like the UML2EJB one [SMDA08b].




Part 1: The SMDA Workbench

The Architecture of the SMDA Workbench

The SMDA workbench is based on Eclipse. I'm mainly concerned with transformation using QVT, so we may use the tools SmartQVT for Operational Mappings and mediniQVT for Relations Language. Meanwhile the Eclipse Modeling Tools consist of some Model-2-Model transformation facilities, for example the Operational QVT engine (QVTO), formerly Borland's Together, which is rather useful in my eyes. And furthermore I want to do some modeling and metamodeling now and then, so we may need at least the Eclipse Model Development Tools (UML2 MDT). There may be other UML-modeling tools like Topcased, presupposed they are Eclipse based, too. It may be interesting to investigate other commercial and professional tools concerning the MDA topic like Together, MagicDraw, Enterprise Architect, perhaps ArcStyler. Well, simple MDA meant plain in cost and those commercial tools are not cheap at all.

For all components of SMDA I need the Eclipse Modeling Framework (EMF). And if we want to do some graphical modeling, for example some metamodels or sample models for transformation, the components of the Eclipse Graphical Editor project - Graphical Modeling Framework (GMF) and Graphical Editor Framework (GEF) - will be needed. For using tools of the Eclipse Model Development Toolkit (UML2 MDT) project the UML2 component is necessary. Well, and we must not forget Java as the general runtime engine and, if we want do some programming, the programming language as well. Each of the above tools are implemented in Java.

The SMDA Workbench in Eclipse Europe Representation

For example the SMDA workbench will do well with the following versions of the named products:

Core-products:
eclipse-SDK-3.3.1-win32
emf-sdo-runtime-2.3.1
mdt-uml2-runtime-2.1.1
UML2 Tools:
GEF-runtime-3.3.2
GMF-runtime-2.0.2
emf-query-runtime-1.1.1
emf-transaction-runtime-1.1.1
emf-validation-runtime-1.1.1
mdt-ocl-runtime-1.1.2
mdt-uml2tools-SDK-incubation-0.7.2
SmartQVT:
fr.tm.elibel.smartqvt_0.2.2
fr.tm.elibel.smartqvt.examples_0.1.8
fr.tm.elibel.smartqvt.examples.externalmm_0.1.3
mediniQVT:
mediniQVT_1.4.0 (1.6 for Eclipse 3.4)
QVTO:
QVTO (it's more or less for Ecl 3.4 only)

Well, as I have mentioned above this is Europe. My freeMDA sample project ( docu in pdf, zipped project ) is based on this platform. Eclipse has developed and will do so on and on. So let us speak a bit about Eclipse progress. There has a modeling initiative arisen, which is pretty mature meanwhile, the Eclipse Modeling Project. This project intends to put more modeling and model driven techniques into Eclipse. The platform, that is deployed from this project, delivers basically EMF, GMF, OCL and UML2. Based on this components there are more MDA components provided by now:

Let's Take a Deeper Look Into Different SMDA Combinations

Based on above components there are different possible SMDA combinations. First you have to decide whether you wish to do graphical modeling or not, whether you need the UML2 MDT or not. Working with and on models and metamodels in that tree-like XML/Ecore representations is also possible using the EMF, although it's not graphical and a bit raw.

Anyway, you can build a UML2 Modeling Tool version that consists of the complete Eclipse based architecture, let's say the maxi version. On the other hand there may be a version consisting of Eclipse and EMF only, a mini version really. This is enough for distributing metamodels and for transformation. Though, I suggest to integrate the UML2 core package, so you will have a midi Version. Remember, this one needs EMF, GMF and GEF. Now you can work with model files in plain (non graphical) UML, the tree-like version.

Now you are able to combine mediniQVT and SmartQVT either with the mini variant, for transformation only, or with the maxi variant, for transformation and modeling. That is interesting, especially if you want to see the result models in a graphical representation, what is difficult. The medini mini is more or less what you will get with the medini RCP download. To be precise the mediniQVT RCP does not allow distributing EMF metamodels, but you don't need them in a deployed version for medini. I published some remarks on the topic of modeling, building and deploying metamodels with the EMF in [SMDA07].

Summary:
(1) Eclipse
(1.1) mini - Eclipse + EMF
(1.2) midi - Eclipse + EMF + GMF + GEF + UML2
(1.3) maxi - Eclipse + EMF + GMF + GEF + UML2 + EMF Tools + OCL + UML2 MDT
(2) MQVT - mediniQVT
(2.1) mini - mediniQVT RCP
(2.2) midi - medini QVT (Plug-ins) + Eclipse midi
(2.3) maxi - medini QVT (Plug-ins) + Eclipse maxi
(3) SQVT - SmartQVT
(3.1) midi - SmartQVT + Eclipse midi
(3.2) maxi - SmartQVT + Eclipse maxi
(4) QVT-RL/OM
(4.1) midi - SmartQVT + mediniQVT + Eclipse midi
(4.2) maxi - SmartQVT + mediniQVT + Eclipse maxi

The last workbench (4 - QVT-RL/OM) is complete for QVT Relations as well as for Operational. Yet it is complex and complicated because you always have to know and decide which transformation engine for editing, compiling and running you are working with. So I would suggest one workstation for operational or relations differently. You may integrate QVTO as you will. And if you still want to have a deeper insight, take a look at the sample project freeMDA.

Coming back to our above discussion about Europe and further development, mediniQVT (Relations Language) and SmartQVT (Operational Mapping) are not under construction any longer, as far as I can see. For Operational QVTo will do and it really does. And for Relations there is a QVTd project on work.

Some more free "MD" products which are not used in SMDA:

ATLATLAS Transformation Language (it's part of Eclipse MDT)
oAWOpenArchitectureWare (it's part of Eclipse MDT)
AndroMDAAndroMDA
PapyrusPapyrus UML
BOUMLBOUML
... and others.



Part 2 - The MDA Process Using SMDA

Overview of a sample MDA process

(You can take also a look at MDAProcess.pdf to get an impression of a model driven development process in a general point of view).

MdaQvtApproach.jpg
This picture shows a sample model driven development process, the modeling and transformation of a simple Bank_Kunde model.
  1. First of all we need a metamodel based (formal) modeling language, MyUML. We may get this one from a process ModelMetamodels.


  2. With MyUML we can define some simple class diagram Bank_Kunde.myuml. (UseMetamodels > Modeling).


  3. In the next step we define and execute a QVT transformation to put the MyUML class diagram Bank_Kunde.myuml into a MyRDBM diagram Bank_Kunde.myrdbm (UseMetamodels > Transform). For this we need both metamodels MyUML and MyRDBM in a serialized form (ecore or emof).


  4. We may finish this process with generating a Bank_Kunde.DDL from Bank_Kunde.myrdbm with a M2T script that uses the MyRDBM metamodel. Generation is not (yet) in the concern of this documentation.

Now let's take a deeper look into that process with "Working on Metamodels"

Subtitle: Modeling, Representation and Use of Metamodels in the Eclipse-Context

By the way, this and the following diagrams provide a nice feature in my eyes. If you click on one of the named symbols, you will see another picture with some more details about that element. The object nodes lead to some metamodel or perhaps model representation, the action nodes lead to some further details, maybe another activity diagram or some tool screenshot. For example clicking on UseMetamodels leads you to another activity diagram. If you click on the activity background, you will come back to the previous diagram. Have a try.

WorkingOnmetamodels means generally modeling (defining, specifying) them, publishing (deployment) and using them. Modeling metamodels is in this point of view modeling a UML2 class diagram for example with any UML tool. I use the Eclipse UML2 Modeling Tools for this job. Publishing is exporting the diagram version into a serialized file representation, let's assume XMI or some Eclipse UML-file. Sometimes you will be able to get the metamodels from some community [ZOO], for example the SimpleUML or the SimpleRDBM. Those ones in MyUML and MyRDBM version are in the zipped SMDA project. UsingMetamodels means on the one hand side using the modeling languages defined by them, for example Bank_Kunden.myuml is a MyUML model. On the other hand side metamodels are necessary for model transformation as well as for model driven software development.

SimpleUML.ecore and SimpleRDBM.ecore
show the original metamodels as introduced in an earlier version of the MOF QVT-specification.


MyUML and MyRDBM
are those simple metamodels after having been modified a bit. For example the former original ones have been without package and schema elements. Now they have and MyUML as well as MyRDBM have them, too. These symbols represent the deployed Eclipse plug-in versions of the metamodels, it's the jars.


Bank_Kunden.myuml and Bank_Kunden.myrdbm
Bank_Kunden.myuml is the model having been modeled with MyUML and Bank_Kunden.myrdbm is the result of the transformation process.


DevelopMetamodels and UseMetamodels
are the next activities that show each process a bit more detailed.






DevelopMetamodels

DevelopMetamodels describes the process of defining and deploying metamodels in the Eclipse context. Remember, SMDA is Eclipse based so we need the metamodels in an Eclipse version, means in serialized EMF-Ecore format.

Developing of metamodels on the one hand is modeling them with some UML2 tool. Take a deeper look into ModelMetamodels.

On the other hand we have to deploy the metamodels as plug-ins - prepare, generate and export - using the EMF core tools to generate plugins from ecore models. In this connection I have to mention, this deployment is necessary for SmartQVT. mediniQVT is content with the ecore file representation. SmartQVT is a bit more complicated regarding metamodels.






ModelMetamodels

ModelMetamodells shows the modeling process in some more detail. Modeling metamodels is just the same as modeling UML models using class diagrams. Not each class diagram is a metamodel but each (MOF) metamodel is a class diagram. So you may use an Eclipse based UML tool or at least one that is able to deliver models in an Eclipse format. Or you take the more simple Sample Ecore Model Editor from the EMF core or the UML model editor from the UML2 core component. Those are ok for simple metamodels or for navigating through metamodels.






UseMetamodels

As far as we know metamodels are models for formal modeling languages. Using metamodels means modeling on the one hand and transformation on the other.

modeling
For example modeling a Bank_Kunden.myuml with the language MyUML (MyUML model editor) ...


transformation
... that can be transformed into Bank_Kunden.myrdbm based on MyUML and MyRDBM. You can take a look on that result model with MyRDBM model editor.
SMDA State
Well, this project is finished now. It has been a book-writing project and there are some books and other publishings (Results). I'm focussing on "model-to-text" transformation now. That's a bit more the classic way of MDSD. Anyway, it's an interesting field of
Java Emitter Templates (JET) from Eclipse EMF,
Xpand from openArchitectureWare (oAW)),
M2T Template Language (MTL) from the OMG itself (and so most interesting for me)
Velocity Template Language (VTL) from the Apache group.

Last you can find all mentioned metamodels, models and transformation projects and more in the SMDA-examples, especially the freemda sample describes a complete MDA-project that uses a more modern version of the SMDA workbench. You may have the option to book me for workshops on this topic, too. Write to me.






References and Literature

Links into the Web - Last access September 2014

EclipseSome about Eclipse and modeling topics
[ATL] ATLAS Transformation Language
[ECL1] Eclipse Platform
[ECL2] Eclipse Platform Technical Overview
[EMF] Eclipse Modeling Framework
[EMMT] Die Eclipse MMT-Inititative (Model-2-Model Transformation)
[EUML2]Eclipse UML2 Project
[EUML] Getting Started with UML2
[GMF] Graphical Modeling Project
[GMFT] Graphical Modeling Framework, Tutorial
 
MDTAny model driven tools and topics
[AMDA] AndroMDA
[eUML2]eUML2, Soyatec
[MQVT] mediniQVT
[OAW] Xtext | Xpand | Xtend
[QVTO] QVT operational
[SQVT] SmartQVT
[UML5] Papyrus UML, Papyrus-1.6.2
[UML6] Topcased-UML2
[ZOO] Metamodel Initiative
 
OMGAll of the OMG stuff we need
[BPMN] Business Process Modeling Notation
[MDA] MDA Specifications
[MOF] Meta Object Facility, Core Specification
[M2T] MOF Model-to-Text Transformation
[OCL] Object Constraint Language
[QVT] MOF QVT
[SysML]Systems Modeling Language
[UML] Unified Modeling Language
[XMI] XMI
[MDA1] MDA Guide Version 1.0.1
[MDA2] MDA Committed Companies

Books

[ECL04] Eclipse, Anwendungen und Plugins mit Java entwickeln; Shavor et al., Addison-Wesley, 2004
[ECL05] Eclipse, Rich Client Platform; McAffer et.al., Addison-Wesley, 2005
[ECL06a]Java-Entwicklung mit Eclipse 3.2; Berthold Baum, dpunkt-Verlag, 2006
[ECL06b]Eclipse, Building Commercial Plugins; Clayberg, E., Rubel, D., Addison-Wesley, 2006
[EMF03] Eclipse Modeling Framework; Budinsky et al., Addison-Wesley, 2003
[MDA06a]MDA, Effektives Softwareengineering mit UML2 und Eclipse; Gruhn, V., Pieper, D., Röttgers, C., Springer, 2006
[MDA06b]Model-Driven Architecture, Eine praxisorientierte Einführung in die MDA; Meimberg, O., Petrasch, R.; dpunkt-Verlag, 2006
[UML03a]Softwaredevelopment mit UML2; Born, M.; Holz,E.; Kath, O.;Addison-Wesley, 2003
[UML03b]UML konzentriert; Fowler, M.; Addison-Wesley, 2003
[UML05] The Unified Modeling Language User Guide; Booch, G., Rumbaugh, J., Jacobson, I., Addison-Wesley, 2005
[UML06] UML2.0, Das umfassende Handbuch; Kecher, Christoph; Galileo-Press, 2006

TOP