SlideShare a Scribd company logo
JSMF : A JavaScript Modelling
Framework
Introduction to Model-Driven Engineering
What is a modelling Framework ?
Why a modelling framework ?
Why modelling ?
What is a model ?
What it is useful for ?
Etc…
To answer those questions let’s have a look at
Model-Driven Engineering
So, what is Model-Driven Engineering ?
Note: I will not answer all those questions, with “why modelling” we could spend
hours of presentations and discussions ;-)
Model-Driven Engineering
A model: is an artifact that represent a portion of a
given system according to a given viewpoint.
μ
Represents
(partially)
Model-Driven Engineering
A metamodel: is a model to which a model conforms
to.
In MDE a Model has to conforms to an explicit metamodel
System Under
Study
χ
μ
Conforms to
Represents
Metamodel
Model
Model-Driven Engineering
A modelling language: is a structural language used
to express (meta)models
System Under
Study
χ
μ
Conforms to
Represents
Metamodel
Model
μ
Represents
Model-Driven Engineering
Transformations: from contemplative models to
productive models!
« Write once, generated everywhere »
The core idea was to generate code… but it can be any
different output: data correlation, visualization, etc.
Model-Driven Engineering
The essence of MDE is to provide a way to:
- abstract away from a system under study (focusing
on a peculiar problem)
- systematic way of expressing structured/typed model
thanks to metamodel
- generalization of the way to address problems
- automation of some processes (design, analysis,
etc.).
So, what is a Modelling frameworks
Modelling frameworks support the definition of:
Modelling language,
Models,
Metamodels
and other cool stuff like transformations, model checking,
model comparison, visualization, etc.
The famous one:
Eclipse Modelling Framework
Modelling frameworks
A set of companies are making business with EMF…
and EMF is the reference for big standardization
initiatives...
Our experience with EMF
Web user-interfaces generation from abstract
models (interaction flow) to actual app.
Our experience with EMF
Our experience with EMF
Our last try with EMF
60 variants of UI according to the conference user
profiles :
demonstrator used in real conditions by conference attendees.
Still stylistic and (back-end) code to be written :
But we learned a lot, generalizing hand-written code into models and
transformation ;
Long learning curve (from non MDE specialists in the
team).
Editor, visualisation are hard to build (but covered by
existing support).
Lessons learned
- Use of Eclipse is heavy...
- Bad integration of transformation chains :
multiples langages to ensure the generation process :
Ant, Java, JavaScript (for processing), ATL, Acceleo (for transformations)
- Produced environment is not integrated with web
applications
Note : nowadays Eclipse RCP is providing a support for web app.
No support for evolution or drafting for metamodels,
transformation
Modification of a metamodel part implies a lot of modifications
JSMF : What is different ?
A set of companies are making business with
EMF… so why designing a new one?
Flexibility !
On of the core issue with classical modelling framework is they
are so deeply embed in object oriented language (i.e., Java for
EMF) that modelling is too much constrained.
JSMF : What is different ?
Why flexibility...
Because modelling can also be a creative, collaborative task
JSMF, thanks to JavaScript dynamic typing allows for building
models from modeler viewpoint:
models can be incomplete (unfinished)
models can have uncertainty (partial/total)
models can be deduced from a set of model elements...
Dive inside the framework
4 concepts :
(Meta)Modelling : the core that gives substance to models (i.e.,
they are not only drawings).
Transformation: make your models useful
Managing ecosystem of models: aligning the different perspectives
Model emergence: toward data-driven modelling ;-)
https://js-mf.github.io/
Metamodel/ Model
Entity-Relationship Attributes
Defining a metamodel : Classes, Attributes, References
Class (Name)
name,
Multiplicity,
Opposite,
associatedClass
+ attribute name, type
+ attribute name, type
+ attribute name, type
Transformations
A
+ name, String
C
+ id, Number
B
+ name, String
D
+ num, Number
Transformation A
+ name, String
C
+ id, Number
B
+ name, String
D
+ num, Number
Transformation A
+ name, String
C
+ id, Number
B
+ name, String
D
+ num, Number
JSMF : The modelling part
As it is defined a model has to be conform to a
metamodel but in JSMF we:
It results in separating the behavior of model elements from
metamodel elements: they could both evolve separately.
We separate the metamodel functions 1) as a typing
mechanism and 2) as a template for model element creation
As a result, at a certain point in time, a model element could
no longer be conforms to the metamodel element used for its
creation
JSMF : To check or not to check !
Checking attributes (type, mandatory)
Checking references targeted types
Checking references multiplicities (min/max)
Adding any references or attributes to an existing JSMF object
Having a fine management of flexibility on artifacts (flexible class or just
some elements)
Some specific functions
Checking attributes (type, mandatory)
const Family = Class . newInstance ( ’ Family ’ , [] , { lastname : { type : String ,
mandatory : true }}
Level of check for individual references or attributes (using
errorCallback function):
OnError.silent to avoid checking,
OnError.thow to get a JavaScript error with JSMF properties,
Implement your own error callback function!
All instances of a Class can be declared flexible :
Person.setFlexible(true)
Simply adding any reference or attributes to an existing JSMF object
As any JavaScript object: one can add any property (attribute or reference)
How it can be applied ? What is
missing?
Where need abstraction, representation (of
knowledge)…. even where you have some uncertainty.
Can be used for producing app, but also in applications
themselves (e.g, reasoning about the application
state, data).
Managing different data structure
Ongoing work on aligning informal and more
structured (formal) models
From Flexible to Structured/Rigid
models
From Metamodel
from Model
(archetypal instance)
Structured/Rigid Modelling
Flexible Modelling
Recovery
Discovery
Controlling the flexibility
Recovery
Discovery
Example : Android Malware
Visualization
- Using existing tool output (using google protobuf)
as a JSMF model
- Extracting relevant information from models
- Build view from extracted data model
Example : Android Malware
Visualization
Example : Android Malware Visualization
https://github.com/ICC-analysis/JSMF-Android
https://js-mf.github.io/

More Related Content

PPT
Dynamic and Generic Manipulation of Models: From Introspection to Scripting
ODP
Modeling With Eclipse @SoftShake 2011
PPT
Representing Patterns In Uml Andy Bulka 200610
PPT
Representing Design Patterns In Uml Andy Bulka Oct2006
PPTX
How I Learned To Apply Design Patterns
PDF
Software Design Patterns. Part I :: Structural Patterns
DOCX
Mi0041 java and web design
PPTX
Design pattern (Abstract Factory & Singleton)
Dynamic and Generic Manipulation of Models: From Introspection to Scripting
Modeling With Eclipse @SoftShake 2011
Representing Patterns In Uml Andy Bulka 200610
Representing Design Patterns In Uml Andy Bulka Oct2006
How I Learned To Apply Design Patterns
Software Design Patterns. Part I :: Structural Patterns
Mi0041 java and web design
Design pattern (Abstract Factory & Singleton)

Similar to JavaScript Modelling Framwork : MDE (20)

PPT
Eclipse World 2007: Fundamentals of the Eclipse Modeling Framework
PPT
EclipseCon 2006: Introduction to the Eclipse Modeling Framework
PPT
EclipseCon 2007: Effective Use of the Eclipse Modeling Framework
PDF
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
PDF
What every Eclipse developer should know about EMF
PPT
EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...
PPT
EclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
PDF
EMF Eclipse Modeling Framework 2nd Edition Dave Steinberg
PPT
ITU - MDD - EMF
PDF
EMF Eclipse Modeling Framework 2nd Edition Dave Steinberg
PDF
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
PPT
Graphical Model Transformation Framework
PDF
You need to extend your models? EMF Facet vs. EMF Profiles
PDF
EMF Facet vs. EMF Profiles - EclipseCon North America 2012, Modeling Symposium
PPT
MDE=Model Driven Everything (Spanish Eclipse Day 2009)
PPSX
MDE in Practice
PPTX
Eclipse Modeling Framework
PDF
Eclipse Summit 2009 - Aspect Oriented Modeling
PPTX
EMF-IncQuery presentation at TOOLS 2012
Eclipse World 2007: Fundamentals of the Eclipse Modeling Framework
EclipseCon 2006: Introduction to the Eclipse Modeling Framework
EclipseCon 2007: Effective Use of the Eclipse Modeling Framework
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
What every Eclipse developer should know about EMF
EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...
EclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
EMF Eclipse Modeling Framework 2nd Edition Dave Steinberg
ITU - MDD - EMF
EMF Eclipse Modeling Framework 2nd Edition Dave Steinberg
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
Graphical Model Transformation Framework
You need to extend your models? EMF Facet vs. EMF Profiles
EMF Facet vs. EMF Profiles - EclipseCon North America 2012, Modeling Symposium
MDE=Model Driven Everything (Spanish Eclipse Day 2009)
MDE in Practice
Eclipse Modeling Framework
Eclipse Summit 2009 - Aspect Oriented Modeling
EMF-IncQuery presentation at TOOLS 2012
Ad

Recently uploaded (20)

PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
System and Network Administraation Chapter 3
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Digital Strategies for Manufacturing Companies
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Introduction to Artificial Intelligence
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
System and Network Administration Chapter 2
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
medical staffing services at VALiNTRY
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
history of c programming in notes for students .pptx
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
System and Network Administraation Chapter 3
CHAPTER 2 - PM Management and IT Context
Digital Strategies for Manufacturing Companies
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Introduction to Artificial Intelligence
Designing Intelligence for the Shop Floor.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
System and Network Administration Chapter 2
Reimagine Home Health with the Power of Agentic AI​
wealthsignaloriginal-com-DS-text-... (1).pdf
Understanding Forklifts - TECH EHS Solution
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
medical staffing services at VALiNTRY
Upgrade and Innovation Strategies for SAP ERP Customers
Operating system designcfffgfgggggggvggggggggg
history of c programming in notes for students .pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Ad

JavaScript Modelling Framwork : MDE

  • 1. JSMF : A JavaScript Modelling Framework Introduction to Model-Driven Engineering
  • 2. What is a modelling Framework ? Why a modelling framework ? Why modelling ? What is a model ? What it is useful for ? Etc… To answer those questions let’s have a look at Model-Driven Engineering So, what is Model-Driven Engineering ? Note: I will not answer all those questions, with “why modelling” we could spend hours of presentations and discussions ;-)
  • 3. Model-Driven Engineering A model: is an artifact that represent a portion of a given system according to a given viewpoint. μ Represents (partially)
  • 4. Model-Driven Engineering A metamodel: is a model to which a model conforms to. In MDE a Model has to conforms to an explicit metamodel System Under Study χ μ Conforms to Represents Metamodel Model
  • 5. Model-Driven Engineering A modelling language: is a structural language used to express (meta)models System Under Study χ μ Conforms to Represents Metamodel Model μ Represents
  • 6. Model-Driven Engineering Transformations: from contemplative models to productive models! « Write once, generated everywhere » The core idea was to generate code… but it can be any different output: data correlation, visualization, etc.
  • 7. Model-Driven Engineering The essence of MDE is to provide a way to: - abstract away from a system under study (focusing on a peculiar problem) - systematic way of expressing structured/typed model thanks to metamodel - generalization of the way to address problems - automation of some processes (design, analysis, etc.).
  • 8. So, what is a Modelling frameworks Modelling frameworks support the definition of: Modelling language, Models, Metamodels and other cool stuff like transformations, model checking, model comparison, visualization, etc. The famous one: Eclipse Modelling Framework
  • 9. Modelling frameworks A set of companies are making business with EMF… and EMF is the reference for big standardization initiatives...
  • 10. Our experience with EMF Web user-interfaces generation from abstract models (interaction flow) to actual app.
  • 12. Our experience with EMF Our last try with EMF 60 variants of UI according to the conference user profiles : demonstrator used in real conditions by conference attendees. Still stylistic and (back-end) code to be written : But we learned a lot, generalizing hand-written code into models and transformation ; Long learning curve (from non MDE specialists in the team). Editor, visualisation are hard to build (but covered by existing support).
  • 13. Lessons learned - Use of Eclipse is heavy... - Bad integration of transformation chains : multiples langages to ensure the generation process : Ant, Java, JavaScript (for processing), ATL, Acceleo (for transformations) - Produced environment is not integrated with web applications Note : nowadays Eclipse RCP is providing a support for web app. No support for evolution or drafting for metamodels, transformation Modification of a metamodel part implies a lot of modifications
  • 14. JSMF : What is different ? A set of companies are making business with EMF… so why designing a new one? Flexibility ! On of the core issue with classical modelling framework is they are so deeply embed in object oriented language (i.e., Java for EMF) that modelling is too much constrained.
  • 15. JSMF : What is different ? Why flexibility... Because modelling can also be a creative, collaborative task JSMF, thanks to JavaScript dynamic typing allows for building models from modeler viewpoint: models can be incomplete (unfinished) models can have uncertainty (partial/total) models can be deduced from a set of model elements...
  • 16. Dive inside the framework 4 concepts : (Meta)Modelling : the core that gives substance to models (i.e., they are not only drawings). Transformation: make your models useful Managing ecosystem of models: aligning the different perspectives Model emergence: toward data-driven modelling ;-) https://js-mf.github.io/
  • 17. Metamodel/ Model Entity-Relationship Attributes Defining a metamodel : Classes, Attributes, References Class (Name) name, Multiplicity, Opposite, associatedClass + attribute name, type + attribute name, type + attribute name, type
  • 18. Transformations A + name, String C + id, Number B + name, String D + num, Number
  • 19. Transformation A + name, String C + id, Number B + name, String D + num, Number
  • 20. Transformation A + name, String C + id, Number B + name, String D + num, Number
  • 21. JSMF : The modelling part As it is defined a model has to be conform to a metamodel but in JSMF we: It results in separating the behavior of model elements from metamodel elements: they could both evolve separately. We separate the metamodel functions 1) as a typing mechanism and 2) as a template for model element creation As a result, at a certain point in time, a model element could no longer be conforms to the metamodel element used for its creation
  • 22. JSMF : To check or not to check ! Checking attributes (type, mandatory) Checking references targeted types Checking references multiplicities (min/max) Adding any references or attributes to an existing JSMF object Having a fine management of flexibility on artifacts (flexible class or just some elements)
  • 23. Some specific functions Checking attributes (type, mandatory) const Family = Class . newInstance ( ’ Family ’ , [] , { lastname : { type : String , mandatory : true }} Level of check for individual references or attributes (using errorCallback function): OnError.silent to avoid checking, OnError.thow to get a JavaScript error with JSMF properties, Implement your own error callback function! All instances of a Class can be declared flexible : Person.setFlexible(true) Simply adding any reference or attributes to an existing JSMF object As any JavaScript object: one can add any property (attribute or reference)
  • 24. How it can be applied ? What is missing? Where need abstraction, representation (of knowledge)…. even where you have some uncertainty. Can be used for producing app, but also in applications themselves (e.g, reasoning about the application state, data). Managing different data structure Ongoing work on aligning informal and more structured (formal) models
  • 25. From Flexible to Structured/Rigid models From Metamodel from Model (archetypal instance) Structured/Rigid Modelling Flexible Modelling Recovery Discovery
  • 27. Example : Android Malware Visualization - Using existing tool output (using google protobuf) as a JSMF model - Extracting relevant information from models - Build view from extracted data model
  • 29. Example : Android Malware Visualization https://github.com/ICC-analysis/JSMF-Android