SlideShare a Scribd company logo
1 of 66
Download to read offline
Modeling for fun and profit
© Anyware Technologies-All Right Reserved




                                                      David Sciamma
                                                Eclipse Technical Manager
                                                  Anyware Technologies
                                                      May 25th, 2009
Anyware Technologies


                                            Identity                                                   M2MSolutions
                                             Founded in 2000                                             Central management of remote
                                                                                                       equipment based on a generic, secure
                                             Headquarters: Toulouse (France)
                                                                                                       and distributed Machine-to-Machine
                                             Regional subsidies: Paris (France),                       services platform
                                             Munich (Germany), RTP (US)
                                             80 people including a team of 65
                                             experts.
                                             Became Wavecom subsidiary in Q1
© Anyware Technologies-All Right Reserved




                                             2008 and Sierra Wireless/Wavecom
                                             group Subsidiary in March 2009
                                                                                                       Open Source Solutions and Services
                                             Website: www.anyware-tech.com                               Expertise, consulting and numerous
                                                                                                       services around open source kernels
                                                                                                       (Eclipse, Apache, …), web technologies
                                                                                                       and IT integration.




                                                                Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Anyware Technologies OS3

                                            Designer of Software Solutions

                                             ► Relevant and customized solutions
                                                 − which optimizes the performance of business processes
                                                 − which benefits of the best of the technologies
                                                 − Which are built from open sources kernels and components

                                             ► Our specificity
                                                 − An unique expertise around relevant technologies (Java, XML, XSL-T, Ajax,
© Anyware Technologies-All Right Reserved




                                                   JavaScript, JCR, RCP, CDO, EMF, GMF, GEF, ...)
                                                 − A company deeply involved in the most famous open source communities
                                                 − An industrial and agile approach to warranty costs, delays and quality.




                                             ► Keeping the experience brought by projects in order to develop products
                                               or new open source components

                                                              Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
© Anyware Technologies-All Right Reserved




                                            Why ? How ?
                                                          Modeling for fun and profit
Issue

                                                                  • Small development team
                                                                  • Fast prototyping
                                            Constraints           • Recurring kinds of
                                                                    application
© Anyware Technologies-All Right Reserved




                                                                  • Model Driven Approach
                                                                  • Meta Modeling
                                             Solution             • Generation and generic
                                                                    framework

                                                     Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Recurring kind of application

                                                                 • Create the same kind of
                                                                   application for different
                                             Need                  domains
                                                                 • Ex: a graphical editor, a form
© Anyware Technologies-All Right Reserved




                                                                 • Pragmatic Model Driven
                                                                 • Progressive commoditization
                                            Solution             • Progressive improvement of
                                                                   the generator

                                                    Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Definition of a generator

                                            • Creation of the domain specific language (DSL)
                                               ► Ex: UML, Autosar, Petri Net… genealogy

                                            • Definition of the target
                                               ► Ex: graphical editor framework, web framework
© Anyware Technologies-All Right Reserved




                                            • Creation of a model describing this target
                                               ► Ex: graphical editor metamodel, CRUD application metamodel

                                            • Creation of the generator

                                            • Don’t try to generate everything !
                                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Definition of a generator
                                                         instantiate                                               UML, Autosar, PetriNet…
                                              Ecore                             DSL



                                            Generation   instantiate       Generation
                                                                                                                   Define the generation parameters
                                            metamodel                        model



                                                                           Generation                              Scripts: JET, xPand, Acceleo…
                                                                           templates                               implement the generation from
                                                                                                                   the generation model
© Anyware Technologies-All Right Reserved




                                                                           Generation
                                                                                                                   Execute the generation templates
                                                                            engine

                                                                                                                   Set of generated files:
                                                                           Generated                               compose the targeted application
                                                                           application

                                                          Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Creation of a generator

                                             Generation                                                                            Generated
                                                                                  Generator v1
                                            metamodel v1                                                                          application v1
                                                                        Improvements




                                             Generation                                                                            Generated
                                                                                  Generator v2
                                            metamodel v2                                                                          application v3
© Anyware Technologies-All Right Reserved




                                                                            Improvements




                                             Generation                                                                      Generated application
                                                                                 Generator vN
                                            metamodel vN                                                                             vN




                                                           Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
© Anyware Technologies-All Right Reserved




                                            Examples
                                                       Modeling for fun and profit
Complete modeling environment


                                                                  • Create a set of tools for a given
                                             Need                   modeling language
                                                                      • Ecore, UML, Autosar…
© Anyware Technologies-All Right Reserved




                                                                 • Generate tools from the
                                                                   metamodel
                                            Solution             • Allow to create homogeneous tools
                                                                 • Speed up integration of a new
                                                                   language


                                                    Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Concrete implementations

                                            • TOPCASED
                                               ► UML, AADL, SAM, SysML…

                                            • Autosar

                                            • CoFluent Studio
© Anyware Technologies-All Right Reserved




                                            • Ecore Tools




                                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
TOPCASED
                                                                                              DSL



                                            Tabbed Properties              Diagram                     Model navigator                 Context menu
© Anyware Technologies-All Right Reserved




                                                                Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Medany

                                                                 • Mobile application
                                                                 • Disconnected mode
                                             Need                • Synchronization with a server
                                                                 • Administration
                                                                 •…
© Anyware Technologies-All Right Reserved




                                                                 • Modeling environment to define your
                                                                   mobile application
                                            Solution             • Generation of applications using a
                                                                   common core



                                                    Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Medany
© Anyware Technologies-All Right Reserved




                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Medany

                                                                                     Medany metamodel




                                                                                         Medany model
© Anyware Technologies-All Right Reserved




                                                Mobile App                RCP                     Web App                     Web Admin    Synchro

                                                      OR                                               OR


                                            Android        eRCP                           Struts               GWT




                                                                  Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Concrete implementations

                                            • VNF

                                            • ONSil
© Anyware Technologies-All Right Reserved




                                                      Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
M2M Developer Suite


                                                                 • Ease embedded development
                                                                   (Machine-to-Machine)
                                             Need                • Define a structure for embedded
                                                                   applications
                                                                 • Accelerate creation fo M2M Solutions
© Anyware Technologies-All Right Reserved




                                                                 • Modeling environment
                                                                 • Component-oriented approach
                                            Solution             • Code generation
                                                                 • Round tripping


                                                    Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Concrete implementations

                                            • Home automation

                                            • Fleet Tracking
© Anyware Technologies-All Right Reserved




                                                          Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling for fun and profit
                                                Eclipse Modeling Project
© Anyware Technologies-All Right Reserved
Eclipse Modeling project

                                            • Created in March 2006

                                            • Provides a complete open source tool stack

                                            • Leader: IBM

                                            • Active members:
© Anyware Technologies-All Right Reserved




                                               ► Anyware Technologies
                                               ► Itemis
                                               ► Obeo
                                               ► Borland
                                               ► Embarcadero Technologies
                                               ► Lots of individuals
                                               ►…

                                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling Projects


                                            EMF           EMFT           GMF              M2M                M2T                TMF             MDT    GMT
                                               EMF         Ecore Tools                           ATL              xPand               xText      UML    …
                                              Model           EMF                            Procedural
                                                                                                                 Acceleo                         OCL
                                            Validation      Compare                             QVT

                                               Model                                        Declarative
                                            Transaction
                                                           EMF Search
                                                                                               QVT
                                                                                                                    JET                           …
© Anyware Technologies-All Right Reserved




                                              Model
                                              Query            …
                                               CDO


                                              Teneo


                                                …
                                                                         Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling Projects

                                            Framework to use models

                                                            incubation

                                             EMF            EMFT            GMF              M2M                M2T                TMF             MDT    GMT
                                                 EMF          Ecore Tools                           ATL              xPand               xText      UML    …
                                                Model            EMF                            Procedural
                                                                                                                    Acceleo                         OCL
                                              Validation       Compare                             QVT

                                                 Model                                         Declarative
                                              Transaction
                                                              EMF Search
                                                                                                  QVT
                                                                                                                       JET                           …
© Anyware Technologies-All Right Reserved




                                                Model
                                                Query             …
                                                 CDO


                                                Teneo


                                                  …
                                                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling Projects

                                                 Framework to create graphical editors


                                            EMF           EMFT           GMF              M2M                M2T                TMF             MDT    GMT
                                               EMF         Ecore Tools                           ATL              xPand               xText      UML    …
                                              Model           EMF                            Procedural
                                                                                                                 Acceleo                         OCL
                                            Validation      Compare                             QVT

                                               Model                                        Declarative
                                            Transaction
                                                           EMF Search
                                                                                               QVT
                                                                                                                    JET                           …
© Anyware Technologies-All Right Reserved




                                              Model
                                              Query            …
                                               CDO


                                              Teneo


                                                …
                                                                         Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling Projects

                                                          Framework to create transformations between models


                                            EMF           EMFT           GMF              M2M                M2T                TMF             MDT    GMT
                                               EMF         Ecore Tools                           ATL              xPand               xText      UML    …
                                              Model           EMF                            Procedural
                                                                                                                 Acceleo                         OCL
                                            Validation      Compare                             QVT

                                               Model                                        Declarative
                                            Transaction
                                                           EMF Search
                                                                                               QVT
                                                                                                                    JET                           …
© Anyware Technologies-All Right Reserved




                                              Model
                                              Query            …
                                               CDO


                                              Teneo


                                                …
                                                                         Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling Projects

                                                                                Framework to generate text from models


                                            EMF           EMFT           GMF              M2M                M2T                TMF             MDT    GMT
                                               EMF         Ecore Tools                           ATL              xPand               xText      UML    …
                                              Model           EMF                            Procedural
                                                                                                                 Acceleo                         OCL
                                            Validation      Compare                             QVT

                                               Model                                        Declarative
                                            Transaction
                                                           EMF Search
                                                                                               QVT
                                                                                                                    JET                           …
© Anyware Technologies-All Right Reserved




                                              Model
                                              Query            …
                                               CDO


                                              Teneo


                                                …
                                                                         Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling Projects

                                                                                                Framework to generate model from text


                                            EMF           EMFT           GMF              M2M                M2T                TMF             MDT    GMT
                                               EMF         Ecore Tools                           ATL              xPand               xText      UML    …
                                              Model           EMF                            Procedural
                                                                                                                 Acceleo                         OCL
                                            Validation      Compare                             QVT

                                               Model                                        Declarative
                                            Transaction
                                                           EMF Search
                                                                                               QVT
                                                                                                                    JET                           …
© Anyware Technologies-All Right Reserved




                                              Model
                                              Query            …
                                               CDO


                                              Teneo


                                                …
                                                                         Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling Projects

                                                                                                  Reference implementations of OMG standards


                                            EMF           EMFT           GMF              M2M                M2T                TMF             MDT    GMT
                                               EMF         Ecore Tools                           ATL              xPand               xText      UML    …
                                              Model           EMF                            Procedural
                                                                                                                 Acceleo                         OCL
                                            Validation      Compare                             QVT

                                               Model                                        Declarative
                                            Transaction
                                                           EMF Search
                                                                                               QVT
                                                                                                                    JET                           …
© Anyware Technologies-All Right Reserved




                                              Model
                                              Query            …
                                               CDO


                                              Teneo


                                                …
                                                                         Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling Projects

                                                                                                                                                Research projects


                                            EMF           EMFT           GMF              M2M                M2T                TMF             MDT     GMT
                                               EMF         Ecore Tools                           ATL              xPand               xText       UML       …
                                              Model           EMF                            Procedural
                                                                                                                 Acceleo                          OCL
                                            Validation      Compare                             QVT

                                               Model                                        Declarative
                                            Transaction
                                                           EMF Search
                                                                                               QVT
                                                                                                                    JET                           …
© Anyware Technologies-All Right Reserved




                                              Model
                                              Query            …
                                               CDO


                                              Teneo


                                                …
                                                                         Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling Projects (Focus)


                                            EMF           EMFT           GMF              M2M                M2T                TMF             MDT    GMT
                                               EMF         Ecore Tools                           ATL              xPand               xText      UML    …
                                              Model           EMF                            Procedural
                                                                                                                 Acceleo                         OCL
                                            Validation      Compare                             QVT

                                               Model                                        Declarative
                                            Transaction
                                                           EMF Search
                                                                                               QVT
                                                                                                                    JET                           …
© Anyware Technologies-All Right Reserved




                                              Model
                                              Query            …
                                               CDO


                                              Teneo


                                                …
                                                                         Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling for fun and profit
                                             Eclipse Modeling Framework - EMF
© Anyware Technologies-All Right Reserved
EMF

                                            • Framework used to create tools based on a model

                                            • Ecore is used to create meta models.

                                            • Ecore provides :
                                               ► Simple and reverse references
© Anyware Technologies-All Right Reserved




                                               ► Composition

                                               ► Types

                                            • Close to UML class diagram.


                                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
EMF

                                            • EMF bounds the modeling and development worlds :
                                               ► It transforms models into java

                                               ► Allows to use the model in your application

                                               ► Gives tools to increase development productivity

                                            • Open-source
© Anyware Technologies-All Right Reserved




                                            • Strong and tested technology (used since 2002)




                                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
EMF Generation



                                                                                  Ecore Model




                                                                                     GenModel
© Anyware Technologies-All Right Reserved




                                                                   Display and
                                                                                                    Model tree
                                            Java Model              edit basic                                                  Tests code
                                                                                                      editor
                                                                    functions



                                                         Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling for fun and profit
                                            Graphical Modeling Framework - GMF
© Anyware Technologies-All Right Reserved
GMF

                                            • Ease the development of graphical editor for models

                                            • Runtime
                                               ► Framework with a lot of common features for graphical model
                                                 editors

                                            • Generator
© Anyware Technologies-All Right Reserved




                                               ► Tool to generate a graphical editor from a model and the editor
                                                 definition




                                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
GMF
© Anyware Technologies-All Right Reserved




                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
GMF
© Anyware Technologies-All Right Reserved




                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling for fun and profit
                                                 Model to Text - xPand
© Anyware Technologies-All Right Reserved
xPand

                                            • Designed specifically for text generation
                                               ► OO template engine supporting template polymorphism

                                               ► Template Varibility using AOP

                                               ► Editor with Code Completion and Syntax

                                               ► Highlighting
© Anyware Technologies-All Right Reserved




                                            • Debugger




                                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
xPand

                                            • Example of template:
                                                  «IMPORT model»
                                                  «DEFINE file FOR SourceComponentClass»
                                                  «FILE project.name.toLowerCase() + "/" + name + ".java"-»
                                                  package «project.name.toLowerCase()»;

                                                  public class «name» extends ComponentClass {

                                                  «IF methods.select(m | m.kind.toString() == "EVENT").size > 0»
                                                       public void receiveEvent(int inputEventMethod, Object value) {
© Anyware Technologies-All Right Reserved




                                                  «FOREACH methods.select(m | m.kind.toString() == "EVENT") AS m-»
                                                            // TODO handle Event: " + «m.name.toUpperCase()»:
                                                  «ENDFOREACH-»
                                                       }
                                                  «ENDIF»
                                                  }
                                                  «ENDFILE»
                                                  «ENDDEFINE»




                                                             Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
How to integrate all the components ?
                                                  The M2M Developer Suite Use case
© Anyware Technologies-All Right Reserved
Requirements

                                            • Embedded development (Machine-to-Machine)

                                            • Modeling environment

                                            • Component-oriented approach

                                                  Model     Code                Binary              Target             Execution   Debug
© Anyware Technologies-All Right Reserved




                                                                                                    What is Machine-to-Machine (M2M)

                                                                                          M2M refers to data communication between machines.




                                                          Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Requirements

                                            • Users profiles
                                               ► Newbies

                                               ► Solution providers

                                            • Multiple targets
                                               ► Wavecom devices
© Anyware Technologies-All Right Reserved




                                               ► Embedded Linux

                                               ►…

                                               ► Lego Mindstorms


                                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Features

                                                                                    Editors
                                                     Validation                                                Navigator




                                                                                   Model


                                                                                                                          Editor
© Anyware Technologies-All Right Reserved




                                              Compilation                          Code
                                                                                                                       Navigator




                                            Communication                         Target                                Navigator




                                                        Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Features




                                                                       Model
© Anyware Technologies-All Right Reserved




                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling
                                                                                                                                        Model

                                            • EMF - Eclipse Modeling Framework
                                               ► The model is the pillar of the tool

                                               ► Used to model what is an embedded project

                                               ► Benefits from EMF
                                                   − Notifications
© Anyware Technologies-All Right Reserved




                                                   − Serialization

                                                   − Reflective API

                                                   − … all the incredible EMF tools (GMF, Validation, xPand…)



                                                              Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Modeling
                                                                                                                      Model
© Anyware Technologies-All Right Reserved




                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Features


                                                                                                   Navigator




                                                                       Model
© Anyware Technologies-All Right Reserved




                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Navigator
                                                                                                                                            Navigator




                                            • Objectives                                                                            Model



                                               ► 1:1 Mapping between Project and Model

                                               ► Display informations in the model as project’s artefacts


                                            • Workspace integration
© Anyware Technologies-All Right Reserved




                                               ► EMF Transaction

                                                  − Global model repository

                                                  − Transactional Editing Domain



                                                             Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Navigator
                                                                                                                                            Navigator




                                            • Project Explorer                                                                      Model



                                               ► Displays model objects as the Project structure

                                               ► Based on Common Navigator Framework

                                                  − Extensible tree view

                                                  − Rather complex API
© Anyware Technologies-All Right Reserved




                                                  − But really powerful

                                                        Extension Points: org.eclipse.ui.navigator.*
                                                        Excellent tutorial: Building a Common Navigator based viewer

                                               ► We use an internal model to define the structure (nodes only
                                                 used to group or display informations)
                                                             Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Navigator
                                                                                                                                                            Navigator




                                            • Project Explorer                                                                                      Model



                                               ► Result



                                                          EMF Objects
                                                                                                                      Model contribution
© Anyware Technologies-All Right Reserved




                                                      Navigation nodes


                                                                                                                      CDT contribution




                                                                                                                      Default display (resources)




                                                                 Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Features

                                                                        Editors
                                                                                                   Navigator




                                                                       Model
© Anyware Technologies-All Right Reserved




                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Model edition
                                                                                                                                             Editors




                                            • Forms editors                                                                                  Model
                                                ► Forms + EMF + databinding
                                                       − Create UI
                                                   private void createContent(FormToolkit toolkit, Composite parent) {
                                                        Composite composite = toolkit.createComposite(parent, SWT.NONE);
                                                        GridDataFactory.fillDefaults().grab(true, false).applyTo(composite);
                                                        GridLayoutFactory.fillDefaults().numColumns(2).applyTo(composite);

                                                         toolkit.createLabel(composite, "Name:", SWT.NONE);
                                                         _textName = toolkit.createText(composite, "", SWT.BORDER);
© Anyware Technologies-All Right Reserved




                                                         GridDataFactory.fillDefaults().grab(true, false).applyTo(_textName);
                                                   }



                                                       − Bind UI to model
                                            private void bind() {
                                                 DataBindingContext bindingContext = new EMFDataBindingContext();
                                                 // -- Bind the Name
                                                 bindingContext.bindValue(SWTObservables.observeText(_textName, SWT.FocusOut),
                                                      EMFEditObservables.observeDetailValue(Realm.getDefault(), getEditingDomain(),
                                                      _myEObject, M2MPackage.eINSTANCE.getINamedElement_Name()), null, null);
                                            }
                                                                  Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Model edition
                                                                                                                                           Editors




                                            • Forms editors                                                                                Model


                                               ► Result
© Anyware Technologies-All Right Reserved




                                                          Available in PDE Incubator:
                                                          Forms EMF editor will be used to implement new PDE editors

                                                                Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Model edition
                                                                                                                                              Editors




                                            • Graphical Editor: GMF                                                                           Model


                                               ► Uses GMF generator to bootstrap

                                                                       GMF generation
                                                       Model
                                                                                       Generated                  Customization
                                                                                         editor
                                                                                                                                   Modified
© Anyware Technologies-All Right Reserved




                                                                                                                                    editor


                                               ► Heavy use of GMF Runtime




                                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Model edition
                                                                                                                                     Editors




                                            • Graphical Editor: GMF                                                                  Model


                                               ► Result
© Anyware Technologies-All Right Reserved




                                                          Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Features

                                                                           Editors
                                            Validation                                                Navigator




                                                                          Model
© Anyware Technologies-All Right Reserved




                                               Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Model validation
                                                                                                                                      Validation




                                                                                                                                                   Model
                                            • EMF Validation
                                               ► Extensible (needed for specific-target constraints)

                                               ► Constraints are registered using an extension point

                                                             Extension points: org.eclipse.emf.validation.*
© Anyware Technologies-All Right Reserved




                                               ► We use only the batch mode
                                                public IStatus validate (EObject model, IProgressMonitor monitor) {
                                                     IBatchValidator batchValidator = ModelValidationService.getInstance()
                                                                                  .newValidator(EvaluationMode.BATCH);
                                                     batchValidator.setIncludeLiveConstraints(true);
                                                     batchValidator.setReportSuccesses(false);
                                                     return batchValidator.validate(model, monitor);
                                                }



                                                               Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Model validation
                                                                                                                                  Validation




                                            ► Integrated in a builder                                                                          Model


                                                − Transparent and automatic (on save)

                                                − Uses Problem Markers

                                                − Coupled with quick fixes for a better user experience
© Anyware Technologies-All Right Reserved




                                                                             Validation decorators are based on
                                                                             markers generated by the Validation builder




                                                           Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Features

                                                                           Editors
                                            Validation                                                Navigator




                                                                          Model
© Anyware Technologies-All Right Reserved




                                                                          Code




                                               Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Code generation
                                                                                                                                    Model



                                            • xPand                                                                                 Code

                                              ► Example of template

                                                «IMPORT model»
                                                «DEFINE file FOR SourceComponentClass»
                                                «FILE project.name.toLowerCase() + "/" + name + ".java"-»
                                                package «project.name.toLowerCase()»;

                                                public class «name» extends ComponentClass {
© Anyware Technologies-All Right Reserved




                                                «IF methods.select(m | m.kind.toString() == "EVENT").size > 0»
                                                     public void receiveEvent(int inputEventMethod, Object value) {
                                                «FOREACH methods.select(m | m.kind.toString() == "EVENT") AS m-»
                                                          // TODO handle Event: " + «m.name.toUpperCase()»:
                                                «ENDFOREACH-»
                                                     }
                                                «ENDIF»
                                                }
                                                «ENDFILE»
                                                «ENDDEFINE»



                                                             Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Code generation
                                                                                                                                           Model



                                                • xPand                                                                                    Code

                                                   ► Call the xPand generator programmatically
                                            public void generate(final EObject object, IProgressMonitor monitor) throws CoreException {
                                                 Generator generator = new Generator();

                                                 // define the metamodel used in the template
                                                 MetaModel m2mMetamodel = new EmfMetaModel(M2MPackage.eINSTANCE);
                                                 generator.addMetaModel(m2mMetamodel);
                                                 // define the template
                                                 generator.setExpand("templates::SourceComponentClass::file FOR component");
© Anyware Technologies-All Right Reserved




                                                 // define the output folder
                                                 Outlet outlet = new Outlet("C:/myOutput/src");
                                                 generator.addOutlet(outlet);
                                                 // configure protected regions
                                                 generator.setPrSrcPaths("C:/myOutput/src");
                                                 generator.setPrDefaultExcludes(true);
                                                 // define the EObject input
                                                 WorkflowContextDefaultImpl ctx = new WorkflowContextDefaultImpl();
                                                 ctx.set("component", object);
                                                 // run the generator
                                                 generator.invoke(ctx, new ProgressMonitorAdapter(monitor), new IssuesImpl());
                                            }

                                                                    Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Code generation
                                                                                                                                   Model



                                            • Integrated in a builder                                                              Code

                                               ► Transparent and automatic (on save)

                                               ► Synchronization between model and code

                                               ► Incremental generation
© Anyware Technologies-All Right Reserved




                                                            Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Features

                                                                                     Editors
                                                     Validation                                                Navigator
                                                                                           Forms
                                                                        EMF Validation     GMF
                                                                                                              Project Explorer + CNF

                                                                                    Model

                                                                           xPand               AST
                                                                                                                          Editor
                                                                  CDT
© Anyware Technologies-All Right Reserved




                                              Compilation                            Code                      CDT + DLTK


                                                                                                                       Navigator



                                                                  TCF                                      RSE
                                            Communication                           Target                              Navigator




                                                        Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
Questions?
                                                  David Sciamma
                                            david.sciamma@anyware-tech.com
© Anyware Technologies-All Right Reserved

More Related Content

What's hot

Barrick simulation with mimic presentation
Barrick simulation with mimic presentationBarrick simulation with mimic presentation
Barrick simulation with mimic presentationMYNAH Technologies
 
Sourcing Trends: Challenges and Opportunities Facing Service Providers
Sourcing Trends: Challenges and Opportunities Facing Service ProvidersSourcing Trends: Challenges and Opportunities Facing Service Providers
Sourcing Trends: Challenges and Opportunities Facing Service ProvidersStanton Jones
 
JoramMQ Entreprise tools and services for the JORAM user, OW2con’12, Paris
JoramMQ Entreprise tools and services for the JORAM user, OW2con’12, ParisJoramMQ Entreprise tools and services for the JORAM user, OW2con’12, Paris
JoramMQ Entreprise tools and services for the JORAM user, OW2con’12, ParisOW2
 
Agile Developers Create Their Own Identity
Agile Developers Create Their Own IdentityAgile Developers Create Their Own Identity
Agile Developers Create Their Own IdentityNaresh Jain
 
AgileCE2011 holistic devployment
AgileCE2011 holistic devploymentAgileCE2011 holistic devployment
AgileCE2011 holistic devploymentPiotr Zolnierek
 
IMT Solutions - Overview of IMT
IMT Solutions - Overview of IMTIMT Solutions - Overview of IMT
IMT Solutions - Overview of IMTnamtvh
 

What's hot (7)

Barrick simulation with mimic presentation
Barrick simulation with mimic presentationBarrick simulation with mimic presentation
Barrick simulation with mimic presentation
 
Sourcing Trends: Challenges and Opportunities Facing Service Providers
Sourcing Trends: Challenges and Opportunities Facing Service ProvidersSourcing Trends: Challenges and Opportunities Facing Service Providers
Sourcing Trends: Challenges and Opportunities Facing Service Providers
 
Technology
TechnologyTechnology
Technology
 
JoramMQ Entreprise tools and services for the JORAM user, OW2con’12, Paris
JoramMQ Entreprise tools and services for the JORAM user, OW2con’12, ParisJoramMQ Entreprise tools and services for the JORAM user, OW2con’12, Paris
JoramMQ Entreprise tools and services for the JORAM user, OW2con’12, Paris
 
Agile Developers Create Their Own Identity
Agile Developers Create Their Own IdentityAgile Developers Create Their Own Identity
Agile Developers Create Their Own Identity
 
AgileCE2011 holistic devployment
AgileCE2011 holistic devploymentAgileCE2011 holistic devployment
AgileCE2011 holistic devployment
 
IMT Solutions - Overview of IMT
IMT Solutions - Overview of IMTIMT Solutions - Overview of IMT
IMT Solutions - Overview of IMT
 

Viewers also liked

Introduction aux Clients Riches
Introduction aux Clients RichesIntroduction aux Clients Riches
Introduction aux Clients RichesDavid Sciamma
 
Technologies pour Clients Riches
Technologies pour Clients RichesTechnologies pour Clients Riches
Technologies pour Clients RichesDavid Sciamma
 
Enabling the mobile Web for a Dojo component
Enabling the mobile Web for a Dojo componentEnabling the mobile Web for a Dojo component
Enabling the mobile Web for a Dojo componentcjolif
 
Modeling for Fun and Profit
Modeling for Fun and ProfitModeling for Fun and Profit
Modeling for Fun and ProfitDavid Sciamma
 

Viewers also liked (7)

sourire
souriresourire
sourire
 
Introduction aux Clients Riches
Introduction aux Clients RichesIntroduction aux Clients Riches
Introduction aux Clients Riches
 
Les Flors
Les FlorsLes Flors
Les Flors
 
Technologies pour Clients Riches
Technologies pour Clients RichesTechnologies pour Clients Riches
Technologies pour Clients Riches
 
Le Leghe Speciali Di Magnesio Convegno Modena Fr 14102009
Le Leghe Speciali Di Magnesio Convegno Modena Fr 14102009Le Leghe Speciali Di Magnesio Convegno Modena Fr 14102009
Le Leghe Speciali Di Magnesio Convegno Modena Fr 14102009
 
Enabling the mobile Web for a Dojo component
Enabling the mobile Web for a Dojo componentEnabling the mobile Web for a Dojo component
Enabling the mobile Web for a Dojo component
 
Modeling for Fun and Profit
Modeling for Fun and ProfitModeling for Fun and Profit
Modeling for Fun and Profit
 

Similar to Modeling for Fun and Profit

Aspects of modern APM solutions
Aspects of modern APM solutionsAspects of modern APM solutions
Aspects of modern APM solutionsFabian Lange
 
HVH Introduction Presentation
HVH Introduction PresentationHVH Introduction Presentation
HVH Introduction Presentationihickman
 
Atdd In Practice (Agile Tour 2010 Qingdao)
Atdd In Practice (Agile Tour 2010 Qingdao)Atdd In Practice (Agile Tour 2010 Qingdao)
Atdd In Practice (Agile Tour 2010 Qingdao)Yi Xu
 
Aspects of Modern APM Solutions
Aspects of Modern APM SolutionsAspects of Modern APM Solutions
Aspects of Modern APM Solutionsnlwebperf
 
AIMMS product presentation
AIMMS product presentationAIMMS product presentation
AIMMS product presentationjhjsmits
 
Pragmatic Model Driven Development In Java Using Smart Use Cases
Pragmatic Model Driven Development In Java Using Smart Use CasesPragmatic Model Driven Development In Java Using Smart Use Cases
Pragmatic Model Driven Development In Java Using Smart Use CasesRody Middelkoop
 
Oracle - Soluções do device ao Datacenter
Oracle - Soluções do device ao DatacenterOracle - Soluções do device ao Datacenter
Oracle - Soluções do device ao DatacenterGeneXus
 
Digital Security by Design: Imperas’ Interests - Simon Davidmann, Imperas Sof...
Digital Security by Design: Imperas’ Interests - Simon Davidmann, Imperas Sof...Digital Security by Design: Imperas’ Interests - Simon Davidmann, Imperas Sof...
Digital Security by Design: Imperas’ Interests - Simon Davidmann, Imperas Sof...KTN
 
Imaginea_CloudComputing_Services
Imaginea_CloudComputing_ServicesImaginea_CloudComputing_Services
Imaginea_CloudComputing_ServicesImaginea
 
Wireless Explorer Standard Presentation
Wireless Explorer Standard PresentationWireless Explorer Standard Presentation
Wireless Explorer Standard PresentationDan Jee
 
Aspirea sales presentation
Aspirea sales presentationAspirea sales presentation
Aspirea sales presentationMayank Singh
 
Technosoft modeling and simulation 2006 03-27 from craig
Technosoft modeling and simulation  2006 03-27 from craigTechnosoft modeling and simulation  2006 03-27 from craig
Technosoft modeling and simulation 2006 03-27 from craigkeyven
 
Omnikron Services 2009
Omnikron Services 2009Omnikron Services 2009
Omnikron Services 2009Robin Borough
 
Best practices for Vblock Monitoring with FusionStorm and Nimsoft
Best practices for Vblock Monitoring with FusionStorm and NimsoftBest practices for Vblock Monitoring with FusionStorm and Nimsoft
Best practices for Vblock Monitoring with FusionStorm and NimsoftCA Nimsoft
 

Similar to Modeling for Fun and Profit (20)

Aspects of modern APM solutions
Aspects of modern APM solutionsAspects of modern APM solutions
Aspects of modern APM solutions
 
HVH Introduction Presentation
HVH Introduction PresentationHVH Introduction Presentation
HVH Introduction Presentation
 
Atdd In Practice (Agile Tour 2010 Qingdao)
Atdd In Practice (Agile Tour 2010 Qingdao)Atdd In Practice (Agile Tour 2010 Qingdao)
Atdd In Practice (Agile Tour 2010 Qingdao)
 
Aspects of Modern APM Solutions
Aspects of Modern APM SolutionsAspects of Modern APM Solutions
Aspects of Modern APM Solutions
 
AIMMS product presentation
AIMMS product presentationAIMMS product presentation
AIMMS product presentation
 
Understanding Mda
Understanding MdaUnderstanding Mda
Understanding Mda
 
Pragmatic Model Driven Development In Java Using Smart Use Cases
Pragmatic Model Driven Development In Java Using Smart Use CasesPragmatic Model Driven Development In Java Using Smart Use Cases
Pragmatic Model Driven Development In Java Using Smart Use Cases
 
Oracle - Soluções do device ao Datacenter
Oracle - Soluções do device ao DatacenterOracle - Soluções do device ao Datacenter
Oracle - Soluções do device ao Datacenter
 
Webinar on Enterprise Mobility Strategy
Webinar on Enterprise Mobility StrategyWebinar on Enterprise Mobility Strategy
Webinar on Enterprise Mobility Strategy
 
Jobs in the Cloud
 Jobs in the Cloud Jobs in the Cloud
Jobs in the Cloud
 
Varnaaz final
Varnaaz finalVarnaaz final
Varnaaz final
 
Digital Security by Design: Imperas’ Interests - Simon Davidmann, Imperas Sof...
Digital Security by Design: Imperas’ Interests - Simon Davidmann, Imperas Sof...Digital Security by Design: Imperas’ Interests - Simon Davidmann, Imperas Sof...
Digital Security by Design: Imperas’ Interests - Simon Davidmann, Imperas Sof...
 
Imaginea_CloudComputing_Services
Imaginea_CloudComputing_ServicesImaginea_CloudComputing_Services
Imaginea_CloudComputing_Services
 
Wireless Explorer Standard Presentation
Wireless Explorer Standard PresentationWireless Explorer Standard Presentation
Wireless Explorer Standard Presentation
 
Aspirea sales presentation
Aspirea sales presentationAspirea sales presentation
Aspirea sales presentation
 
TejaServices 2.0 Model
TejaServices 2.0 ModelTejaServices 2.0 Model
TejaServices 2.0 Model
 
Technosoft modeling and simulation 2006 03-27 from craig
Technosoft modeling and simulation  2006 03-27 from craigTechnosoft modeling and simulation  2006 03-27 from craig
Technosoft modeling and simulation 2006 03-27 from craig
 
Managed Services Overview
Managed Services OverviewManaged Services Overview
Managed Services Overview
 
Omnikron Services 2009
Omnikron Services 2009Omnikron Services 2009
Omnikron Services 2009
 
Best practices for Vblock Monitoring with FusionStorm and Nimsoft
Best practices for Vblock Monitoring with FusionStorm and NimsoftBest practices for Vblock Monitoring with FusionStorm and Nimsoft
Best practices for Vblock Monitoring with FusionStorm and Nimsoft
 

Recently uploaded

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 

Recently uploaded (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Modeling for Fun and Profit

  • 1. Modeling for fun and profit © Anyware Technologies-All Right Reserved David Sciamma Eclipse Technical Manager Anyware Technologies May 25th, 2009
  • 2. Anyware Technologies Identity M2MSolutions Founded in 2000 Central management of remote equipment based on a generic, secure Headquarters: Toulouse (France) and distributed Machine-to-Machine Regional subsidies: Paris (France), services platform Munich (Germany), RTP (US) 80 people including a team of 65 experts. Became Wavecom subsidiary in Q1 © Anyware Technologies-All Right Reserved 2008 and Sierra Wireless/Wavecom group Subsidiary in March 2009 Open Source Solutions and Services Website: www.anyware-tech.com Expertise, consulting and numerous services around open source kernels (Eclipse, Apache, …), web technologies and IT integration. Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 3. Anyware Technologies OS3 Designer of Software Solutions ► Relevant and customized solutions − which optimizes the performance of business processes − which benefits of the best of the technologies − Which are built from open sources kernels and components ► Our specificity − An unique expertise around relevant technologies (Java, XML, XSL-T, Ajax, © Anyware Technologies-All Right Reserved JavaScript, JCR, RCP, CDO, EMF, GMF, GEF, ...) − A company deeply involved in the most famous open source communities − An industrial and agile approach to warranty costs, delays and quality. ► Keeping the experience brought by projects in order to develop products or new open source components Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 4. © Anyware Technologies-All Right Reserved Why ? How ? Modeling for fun and profit
  • 5. Issue • Small development team • Fast prototyping Constraints • Recurring kinds of application © Anyware Technologies-All Right Reserved • Model Driven Approach • Meta Modeling Solution • Generation and generic framework Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 6. Recurring kind of application • Create the same kind of application for different Need domains • Ex: a graphical editor, a form © Anyware Technologies-All Right Reserved • Pragmatic Model Driven • Progressive commoditization Solution • Progressive improvement of the generator Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 7. Definition of a generator • Creation of the domain specific language (DSL) ► Ex: UML, Autosar, Petri Net… genealogy • Definition of the target ► Ex: graphical editor framework, web framework © Anyware Technologies-All Right Reserved • Creation of a model describing this target ► Ex: graphical editor metamodel, CRUD application metamodel • Creation of the generator • Don’t try to generate everything ! Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 8. Definition of a generator instantiate UML, Autosar, PetriNet… Ecore DSL Generation instantiate Generation Define the generation parameters metamodel model Generation Scripts: JET, xPand, Acceleo… templates implement the generation from the generation model © Anyware Technologies-All Right Reserved Generation Execute the generation templates engine Set of generated files: Generated compose the targeted application application Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 9. Creation of a generator Generation Generated Generator v1 metamodel v1 application v1 Improvements Generation Generated Generator v2 metamodel v2 application v3 © Anyware Technologies-All Right Reserved Improvements Generation Generated application Generator vN metamodel vN vN Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 10. © Anyware Technologies-All Right Reserved Examples Modeling for fun and profit
  • 11. Complete modeling environment • Create a set of tools for a given Need modeling language • Ecore, UML, Autosar… © Anyware Technologies-All Right Reserved • Generate tools from the metamodel Solution • Allow to create homogeneous tools • Speed up integration of a new language Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 12. Concrete implementations • TOPCASED ► UML, AADL, SAM, SysML… • Autosar • CoFluent Studio © Anyware Technologies-All Right Reserved • Ecore Tools Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 13. TOPCASED DSL Tabbed Properties Diagram Model navigator Context menu © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 14. Medany • Mobile application • Disconnected mode Need • Synchronization with a server • Administration •… © Anyware Technologies-All Right Reserved • Modeling environment to define your mobile application Solution • Generation of applications using a common core Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 15. Medany © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 16. Medany Medany metamodel Medany model © Anyware Technologies-All Right Reserved Mobile App RCP Web App Web Admin Synchro OR OR Android eRCP Struts GWT Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 17. Concrete implementations • VNF • ONSil © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 18. M2M Developer Suite • Ease embedded development (Machine-to-Machine) Need • Define a structure for embedded applications • Accelerate creation fo M2M Solutions © Anyware Technologies-All Right Reserved • Modeling environment • Component-oriented approach Solution • Code generation • Round tripping Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 19. Concrete implementations • Home automation • Fleet Tracking © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 20. Modeling for fun and profit Eclipse Modeling Project © Anyware Technologies-All Right Reserved
  • 21. Eclipse Modeling project • Created in March 2006 • Provides a complete open source tool stack • Leader: IBM • Active members: © Anyware Technologies-All Right Reserved ► Anyware Technologies ► Itemis ► Obeo ► Borland ► Embarcadero Technologies ► Lots of individuals ►… Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 22. Modeling Projects EMF EMFT GMF M2M M2T TMF MDT GMT EMF Ecore Tools ATL xPand xText UML … Model EMF Procedural Acceleo OCL Validation Compare QVT Model Declarative Transaction EMF Search QVT JET … © Anyware Technologies-All Right Reserved Model Query … CDO Teneo … Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 23. Modeling Projects Framework to use models incubation EMF EMFT GMF M2M M2T TMF MDT GMT EMF Ecore Tools ATL xPand xText UML … Model EMF Procedural Acceleo OCL Validation Compare QVT Model Declarative Transaction EMF Search QVT JET … © Anyware Technologies-All Right Reserved Model Query … CDO Teneo … Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 24. Modeling Projects Framework to create graphical editors EMF EMFT GMF M2M M2T TMF MDT GMT EMF Ecore Tools ATL xPand xText UML … Model EMF Procedural Acceleo OCL Validation Compare QVT Model Declarative Transaction EMF Search QVT JET … © Anyware Technologies-All Right Reserved Model Query … CDO Teneo … Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 25. Modeling Projects Framework to create transformations between models EMF EMFT GMF M2M M2T TMF MDT GMT EMF Ecore Tools ATL xPand xText UML … Model EMF Procedural Acceleo OCL Validation Compare QVT Model Declarative Transaction EMF Search QVT JET … © Anyware Technologies-All Right Reserved Model Query … CDO Teneo … Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 26. Modeling Projects Framework to generate text from models EMF EMFT GMF M2M M2T TMF MDT GMT EMF Ecore Tools ATL xPand xText UML … Model EMF Procedural Acceleo OCL Validation Compare QVT Model Declarative Transaction EMF Search QVT JET … © Anyware Technologies-All Right Reserved Model Query … CDO Teneo … Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 27. Modeling Projects Framework to generate model from text EMF EMFT GMF M2M M2T TMF MDT GMT EMF Ecore Tools ATL xPand xText UML … Model EMF Procedural Acceleo OCL Validation Compare QVT Model Declarative Transaction EMF Search QVT JET … © Anyware Technologies-All Right Reserved Model Query … CDO Teneo … Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 28. Modeling Projects Reference implementations of OMG standards EMF EMFT GMF M2M M2T TMF MDT GMT EMF Ecore Tools ATL xPand xText UML … Model EMF Procedural Acceleo OCL Validation Compare QVT Model Declarative Transaction EMF Search QVT JET … © Anyware Technologies-All Right Reserved Model Query … CDO Teneo … Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 29. Modeling Projects Research projects EMF EMFT GMF M2M M2T TMF MDT GMT EMF Ecore Tools ATL xPand xText UML … Model EMF Procedural Acceleo OCL Validation Compare QVT Model Declarative Transaction EMF Search QVT JET … © Anyware Technologies-All Right Reserved Model Query … CDO Teneo … Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 30. Modeling Projects (Focus) EMF EMFT GMF M2M M2T TMF MDT GMT EMF Ecore Tools ATL xPand xText UML … Model EMF Procedural Acceleo OCL Validation Compare QVT Model Declarative Transaction EMF Search QVT JET … © Anyware Technologies-All Right Reserved Model Query … CDO Teneo … Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 31. Modeling for fun and profit Eclipse Modeling Framework - EMF © Anyware Technologies-All Right Reserved
  • 32. EMF • Framework used to create tools based on a model • Ecore is used to create meta models. • Ecore provides : ► Simple and reverse references © Anyware Technologies-All Right Reserved ► Composition ► Types • Close to UML class diagram. Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 33. EMF • EMF bounds the modeling and development worlds : ► It transforms models into java ► Allows to use the model in your application ► Gives tools to increase development productivity • Open-source © Anyware Technologies-All Right Reserved • Strong and tested technology (used since 2002) Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 34. EMF Generation Ecore Model GenModel © Anyware Technologies-All Right Reserved Display and Model tree Java Model edit basic Tests code editor functions Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 35. Modeling for fun and profit Graphical Modeling Framework - GMF © Anyware Technologies-All Right Reserved
  • 36. GMF • Ease the development of graphical editor for models • Runtime ► Framework with a lot of common features for graphical model editors • Generator © Anyware Technologies-All Right Reserved ► Tool to generate a graphical editor from a model and the editor definition Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 37. GMF © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 38. GMF © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 39. Modeling for fun and profit Model to Text - xPand © Anyware Technologies-All Right Reserved
  • 40. xPand • Designed specifically for text generation ► OO template engine supporting template polymorphism ► Template Varibility using AOP ► Editor with Code Completion and Syntax ► Highlighting © Anyware Technologies-All Right Reserved • Debugger Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 41. xPand • Example of template: «IMPORT model» «DEFINE file FOR SourceComponentClass» «FILE project.name.toLowerCase() + "/" + name + ".java"-» package «project.name.toLowerCase()»; public class «name» extends ComponentClass { «IF methods.select(m | m.kind.toString() == "EVENT").size > 0» public void receiveEvent(int inputEventMethod, Object value) { © Anyware Technologies-All Right Reserved «FOREACH methods.select(m | m.kind.toString() == "EVENT") AS m-» // TODO handle Event: " + «m.name.toUpperCase()»: «ENDFOREACH-» } «ENDIF» } «ENDFILE» «ENDDEFINE» Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 42. How to integrate all the components ? The M2M Developer Suite Use case © Anyware Technologies-All Right Reserved
  • 43. Requirements • Embedded development (Machine-to-Machine) • Modeling environment • Component-oriented approach Model Code Binary Target Execution Debug © Anyware Technologies-All Right Reserved What is Machine-to-Machine (M2M) M2M refers to data communication between machines. Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 44. Requirements • Users profiles ► Newbies ► Solution providers • Multiple targets ► Wavecom devices © Anyware Technologies-All Right Reserved ► Embedded Linux ►… ► Lego Mindstorms Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 45. Features Editors Validation Navigator Model Editor © Anyware Technologies-All Right Reserved Compilation Code Navigator Communication Target Navigator Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 46. Features Model © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 47. Modeling Model • EMF - Eclipse Modeling Framework ► The model is the pillar of the tool ► Used to model what is an embedded project ► Benefits from EMF − Notifications © Anyware Technologies-All Right Reserved − Serialization − Reflective API − … all the incredible EMF tools (GMF, Validation, xPand…) Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 48. Modeling Model © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 49. Features Navigator Model © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 50. Navigator Navigator • Objectives Model ► 1:1 Mapping between Project and Model ► Display informations in the model as project’s artefacts • Workspace integration © Anyware Technologies-All Right Reserved ► EMF Transaction − Global model repository − Transactional Editing Domain Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 51. Navigator Navigator • Project Explorer Model ► Displays model objects as the Project structure ► Based on Common Navigator Framework − Extensible tree view − Rather complex API © Anyware Technologies-All Right Reserved − But really powerful Extension Points: org.eclipse.ui.navigator.* Excellent tutorial: Building a Common Navigator based viewer ► We use an internal model to define the structure (nodes only used to group or display informations) Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 52. Navigator Navigator • Project Explorer Model ► Result EMF Objects Model contribution © Anyware Technologies-All Right Reserved Navigation nodes CDT contribution Default display (resources) Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 53. Features Editors Navigator Model © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 54. Model edition Editors • Forms editors Model ► Forms + EMF + databinding − Create UI private void createContent(FormToolkit toolkit, Composite parent) { Composite composite = toolkit.createComposite(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).applyTo(composite); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(composite); toolkit.createLabel(composite, "Name:", SWT.NONE); _textName = toolkit.createText(composite, "", SWT.BORDER); © Anyware Technologies-All Right Reserved GridDataFactory.fillDefaults().grab(true, false).applyTo(_textName); } − Bind UI to model private void bind() { DataBindingContext bindingContext = new EMFDataBindingContext(); // -- Bind the Name bindingContext.bindValue(SWTObservables.observeText(_textName, SWT.FocusOut), EMFEditObservables.observeDetailValue(Realm.getDefault(), getEditingDomain(), _myEObject, M2MPackage.eINSTANCE.getINamedElement_Name()), null, null); } Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 55. Model edition Editors • Forms editors Model ► Result © Anyware Technologies-All Right Reserved Available in PDE Incubator: Forms EMF editor will be used to implement new PDE editors Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 56. Model edition Editors • Graphical Editor: GMF Model ► Uses GMF generator to bootstrap GMF generation Model Generated Customization editor Modified © Anyware Technologies-All Right Reserved editor ► Heavy use of GMF Runtime Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 57. Model edition Editors • Graphical Editor: GMF Model ► Result © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 58. Features Editors Validation Navigator Model © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 59. Model validation Validation Model • EMF Validation ► Extensible (needed for specific-target constraints) ► Constraints are registered using an extension point Extension points: org.eclipse.emf.validation.* © Anyware Technologies-All Right Reserved ► We use only the batch mode public IStatus validate (EObject model, IProgressMonitor monitor) { IBatchValidator batchValidator = ModelValidationService.getInstance() .newValidator(EvaluationMode.BATCH); batchValidator.setIncludeLiveConstraints(true); batchValidator.setReportSuccesses(false); return batchValidator.validate(model, monitor); } Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 60. Model validation Validation ► Integrated in a builder Model − Transparent and automatic (on save) − Uses Problem Markers − Coupled with quick fixes for a better user experience © Anyware Technologies-All Right Reserved Validation decorators are based on markers generated by the Validation builder Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 61. Features Editors Validation Navigator Model © Anyware Technologies-All Right Reserved Code Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 62. Code generation Model • xPand Code ► Example of template «IMPORT model» «DEFINE file FOR SourceComponentClass» «FILE project.name.toLowerCase() + "/" + name + ".java"-» package «project.name.toLowerCase()»; public class «name» extends ComponentClass { © Anyware Technologies-All Right Reserved «IF methods.select(m | m.kind.toString() == "EVENT").size > 0» public void receiveEvent(int inputEventMethod, Object value) { «FOREACH methods.select(m | m.kind.toString() == "EVENT") AS m-» // TODO handle Event: " + «m.name.toUpperCase()»: «ENDFOREACH-» } «ENDIF» } «ENDFILE» «ENDDEFINE» Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 63. Code generation Model • xPand Code ► Call the xPand generator programmatically public void generate(final EObject object, IProgressMonitor monitor) throws CoreException { Generator generator = new Generator(); // define the metamodel used in the template MetaModel m2mMetamodel = new EmfMetaModel(M2MPackage.eINSTANCE); generator.addMetaModel(m2mMetamodel); // define the template generator.setExpand("templates::SourceComponentClass::file FOR component"); © Anyware Technologies-All Right Reserved // define the output folder Outlet outlet = new Outlet("C:/myOutput/src"); generator.addOutlet(outlet); // configure protected regions generator.setPrSrcPaths("C:/myOutput/src"); generator.setPrDefaultExcludes(true); // define the EObject input WorkflowContextDefaultImpl ctx = new WorkflowContextDefaultImpl(); ctx.set("component", object); // run the generator generator.invoke(ctx, new ProgressMonitorAdapter(monitor), new IssuesImpl()); } Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 64. Code generation Model • Integrated in a builder Code ► Transparent and automatic (on save) ► Synchronization between model and code ► Incremental generation © Anyware Technologies-All Right Reserved Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 65. Features Editors Validation Navigator Forms EMF Validation GMF Project Explorer + CNF Model xPand AST Editor CDT © Anyware Technologies-All Right Reserved Compilation Code CDT + DLTK Navigator TCF RSE Communication Target Navigator Pragmatic MDA – May 25h, 2009 – David Sciamma – Anyware Technologies
  • 66. Questions? David Sciamma david.sciamma@anyware-tech.com © Anyware Technologies-All Right Reserved