restful, resource-oriented architectures: a model-driven approach sandy pérez 1, frederico durao 2,...
TRANSCRIPT
![Page 1: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/1.jpg)
RESTful, Resource-Oriented Architectures: a Model-Driven Approach
Sandy Pérez1, Frederico Durao2, Santiago Meliá3, Peter Dolog2, Oscar Díaz1
1st International Symposium on Web Intelligent Systems & ServicesDecember 12th, 2010
![Page 2: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/2.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz
MODEL DRIVEN DEVELOPMENT
![Page 3: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/3.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz
Model Driven Development
![Page 4: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/4.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz 4
Data-intensive Web Applications
Data-intensive Web applications are built around the so-called “Domain Model”
This Domain Model is then complemented with other models that capture additional perspectives of the applications:
• Navigational Model• Presentation Model• Architectural Model
![Page 5: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/5.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz 5
Domain model
The Domain Model captures the main entities and relationships found in the application domain.
![Page 6: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/6.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz
Navigational Model
It specifies the data to be presented as a view of the Domain Model, and the order in which this data is to be presented
6
![Page 7: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/7.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz 7
Architectural Model
It is a component-based architectural style that represents a structural view of the application
![Page 8: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/8.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz 8
From Navigational Model to Architectural Model
client
server
![Page 9: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/9.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz
NEW ARQUITECTURAL STYLE: REST
![Page 10: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/10.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz 10
REST is becoming very popular
![Page 11: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/11.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz
Platform Evolution: REST
Order PSMREST
![Page 12: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/12.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz
GET /users HTTP/1.1
12
RESTful, Resource-Oriented Architectures (ROAs) ROA is a specific set of guidelines of an implementation of the
REST-style architecture.
ROAs are based on four concepts:• Resources
• Their names (URIs). The URI is the name and address of a resource.
• Their representations. A resource is a source of representations.
• The links between them.
Client Serverfriends
![Page 13: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/13.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz 13
RESTful Web Services
RESTful Web services are simple Web services implemented using HTTP and the principles of REST.
They expose standard HTTP objects (i.e. resources) that respond to one or more of the six standard HTTP methods: GET, HEAD, POST, PUT, DELETE, and OPTIONS.
Client Server
GET /users HTTP/1.1users
![Page 14: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/14.jpg)
Problem Statement
![Page 15: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/15.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz
Can RESTful services be generated?
Order PSMREST
![Page 16: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/16.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz 16
From a RPC façade to a RESTful facade
client
server
GETHEADPUTPOSTDELETEOPTIONS
How?
![Page 17: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/17.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz 17
The Architectural Model in Details
GETHEADPUTPOSTDELETEOPTIONS
![Page 18: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/18.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz 18
Resources + URIs + OperationType + Parameters
![Page 19: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/19.jpg)
Contribution
Application Facade Component Model
![Page 20: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/20.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz
Obtaining RESTful interfaces from PIM
Order PSMREST
![Page 21: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/21.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz
…any NavigationalClass with at least one outgoing traversal link or service link at the Navigational Model.
Resource are obtained from …
![Page 22: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/22.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz 22
URIs are obtained from …
![Page 23: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/23.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz
+
Operation Types are obtained from …
![Page 24: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/24.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz 24
Representations: JSON By Default
![Page 25: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/25.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz
1. Path
2. Link stereotypes
Parameters are obtained from …
![Page 26: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/26.jpg)
Conclusions
![Page 27: RESTful, Resource-Oriented Architectures: a Model-Driven Approach Sandy Pérez 1, Frederico Durao 2, Santiago Meliá 3, Peter Dolog 2, Oscar Díaz 1 1st International](https://reader035.vdocument.in/reader035/viewer/2022062511/5516c1b9550346f6208b587d/html5/thumbnails/27.jpg)
S. Pérez, F. Durao, S. Meliá, P. Dolog & O. Díaz 27
Conclusions
Data-intensive Web Applications naturally match the REST architectural style
(Part of) the RESTful interface can be derived from the Domain & Navigation model
• Except:– the representation type: JSON by default– the operation type (delete, post): it should be annotated by
the designer