Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Présentation de l'architecture REST - meetup Django Paris
Search
xordoquy
April 12, 2016
Programming
0
98
Présentation de l'architecture REST - meetup Django Paris
On parle beaucoup d'API REST, mais qu'est-ce que REST ?
xordoquy
April 12, 2016
Tweet
Share
More Decks by xordoquy
See All by xordoquy
pycon.fr 2018 - Django REST framework workshop
xordoquy
0
160
mauvaises bonnes idées pour REST
xordoquy
1
320
Authentication and Permissions with Django REST framework
xordoquy
0
150
Buildbot 0.9
xordoquy
0
94
Performances Django REST framework - DjangoCong 2016
xordoquy
0
120
Django REST framework workshop @Djangocon Europe 2015
xordoquy
0
100
Django REST framework - DjangoConG 2015
xordoquy
3
140
Django REST framework workshop - DjangoCong 2015
xordoquy
1
97
Packaging pratique (fr) - pycon.fr 2014
xordoquy
1
160
Other Decks in Programming
See All in Programming
15分間でふんわり理解するDocker @ Matsuriba MAX
ukwhatn
PRO
1
340
ISUCONってなんだか難しそう……!!でも、初めてのISUCONにPHPで挑戦してきました!
kotomin_m
1
300
App Router への移行は「改善」となり得るのか?/ Can migration to App Router be an improvement
takefumiyoshii
1
120
Migrating to Signals: A Practical Workshop
manfredsteyer
PRO
0
280
ONE WEDGE_Company_Information
1wedge
0
170
Material 3で Material 2ぽい見た目にする
numeroanddev
2
250
Dockerで始めるAWS Lambda開発
stutkhd0709
13
2.5k
object-oriented-conference-2024
fuwasegu
6
1.9k
htmx is fun!
codehex
2
190
クソコード動画『カプセル化 Mk-II』 で考える 上手くカプセル化できない理由 / encapsulation2
minodriven
11
7.8k
今の SmartHR にエンジニアで入社するとどうなるの?
daisukeshinoku
1
310
受託開発でGitLab CI を活用していく
xiombatsg
1
110
Featured
See All Featured
Done Done
chrislema
178
15k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
28
5.9k
Statistics for Hackers
jakevdp
789
220k
How to train your dragon (web standard)
notwaldorf
71
5.1k
The Cost Of JavaScript in 2023
addyosmani
13
3.7k
Building Flexible Design Systems
yeseniaperezcruz
317
37k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
219
21k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.8k
Mobile First: as difficult as doing things right
swwweet
215
8.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
10
4.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
242
12k
The Pragmatic Product Professional
lauravandoore
24
5.7k
Transcript
architecture REST Xavier Ordoquy @linovia_net
Qui connait les contraintes de REST ?
REpresentational State Transfer
Roy Fielding
Qu’est-ce que REST ?
Roy Fielding a core set of principles, properties, and constraints
that are now called REST
C’est: une boite à outils
C’est: une architecture
Ce n’est pas : un protocol
Ce n’est pas : uniquement pour HTTP
Concepts
Ressources Représentations Etats applicatifs
Ressources = Ensemble de données
Ressources Représentations Etats applicatifs
René Magritte
None
Ressources Représentations Etats applicatifs
Contraintes
• Client - Serveur • Sans état • Gestion de
cache • Interface unifiée: • identification des ressources • manipulation des ressource • message auto-porteur • hypermedia • Architecture en couche
#1 client - serveur
Séparation des responsabilités
Serveur Client
#2 sans état
Client: état applicatif Serveur: ressources
page 7 page 8 Suivant() page 6 Précédent() Client Serveur
page 7 page 8 page 6 Suivant Précédent Client Serveur
page 7 page 8 page 6
#3 Gestion du cache
Définie par la réponse
Limiter les échanges
Géré par le client ou des intermédiaires (proxy…)
#4.1 Identification des ressources
URI http://api.example.com/api/resources/ http://api.example.com/api/resources/2/ <protocole><serveur><point d’entrée><ressource><id>
http://api.example.com/api/resources/ http://api.example.com/api/client/5/resources/ ?
http://api.example.com/api/resources/ http://api.example.com/api/client/5/resources/ http://api.example.com/api/resources/?client=5
#4.2 Manipulation des ressources
• Représentation de la ressource • Metadonnées : • Format
acceptés pour les représentations • Internet Media Type (ex MIME)
#4.3 Messages auto-porteur
• Représentation de la ressource • Metadonnées : • Cache
• Format de la représentation • Internet Media Type (ex MIME)
#4.4 Hypermedia
HATEOAS Hypermedia as the Engine of Application State
Mensonges ! Le serveur contient un état !
Alternatives : IDL Documentation
#5 Architecture en couches
Client API Autorisation Métier Technique
Questions ? @linovia_net