SlideShare a Scribd company logo
Hamza Ed-douibi, Javier Luis Cánovas
Izquierdo, Abel Gómez, Massimo Tisi, Jordi
Cabot
EMF-REST: Generation of RESTful
APIs from Models
1
ACM SAC 2016 - Pisa, Italy.
07/04/2016
EMF-REST: Generation of RESTful APIs
from Models
2
 The Model-driven engineering paradigm emphasizes the use of
models to raise the level of abstraction and to (semi)automate the
development of software.
Abstraction
Automation
MDE
Standar-
dization
 The Eclipse Modeling Framework (EMF) is the foundation for
modeling and data integration at Eclipse. (Models are described using
the Ecore language)
EMF-REST: Generation of RESTful APIs
from Models
3
Addressable resources (URI)
Representation-oriented (JSON,XML)
Statelessness
Uniform and Constrained Interface
Representational State Transfer (REST) is an architectural style
that specifies constraints such as:
Java
Environment
XMI
EMF-REST proposal
4
JAVA
+
Web
Environment
JAVASCRIPT
+
REST API
EMF-REST
EMF-REST benefits
5
Collaboration Scalability
Portability
EMF-REST approach
 EMF-REST generates RESTful Web APIs out of EMF
models.
 The generated API provides a direct mapping to
access data models following the REST principles :
– Addressable resources (URI)
– Representation-oriented (JSON,XML)
– Statelessness
– Uniform and Constrained Interface (HTTP verbs :
GET, POST,…)
 The generated application supports validation and
security.
 The generated RESTful Web API relies on well-known
libraries and standards.
6
EMF-REST features
7
REST API JSON Serialization XML Serialization
Validation Security
Running Example
8
IFML (Interaction Flow Modeling Language) model: A
form from a movie manager
Mapping EMF with REST
EMF
EMF-REST
9
Addressable resources
1. platform:/resource/project/AddMovie.xmi
2. platform:/resource/project/AddMovie.xmi#title
3. platform:/resource/project/AddMovie.xmi#//.../@viewComponentsParts.0
1. https://example.com/rest/IFMLModel/AddMovie
2. https://example.com/rest/IFMLModel/.../viewComponentsParts/title
3. https://example.com/rest/IFMLModel/.../viewComponentsParts?index=0
Mapping EMF with REST
XML JSON
10
Representation-Oriented
<form>
<name>AddMovieForm</name>
<viewComponentParts>
<simpleField>
<uri>https://example.com/.../
viewComponentsParts/picture</uri>
</simpleField>
<simpleField>
<uri>https://example.com/.../
viewComponentsParts/title</uri>
</simpleField>
...
</viewComponentParts>
<viewElementEvents>
<onSubmitEvent>
<uri>https://example.com/.../
viewElementEvents/add</uri>
</onSubmitEvent>
</viewElementEvents>
</form>
{
"form":{
"name":"addMovieForm",
"viewComponentParts":{
"simpleField":[
{
"uri":"https://.../
viewComponentsParts/picture"
},
{
"uri":"https://.../
viewComponentsParts/title"
}
,…]
},
"viewElementEvents":{
"onsubmitevent":{
"uri":"https://.../
viewelementevents/add"
}
}
}
}
Mapping EMF with REST: Uniform and
Constrained Interface & Statelessness
EMF
EMF-REST
11
PUT https :// example .com/rest/IFMLModel/AddMovie/
interactionFlowElements/AddMovieWindow/
viewElements /AddMovieForm
{"form":{
name :"toto"
}
}
addMovieFormObj . setName (" toto ");
//addMovieFormObj is of type Form
Extra features
 Validation
– Use of OCL annotations to enable validation each time the API is called
 Security
– Encryption: All the communications with the server are using HTTPS
– Authentication: Only authenticated users are allowed to access the API
– Authorization: Use of a Role-based mechanism to assign permissions for
each operation.
– Use of model annotations to support authentication and authorization
12
Architecture of EMF-REST generated application
13
EMF
JAX-RS
EJB/CDI
JAXB OCL JPA
JavaScript API
Browser
REST Client
Validation SecurityContent management
Web ClientWeb Application
EMF-REST generation process
14
Conclusion & future work
 EMF-REST generates truly RESTful APIs for EMF
models by mapping data models with REST
principles.
 EMF-REST complements the existing (Java-based) API
generation facilities EMF already provides and
extends them to the Web.
 Future work:
– Storage configuration
– Configuration of the generated API
– Definition of how model elements should be
serialized.
15
Thank you!
16
• Visit us at:
http://som-
research.uoc.edu/tools/emf-rest/
• Hamza Ed-douibi:
hed-douibi@uoc.edu
•Javier Cánovas:
jcanovasi@uoc.edu
•Jordi Cabot:
jordi.cabot@icrea.cat

More Related Content

PPTX
EMF-REST: Generation of RESTful APIs from Models
PPTX
Building RESTful Java Applications with EMF
PPTX
Experiences and requirements for a User Interaction Modeling Language
PPTX
WebML for OMG
PPTX
Interaction Flow Modeling Language (IFML) First Submission at OMG
PPTX
IFML - Interaction Flow Modeling Language - tutorial on UI and UX modeling &...
PPTX
Interaction Flow Modeling Language: updates on the Beta2 version - by the OMG...
PDF
Mobile extensions for OMG's IFML modeling language
EMF-REST: Generation of RESTful APIs from Models
Building RESTful Java Applications with EMF
Experiences and requirements for a User Interaction Modeling Language
WebML for OMG
Interaction Flow Modeling Language (IFML) First Submission at OMG
IFML - Interaction Flow Modeling Language - tutorial on UI and UX modeling &...
Interaction Flow Modeling Language: updates on the Beta2 version - by the OMG...
Mobile extensions for OMG's IFML modeling language

What's hot (20)

PDF
End-to-end Model-driven Development of Applications with Eclipse using the ...
PPTX
IFML - The interaction flow modeling language, the OMG standard for UI modeli...
PPS
PPS
WCF (Windows Communication Foundation_Unit_01)
PPTX
Mobile extensions for OMG's IFML modeling language presented at MobiWIS confe...
PPTX
.Net
DOCX
MDD and modeling tools research
PDF
Model Driven Architecture (MDA): Motivations, Status & Future
PPT
Introduction to MDA
PPTX
Model driven architecture
DOCX
Bt0083, server side programming theory
DOCX
Bt0083, server side programming theory
PPT
Intro To AOP
PPTX
Mule edifact module
PDF
Mule ESB Interview or Certification questions
PDF
5 - Architetture Software - Metamodelling and the Model Driven Architecture
PPTX
Automatic code generation for cross platform, multi-device mobile apps. An in...
PPTX
ISI Institute E-Services Chapter 4
PPTX
Industrial and Academic Experiences with a User Interaction Modeling Language...
End-to-end Model-driven Development of Applications with Eclipse using the ...
IFML - The interaction flow modeling language, the OMG standard for UI modeli...
WCF (Windows Communication Foundation_Unit_01)
Mobile extensions for OMG's IFML modeling language presented at MobiWIS confe...
.Net
MDD and modeling tools research
Model Driven Architecture (MDA): Motivations, Status & Future
Introduction to MDA
Model driven architecture
Bt0083, server side programming theory
Bt0083, server side programming theory
Intro To AOP
Mule edifact module
Mule ESB Interview or Certification questions
5 - Architetture Software - Metamodelling and the Model Driven Architecture
Automatic code generation for cross platform, multi-device mobile apps. An in...
ISI Institute E-Services Chapter 4
Industrial and Academic Experiences with a User Interaction Modeling Language...
Ad

Viewers also liked (20)

PPTX
OCL tutorial
PPTX
S01 e01 schema-design
PPTX
SECON'2016. Алексеев Олег, Живой API
PDF
PPTX
Document your rest api using swagger - Devoxx 2015
PDF
Model-driven Software Engineering in practice: Chapter 3 - MDSE Use cases
PPT
CPI Summit Europe Presentation
PDF
Banking and Mobile Identity
PDF
Enhancing your Security APIs
PPTX
What's better than Microservices? Serverless Microservices
PDF
Model-Driven Software Engineering in Practice - Chapter 5 - Integration of Mo...
PDF
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
PDF
Model driven software engineering in practice book - Chapter 9 - Model to tex...
PDF
Enough talking - it's time to start doing
PDF
Model driven software engineering in practice book - chapter 7 - Developing y...
PPTX
Introducing Eclipse MoDisco
PPTX
HXR 2016: Free the Data Access & Integration -Aashima Gupta, Apigee
PPTX
Putting order to your API ecosystem
PDF
Performance and Extensibility with EMF
PPTX
Are Your Microservices Naked and Afraid?
OCL tutorial
S01 e01 schema-design
SECON'2016. Алексеев Олег, Живой API
Document your rest api using swagger - Devoxx 2015
Model-driven Software Engineering in practice: Chapter 3 - MDSE Use cases
CPI Summit Europe Presentation
Banking and Mobile Identity
Enhancing your Security APIs
What's better than Microservices? Serverless Microservices
Model-Driven Software Engineering in Practice - Chapter 5 - Integration of Mo...
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model driven software engineering in practice book - Chapter 9 - Model to tex...
Enough talking - it's time to start doing
Model driven software engineering in practice book - chapter 7 - Developing y...
Introducing Eclipse MoDisco
HXR 2016: Free the Data Access & Integration -Aashima Gupta, Apigee
Putting order to your API ecosystem
Performance and Extensibility with EMF
Are Your Microservices Naked and Afraid?
Ad

Similar to EMF-REST: Generation of RESTful APIs from Models (20)

PPT
EclipseCon 2007: Effective Use of the Eclipse Modeling Framework
PPTX
React & Redux JS
PPT
Eclipse World 2007: Fundamentals of the Eclipse Modeling Framework
PPT
EclipseCon 2006: Introduction to the Eclipse Modeling Framework
PPT
Node.js Express Framework
PPT
ASP.NET MVC - In the Wild
PPTX
STUG-Client Object Model SharePoint 2010
PPTX
Intro to EmberJS
PDF
Application Integration Using XML Web Services - Report
PPTX
ASP, ASP.NET, JSP, COM/DCOM
PPT
MDE=Model Driven Everything (Spanish Eclipse Day 2009)
ODP
Development of forms editors based on Ecore metamodels
PPT
EclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
PDF
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSE
PDF
Social Learning and Knowledge Sharing Technologies Lecture Slides about Socia...
PDF
ASP.NET Core Interview Questions PDF By ScholarHat.pdf
PDF
Bn1001 demo ppt advance dot net
PDF
BIMSERVER.ORG – AN OPEN SOURCE IFC MODEL SERVER, 2010
PPTX
Integrating Performance Modeling in Industrial Automation through AutomationM...
PPT
Symfony2 and AngularJS
EclipseCon 2007: Effective Use of the Eclipse Modeling Framework
React & Redux JS
Eclipse World 2007: Fundamentals of the Eclipse Modeling Framework
EclipseCon 2006: Introduction to the Eclipse Modeling Framework
Node.js Express Framework
ASP.NET MVC - In the Wild
STUG-Client Object Model SharePoint 2010
Intro to EmberJS
Application Integration Using XML Web Services - Report
ASP, ASP.NET, JSP, COM/DCOM
MDE=Model Driven Everything (Spanish Eclipse Day 2009)
Development of forms editors based on Ecore metamodels
EclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSE
Social Learning and Knowledge Sharing Technologies Lecture Slides about Socia...
ASP.NET Core Interview Questions PDF By ScholarHat.pdf
Bn1001 demo ppt advance dot net
BIMSERVER.ORG – AN OPEN SOURCE IFC MODEL SERVER, 2010
Integrating Performance Modeling in Industrial Automation through AutomationM...
Symfony2 and AngularJS

Recently uploaded (20)

PPTX
assetexplorer- product-overview - presentation
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PPTX
Introduction to Windows Operating System
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PPTX
Cybersecurity: Protecting the Digital World
PDF
Microsoft Office 365 Crack Download Free
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
Cost to Outsource Software Development in 2025
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
CCleaner 6.39.11548 Crack 2025 License Key
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
PDF
AI Guide for Business Growth - Arna Softech
PDF
Visual explanation of Dijkstra's Algorithm using Python
PDF
Time Tracking Features That Teams and Organizations Actually Need
assetexplorer- product-overview - presentation
DNT Brochure 2025 – ISV Solutions @ D365
Introduction to Windows Operating System
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
Cybersecurity: Protecting the Digital World
Microsoft Office 365 Crack Download Free
Why Generative AI is the Future of Content, Code & Creativity?
Topaz Photo AI Crack New Download (Latest 2025)
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Computer Software and OS of computer science of grade 11.pptx
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
GSA Content Generator Crack (2025 Latest)
Cost to Outsource Software Development in 2025
iTop VPN Crack Latest Version Full Key 2025
CCleaner 6.39.11548 Crack 2025 License Key
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
AI Guide for Business Growth - Arna Softech
Visual explanation of Dijkstra's Algorithm using Python
Time Tracking Features That Teams and Organizations Actually Need

EMF-REST: Generation of RESTful APIs from Models

  • 1. Hamza Ed-douibi, Javier Luis Cánovas Izquierdo, Abel Gómez, Massimo Tisi, Jordi Cabot EMF-REST: Generation of RESTful APIs from Models 1 ACM SAC 2016 - Pisa, Italy. 07/04/2016
  • 2. EMF-REST: Generation of RESTful APIs from Models 2  The Model-driven engineering paradigm emphasizes the use of models to raise the level of abstraction and to (semi)automate the development of software. Abstraction Automation MDE Standar- dization  The Eclipse Modeling Framework (EMF) is the foundation for modeling and data integration at Eclipse. (Models are described using the Ecore language)
  • 3. EMF-REST: Generation of RESTful APIs from Models 3 Addressable resources (URI) Representation-oriented (JSON,XML) Statelessness Uniform and Constrained Interface Representational State Transfer (REST) is an architectural style that specifies constraints such as:
  • 6. EMF-REST approach  EMF-REST generates RESTful Web APIs out of EMF models.  The generated API provides a direct mapping to access data models following the REST principles : – Addressable resources (URI) – Representation-oriented (JSON,XML) – Statelessness – Uniform and Constrained Interface (HTTP verbs : GET, POST,…)  The generated application supports validation and security.  The generated RESTful Web API relies on well-known libraries and standards. 6
  • 7. EMF-REST features 7 REST API JSON Serialization XML Serialization Validation Security
  • 8. Running Example 8 IFML (Interaction Flow Modeling Language) model: A form from a movie manager
  • 9. Mapping EMF with REST EMF EMF-REST 9 Addressable resources 1. platform:/resource/project/AddMovie.xmi 2. platform:/resource/project/AddMovie.xmi#title 3. platform:/resource/project/AddMovie.xmi#//.../@viewComponentsParts.0 1. https://example.com/rest/IFMLModel/AddMovie 2. https://example.com/rest/IFMLModel/.../viewComponentsParts/title 3. https://example.com/rest/IFMLModel/.../viewComponentsParts?index=0
  • 10. Mapping EMF with REST XML JSON 10 Representation-Oriented <form> <name>AddMovieForm</name> <viewComponentParts> <simpleField> <uri>https://example.com/.../ viewComponentsParts/picture</uri> </simpleField> <simpleField> <uri>https://example.com/.../ viewComponentsParts/title</uri> </simpleField> ... </viewComponentParts> <viewElementEvents> <onSubmitEvent> <uri>https://example.com/.../ viewElementEvents/add</uri> </onSubmitEvent> </viewElementEvents> </form> { "form":{ "name":"addMovieForm", "viewComponentParts":{ "simpleField":[ { "uri":"https://.../ viewComponentsParts/picture" }, { "uri":"https://.../ viewComponentsParts/title" } ,…] }, "viewElementEvents":{ "onsubmitevent":{ "uri":"https://.../ viewelementevents/add" } } } }
  • 11. Mapping EMF with REST: Uniform and Constrained Interface & Statelessness EMF EMF-REST 11 PUT https :// example .com/rest/IFMLModel/AddMovie/ interactionFlowElements/AddMovieWindow/ viewElements /AddMovieForm {"form":{ name :"toto" } } addMovieFormObj . setName (" toto "); //addMovieFormObj is of type Form
  • 12. Extra features  Validation – Use of OCL annotations to enable validation each time the API is called  Security – Encryption: All the communications with the server are using HTTPS – Authentication: Only authenticated users are allowed to access the API – Authorization: Use of a Role-based mechanism to assign permissions for each operation. – Use of model annotations to support authentication and authorization 12
  • 13. Architecture of EMF-REST generated application 13 EMF JAX-RS EJB/CDI JAXB OCL JPA JavaScript API Browser REST Client Validation SecurityContent management Web ClientWeb Application
  • 15. Conclusion & future work  EMF-REST generates truly RESTful APIs for EMF models by mapping data models with REST principles.  EMF-REST complements the existing (Java-based) API generation facilities EMF already provides and extends them to the Web.  Future work: – Storage configuration – Configuration of the generated API – Definition of how model elements should be serialized. 15
  • 16. Thank you! 16 • Visit us at: http://som- research.uoc.edu/tools/emf-rest/ • Hamza Ed-douibi: [email protected] •Javier Cánovas: [email protected] •Jordi Cabot: [email protected]