SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 1
MAD
Model Aggregator eDitor
Fabien Vignal – Philippe Palau
Http://www.sysord.com
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 2
Who Are We ?
Software Engineer
SYSORD
- Small company (3 person-strong) located in Roquefort (FR12)
- Eclipse, RCP, Java, J2EE
- Software development for the food industry
Interested in MDA and development automation
Empirical approach before using EMF
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 3
Motivation
Daily use of EMF / UML modelers
Properties view :
- Not very user friendly
- Not always adapted to user needs
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 4
What Would Be Nice ...
An input form with adapted widgets
Properties adapted to user needs
Revised form design
Simple navigation between elements
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 5
MAD :Model Aggregator
eDitor
Video MAD for UML Model (http://youtu.be/ACFS6ajAsV8)
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 6
MAD Concepts (Configuration)
Use of metamodels
Description of views
- Template by EClassifier
- Includes configurable widgets
- Values obtained using queries
Reuse of templates :
- Inheritance (implicit / explicit)
- Composition
Configuration changes immediately applied :
- No code
- No generation
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 7
MAD Concepts (Edit / Save)
Editing of the selected element
Property modification using widgets
Value validation before update
Two types of model
- Main model
- Foreign model
MAD only saves foreign models
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 8
Architecture
Service-oriented architecture
Three main plugins
- API : interfaces (services / objects)
- Core : implementations
- UI : Eclipse view implementation
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 9
Core
Main Services :
- View Builder
- Configuration Manager
- Model Access Object
- Query Evaluation Service
Core provides default service implementations
Any service can be replaced or customised
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 10
User Interface (UI)
Uses Core to get the model for the view
Eclipse view (SWT)
Customisation :
- ViewBuilder et WidgetBuilder extensions
- New custom widgets
- New UI library target : (JavaFX / HTML)
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 11
Technology Used
Eclipse
Xtext (configuration editor + DSL)
SWT + FormToolKit / Eclipse view
Query evaluators :
- OCL
- Acceleo
EMF Adapters (Model synchronization)
Dependency injection with Guice
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 12
Queries (I)
Queries
"authors" no language defined, OCL by default
language:ACCELEO call authorsOfSeveralBooks() Acceleo Query call
language:MAD "CREATE('books')" MAD function to create a new book
Query chains
Query Chain {
"books->last()",
language: ACCELEO call authorMultiBook(),
"first()"
}
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 13
Queries (II)
Subqueries
eContainer().oclAsType(Library).books->select(pages > [pages])->isEmpty()
The first 'pages' refers to the books in the iteration. '[pages]' is evaluated before the
iteration and corresponds to the number of pages of the book.
Contextual Variables
$CONTEXT, $VALUE, $UIVALUE, $MODEL … usable variables for queries.
$UIVALUE > 10 and $UIVALUE < 10000
Validation rule of a numerical widget's value
Need for evaluator monitoring
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 14
MAD in Action
The Tinylibrary model
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 15
tinylibrary.mad Configuration
MAD base configuration import
Tinylibrary metamodel import
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 16
Widgets
Set of configurable widgets
 InputWidgets :
- Text, Numeric, Date, Boolean
- ComboBox, List, PickList (popup or embedded)
- Embedded Xtext editor
 OutputWidget
NavigationWidget
FlexibleWidget
Command
Extendable by customised implementation
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 17
First Configuration (I)
//------------------------------------------
// MAD configuration for Tiny library model
//------------------------------------------
//MAD base configuration import
import "platform:/resource/mad.configuration/config.mad"
//Tiny library Ecore metamodel import
import
"platform:/plugin/com.sysord.mad.demo.tinylibrary/model/tinylibrary.ecore"
//Configuration for a Book element
Configuration BOOK for tinylibrary.Book {
template:
//Textbox widget for editing title property
widget:Title //the widget id
label:"Title" //widget label
type:TEXT_WIDGET //display a text widget
value:"title" //Ocl query for getting the 'title' property from the book.
}
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 18
First Configuration (II)
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 19
Simple Widgets
Configuration BOOK for tinylibrary.Book {
//Format expression for all Book elements Label computing
//queries between [] are evaluated parts.
label provider:"Book: [title]"
template:
...
//Number input widget
widget:Pages
label:"Pages"
type:NUMBER_WIDGET
value:"pages"
//Date input widget
widget:PublicationDate
label:"Publication date"
type:DATE_WIDGET
value:"published"
//Checkbox widget
widget:Damaged
label:"Is damaged"
type:BOOL_WIDGET
value:"damaged"
}
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 20
List Widgets
List content (candidates) provided by queries
//Configuration for a Book element
Configuration BOOK for tinylibrary.Book {
...
//Combo widget
widget:Category
label:"Category"
type:SINGLE_SELECT_WIDGET
value:"category":tinylibrary.BookCategory
//OCL query for filling combo
candidates:"BookCategory.allInstances()"
//Popup PickList widget
widget:Authors
//Dynamic label value
label:"[authors->size()] authors"
type:MULTI_SELECT_WIDGET:POPUP_PICKLIST
value:"authors"
//Populate the list with candidates query results
candidates:"eContainer().oclAsType(Library).writers"
item label:"[name]"
}
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 21
Navigation Widget
List of links to detail view of a selected element
Double-click to access detail element
Click on the left arrow to return
//Configuration for the Library element
Configuration LIBRARY for tinylibrary.Library {
template:
//Navigation for accessing Book detail
widget:BooksNavigation
label:"Books"
type:NAVIGATION_WIDGET
candidates:"books"
}
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 22
Output Widget
Display read-only values
Elementary properties or computed values
Configuration BOOK for tinylibrary.Book {
...
//Output text
widget:avgPage
label:"Pages by author"
type:OUTPUTTEXT_WIDGET
//conditional visibility
visible when:"not authors->isEmpty()"
//Compute pages average by authors.
value:"(pages / authors->size())"
//value converter from double to string.
valueConverter:DOUBLE
}
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 23
Flexible Widget (I)
//Configuration for a person element (abstract)
Configuration Abstract_PERSON for tinylibrary.Person {
label provider:"[name]"
template:
widget:Name
...
widget:FirstName
...
widget:LastName
...
}
//Configuration for a Writer element.
//(extends implicitly Person configuration)
Configuration WRITER for tinylibrary.Writer {
template:
widget:Books
label:"Books"
type:FLEXIBLE_WIDGET
//include Book template for each writen book
value:"books"
}
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 24
Flexible Widget (II)
Selection of the template to use for the flexible elements
//Alternative configuration for a Book element
Configuration BOOK_SHORT for tinylibrary.Book {
//Explicit extension
extends: BOOK //Reuse the BOOK template
template:
//Display only those widgets
layout: Isbn Title
}
Configuration WRITER for tinylibrary.Writer {
template:
widget:Books
label:"Books"
type:FLEXIBLE_WIDGET
//Use the BOOK_SHORT template
//for book detail.
flexible template: BOOK_SHORT
value:"books"
}
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 25
Command
//Icon declaration
Use icon DELETE_ICON URI:"platform:/resource/mad.configuration/icons/delete-icon_16.png"
//Shared command declaration
Common Command DELETE_ELEMENT_COMMAND {
ITEM_COMMAND
"Delete item" //Command label
icon:DELETE_ICON //Image for the command button
//launch the DELETE MAD Macro for deleting selected item
action: language:MAD "DELETE()"
on success: Reload view
}
Configuration LIBRARY for tinylibrary.Library {
template:
widget:BooksNavigation
label:"Books"
type:NAVIGATION_WIDGET
candidates:"books"
commands:
//Inner command for creating a new book
GLOBAL_COMMAND "New Book"
action: language:MAD "CREATE([OCL:'books'])"
//after creation displays view
//for the created item: the command RESULT.
on success: Display view for "$RESULT",
//Use shared command with label override
DELETE_ELEMENT_COMMAND("Delete the selected book.")
}
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 26
Other Widgets
- Xtext embedded editor
- Custom Widgets
- HTML Link
- Google Map widget
Demonstration video for the first version of MAD:
MAD and Xtext (http://youtu.be/ShoLi5XoQOw)
MAD is customizable (http://youtu.be/2NTAP--Hi1I)
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 27
« Layout »
Widgets distribution by tab
Display order selection
//tab declaration
UI Tab {
id:WRITEN_BOOKS
label:"Writen books"
}
Configuration WRITER for tinylibrary.Writer {
template:
widget:Books
//the widget will be diplayed
//on the WRITEN_BOOKS tab
tab:WRITEN_BOOKS
label:"Books"
type:FLEXIBLE_WIDGET
flexible template: BOOK_SHORT
value:"books"
//widgets display order definition
layout: LastName FirstName Name Books
}
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 28
Validators
Validation based on rules
Configuration BOOK for tinylibrary.Book {
…
//Number input widget
widget:Pages
label:"Pages"
type:NUMBER_WIDGET
value:"pages"
validators:
//Validation: pages widget must be filled
//and its value between 10 and 10000
validation rule:
"not $UIVALUE.oclIsUndefined()"
I18N Error message:"REQUIRED_VALUE"
validation rule:
"$UIVALUE > 10 and $UIVALUE < 10000"
I18N Error message:"VALUE_OUT_OF_RANGE[10][10000]"
…
}
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 29
Layers
Filter and aggregate information by domain
« Layers » are hierarchical and stackable
//Layers configuration
Layer INFO_LAYER {
label:"All Information"
Sub layers {
Layer BASIC {label:"Basic information"}
Layer DETAILED{label:"Additional information"}
}
}
Layer STATISTICS_LAYER {
label:"Statistics"
Sub layers {
Layer AUTHOR{label:"Authors statistics"}
Layer BOOKS{label:"Books statistics"}
}
}
Configuration BOOK_SHORT for tinylibrary.Book {
...
widget:Pages
//available only in books statistics layer
layers: STATISTICS_LAYER.BOOKS
...
//Output text
widget:avgPage
//available in the two layers
layers:STATISTICS_LAYER.BOOKS,
STATISTICS_LAYER.AUTHOR
label:"Pages by author"
...
}
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 30
Other Functionalities
I18N : for all labels and messages
Referentials : Queries, Commands, Constants
Multimodel edition (decoration and extension)
- Extension manager
- Model Synchronisation
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 31
Use Cases
MDE/MDA approach with Eclipse
RAD approach : editor creation with a user
Identical edition whatever the modeler used
Domain specific commands
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 32
Conclusion
MAD is functional
Used by Sysord for all modelling works
(UML, etc …)
Ongoing evolutions : queries compilator
(performance optimisation)
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 33
Perspectives
Queries creation wizards
CDO for multi-user mode
MAD configuration generator
MAD plugins generator
Multimedia element edition
sound, images, videos, Charts and Graph
Eclipse4, JavaFX
SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 34
Merci

Weitere ähnliche Inhalte

Ähnlich wie MAD Model Aggregator eDitor (EMF)

Chapter9 network managment-3ed
Chapter9 network managment-3edChapter9 network managment-3ed
Chapter9 network managment-3ed
Khánh Ghẻ
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus Magento
Magento Dev
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Benjamin Cabé
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
Customising the CloudStack UI - CloudStack European User Group Virtual, May 2...
Customising the CloudStack UI - CloudStack European User Group Virtual, May 2...Customising the CloudStack UI - CloudStack European User Group Virtual, May 2...
Customising the CloudStack UI - CloudStack European User Group Virtual, May 2...
ShapeBlue
 
Computernetworkingkurosech9 091011003335-phpapp01
Computernetworkingkurosech9 091011003335-phpapp01Computernetworkingkurosech9 091011003335-phpapp01
Computernetworkingkurosech9 091011003335-phpapp01
AislanSoares
 

Ähnlich wie MAD Model Aggregator eDitor (EMF) (20)

SeedStack feature tour
SeedStack feature tourSeedStack feature tour
SeedStack feature tour
 
Intro lift
Intro liftIntro lift
Intro lift
 
Aad Versteden | State-of-the-art web applications fuelled by Linked Data awar...
Aad Versteden | State-of-the-art web applications fuelled by Linked Data awar...Aad Versteden | State-of-the-art web applications fuelled by Linked Data awar...
Aad Versteden | State-of-the-art web applications fuelled by Linked Data awar...
 
Vue micro frontend implementation patterns
Vue micro frontend implementation patternsVue micro frontend implementation patterns
Vue micro frontend implementation patterns
 
Omnet++
Omnet++Omnet++
Omnet++
 
Angular performance slides
Angular performance slidesAngular performance slides
Angular performance slides
 
Chapter9 network managment-3ed
Chapter9 network managment-3edChapter9 network managment-3ed
Chapter9 network managment-3ed
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus Magento
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
 
Software Variability Management
Software Variability ManagementSoftware Variability Management
Software Variability Management
 
The next step from Microsoft - Vnext (Srdjan Poznic)
The next step from Microsoft - Vnext (Srdjan Poznic)The next step from Microsoft - Vnext (Srdjan Poznic)
The next step from Microsoft - Vnext (Srdjan Poznic)
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
OpenCms Days 2015 Workflow using Docker and Jenkins
OpenCms Days 2015 Workflow using Docker and JenkinsOpenCms Days 2015 Workflow using Docker and Jenkins
OpenCms Days 2015 Workflow using Docker and Jenkins
 
Writing Ansible Modules (DENOG11)
Writing Ansible Modules (DENOG11)Writing Ansible Modules (DENOG11)
Writing Ansible Modules (DENOG11)
 
mu.semte.ch - A journey from TenForce's perspective - SEMANTICS2016
mu.semte.ch - A journey from TenForce's perspective - SEMANTICS2016mu.semte.ch - A journey from TenForce's perspective - SEMANTICS2016
mu.semte.ch - A journey from TenForce's perspective - SEMANTICS2016
 
Customising the CloudStack UI - CloudStack European User Group Virtual, May 2...
Customising the CloudStack UI - CloudStack European User Group Virtual, May 2...Customising the CloudStack UI - CloudStack European User Group Virtual, May 2...
Customising the CloudStack UI - CloudStack European User Group Virtual, May 2...
 
06 network automationwithansible
06 network automationwithansible06 network automationwithansible
06 network automationwithansible
 
Developing maintainable Cordova applications
Developing maintainable Cordova applicationsDeveloping maintainable Cordova applications
Developing maintainable Cordova applications
 
Computernetworkingkurosech9 091011003335-phpapp01
Computernetworkingkurosech9 091011003335-phpapp01Computernetworkingkurosech9 091011003335-phpapp01
Computernetworkingkurosech9 091011003335-phpapp01
 
Brisbane Drupal meetup - 2016 Mar - Build module in Drupal 8
Brisbane Drupal meetup - 2016 Mar - Build module in Drupal 8Brisbane Drupal meetup - 2016 Mar - Build module in Drupal 8
Brisbane Drupal meetup - 2016 Mar - Build module in Drupal 8
 

Kürzlich hochgeladen

Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Kürzlich hochgeladen (20)

Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 

MAD Model Aggregator eDitor (EMF)

  • 1. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 1 MAD Model Aggregator eDitor Fabien Vignal – Philippe Palau Http://www.sysord.com
  • 2. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 2 Who Are We ? Software Engineer SYSORD - Small company (3 person-strong) located in Roquefort (FR12) - Eclipse, RCP, Java, J2EE - Software development for the food industry Interested in MDA and development automation Empirical approach before using EMF
  • 3. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 3 Motivation Daily use of EMF / UML modelers Properties view : - Not very user friendly - Not always adapted to user needs
  • 4. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 4 What Would Be Nice ... An input form with adapted widgets Properties adapted to user needs Revised form design Simple navigation between elements
  • 5. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 5 MAD :Model Aggregator eDitor Video MAD for UML Model (http://youtu.be/ACFS6ajAsV8)
  • 6. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 6 MAD Concepts (Configuration) Use of metamodels Description of views - Template by EClassifier - Includes configurable widgets - Values obtained using queries Reuse of templates : - Inheritance (implicit / explicit) - Composition Configuration changes immediately applied : - No code - No generation
  • 7. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 7 MAD Concepts (Edit / Save) Editing of the selected element Property modification using widgets Value validation before update Two types of model - Main model - Foreign model MAD only saves foreign models
  • 8. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 8 Architecture Service-oriented architecture Three main plugins - API : interfaces (services / objects) - Core : implementations - UI : Eclipse view implementation
  • 9. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 9 Core Main Services : - View Builder - Configuration Manager - Model Access Object - Query Evaluation Service Core provides default service implementations Any service can be replaced or customised
  • 10. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 10 User Interface (UI) Uses Core to get the model for the view Eclipse view (SWT) Customisation : - ViewBuilder et WidgetBuilder extensions - New custom widgets - New UI library target : (JavaFX / HTML)
  • 11. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 11 Technology Used Eclipse Xtext (configuration editor + DSL) SWT + FormToolKit / Eclipse view Query evaluators : - OCL - Acceleo EMF Adapters (Model synchronization) Dependency injection with Guice
  • 12. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 12 Queries (I) Queries "authors" no language defined, OCL by default language:ACCELEO call authorsOfSeveralBooks() Acceleo Query call language:MAD "CREATE('books')" MAD function to create a new book Query chains Query Chain { "books->last()", language: ACCELEO call authorMultiBook(), "first()" }
  • 13. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 13 Queries (II) Subqueries eContainer().oclAsType(Library).books->select(pages > [pages])->isEmpty() The first 'pages' refers to the books in the iteration. '[pages]' is evaluated before the iteration and corresponds to the number of pages of the book. Contextual Variables $CONTEXT, $VALUE, $UIVALUE, $MODEL … usable variables for queries. $UIVALUE > 10 and $UIVALUE < 10000 Validation rule of a numerical widget's value Need for evaluator monitoring
  • 14. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 14 MAD in Action The Tinylibrary model
  • 15. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 15 tinylibrary.mad Configuration MAD base configuration import Tinylibrary metamodel import
  • 16. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 16 Widgets Set of configurable widgets  InputWidgets : - Text, Numeric, Date, Boolean - ComboBox, List, PickList (popup or embedded) - Embedded Xtext editor  OutputWidget NavigationWidget FlexibleWidget Command Extendable by customised implementation
  • 17. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 17 First Configuration (I) //------------------------------------------ // MAD configuration for Tiny library model //------------------------------------------ //MAD base configuration import import "platform:/resource/mad.configuration/config.mad" //Tiny library Ecore metamodel import import "platform:/plugin/com.sysord.mad.demo.tinylibrary/model/tinylibrary.ecore" //Configuration for a Book element Configuration BOOK for tinylibrary.Book { template: //Textbox widget for editing title property widget:Title //the widget id label:"Title" //widget label type:TEXT_WIDGET //display a text widget value:"title" //Ocl query for getting the 'title' property from the book. }
  • 18. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 18 First Configuration (II)
  • 19. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 19 Simple Widgets Configuration BOOK for tinylibrary.Book { //Format expression for all Book elements Label computing //queries between [] are evaluated parts. label provider:"Book: [title]" template: ... //Number input widget widget:Pages label:"Pages" type:NUMBER_WIDGET value:"pages" //Date input widget widget:PublicationDate label:"Publication date" type:DATE_WIDGET value:"published" //Checkbox widget widget:Damaged label:"Is damaged" type:BOOL_WIDGET value:"damaged" }
  • 20. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 20 List Widgets List content (candidates) provided by queries //Configuration for a Book element Configuration BOOK for tinylibrary.Book { ... //Combo widget widget:Category label:"Category" type:SINGLE_SELECT_WIDGET value:"category":tinylibrary.BookCategory //OCL query for filling combo candidates:"BookCategory.allInstances()" //Popup PickList widget widget:Authors //Dynamic label value label:"[authors->size()] authors" type:MULTI_SELECT_WIDGET:POPUP_PICKLIST value:"authors" //Populate the list with candidates query results candidates:"eContainer().oclAsType(Library).writers" item label:"[name]" }
  • 21. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 21 Navigation Widget List of links to detail view of a selected element Double-click to access detail element Click on the left arrow to return //Configuration for the Library element Configuration LIBRARY for tinylibrary.Library { template: //Navigation for accessing Book detail widget:BooksNavigation label:"Books" type:NAVIGATION_WIDGET candidates:"books" }
  • 22. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 22 Output Widget Display read-only values Elementary properties or computed values Configuration BOOK for tinylibrary.Book { ... //Output text widget:avgPage label:"Pages by author" type:OUTPUTTEXT_WIDGET //conditional visibility visible when:"not authors->isEmpty()" //Compute pages average by authors. value:"(pages / authors->size())" //value converter from double to string. valueConverter:DOUBLE }
  • 23. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 23 Flexible Widget (I) //Configuration for a person element (abstract) Configuration Abstract_PERSON for tinylibrary.Person { label provider:"[name]" template: widget:Name ... widget:FirstName ... widget:LastName ... } //Configuration for a Writer element. //(extends implicitly Person configuration) Configuration WRITER for tinylibrary.Writer { template: widget:Books label:"Books" type:FLEXIBLE_WIDGET //include Book template for each writen book value:"books" }
  • 24. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 24 Flexible Widget (II) Selection of the template to use for the flexible elements //Alternative configuration for a Book element Configuration BOOK_SHORT for tinylibrary.Book { //Explicit extension extends: BOOK //Reuse the BOOK template template: //Display only those widgets layout: Isbn Title } Configuration WRITER for tinylibrary.Writer { template: widget:Books label:"Books" type:FLEXIBLE_WIDGET //Use the BOOK_SHORT template //for book detail. flexible template: BOOK_SHORT value:"books" }
  • 25. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 25 Command //Icon declaration Use icon DELETE_ICON URI:"platform:/resource/mad.configuration/icons/delete-icon_16.png" //Shared command declaration Common Command DELETE_ELEMENT_COMMAND { ITEM_COMMAND "Delete item" //Command label icon:DELETE_ICON //Image for the command button //launch the DELETE MAD Macro for deleting selected item action: language:MAD "DELETE()" on success: Reload view } Configuration LIBRARY for tinylibrary.Library { template: widget:BooksNavigation label:"Books" type:NAVIGATION_WIDGET candidates:"books" commands: //Inner command for creating a new book GLOBAL_COMMAND "New Book" action: language:MAD "CREATE([OCL:'books'])" //after creation displays view //for the created item: the command RESULT. on success: Display view for "$RESULT", //Use shared command with label override DELETE_ELEMENT_COMMAND("Delete the selected book.") }
  • 26. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 26 Other Widgets - Xtext embedded editor - Custom Widgets - HTML Link - Google Map widget Demonstration video for the first version of MAD: MAD and Xtext (http://youtu.be/ShoLi5XoQOw) MAD is customizable (http://youtu.be/2NTAP--Hi1I)
  • 27. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 27 « Layout » Widgets distribution by tab Display order selection //tab declaration UI Tab { id:WRITEN_BOOKS label:"Writen books" } Configuration WRITER for tinylibrary.Writer { template: widget:Books //the widget will be diplayed //on the WRITEN_BOOKS tab tab:WRITEN_BOOKS label:"Books" type:FLEXIBLE_WIDGET flexible template: BOOK_SHORT value:"books" //widgets display order definition layout: LastName FirstName Name Books }
  • 28. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 28 Validators Validation based on rules Configuration BOOK for tinylibrary.Book { … //Number input widget widget:Pages label:"Pages" type:NUMBER_WIDGET value:"pages" validators: //Validation: pages widget must be filled //and its value between 10 and 10000 validation rule: "not $UIVALUE.oclIsUndefined()" I18N Error message:"REQUIRED_VALUE" validation rule: "$UIVALUE > 10 and $UIVALUE < 10000" I18N Error message:"VALUE_OUT_OF_RANGE[10][10000]" … }
  • 29. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 29 Layers Filter and aggregate information by domain « Layers » are hierarchical and stackable //Layers configuration Layer INFO_LAYER { label:"All Information" Sub layers { Layer BASIC {label:"Basic information"} Layer DETAILED{label:"Additional information"} } } Layer STATISTICS_LAYER { label:"Statistics" Sub layers { Layer AUTHOR{label:"Authors statistics"} Layer BOOKS{label:"Books statistics"} } } Configuration BOOK_SHORT for tinylibrary.Book { ... widget:Pages //available only in books statistics layer layers: STATISTICS_LAYER.BOOKS ... //Output text widget:avgPage //available in the two layers layers:STATISTICS_LAYER.BOOKS, STATISTICS_LAYER.AUTHOR label:"Pages by author" ... }
  • 30. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 30 Other Functionalities I18N : for all labels and messages Referentials : Queries, Commands, Constants Multimodel edition (decoration and extension) - Extension manager - Model Synchronisation
  • 31. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 31 Use Cases MDE/MDA approach with Eclipse RAD approach : editor creation with a user Identical edition whatever the modeler used Domain specific commands
  • 32. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 32 Conclusion MAD is functional Used by Sysord for all modelling works (UML, etc …) Ongoing evolutions : queries compilator (performance optimisation)
  • 33. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 33 Perspectives Queries creation wizards CDO for multi-user mode MAD configuration generator MAD plugins generator Multimedia element edition sound, images, videos, Charts and Graph Eclipse4, JavaFX
  • 34. SYSORD - Model Aggregator eDitor – Fabien Vignal – Philippe Palau – Stephan Montagnes 34 Merci