Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
R.I.P.: REST in peace! A guide through RESTful ...
Search
Robson de Almeida
December 05, 2014
Technology
140
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
R.I.P.: REST in peace! A guide through RESTful services.
I did this presentation in the #9 Superplayer Hack Sessions.
Robson de Almeida
December 05, 2014
More Decks by Robson de Almeida
See All by Robson de Almeida
The Road to Node(JS)
robsondealmeida
0
100
The MongoDB Quest - a tale of shards replicas and a lot of data
robsondealmeida
0
110
The Queue is dead! Long live the Event!
robsondealmeida
1
240
Startup for Developers: each line matters.
robsondealmeida
0
100
The Lean Startup na Prática
robsondealmeida
0
220
Other Decks in Technology
See All in Technology
OR学会2026年秋期大会_機械学習と数理最適化の融合による、配合レシピ最適化システム開発事例
brainpadpr
0
130
IoTデバイスを繋げるプロトコルMatterをAndroidで使用する方法
harutiro
0
140
ファミコンでPHPを動かす / PHP on the Famicom side b
tomzoh
0
140
Getting Started with Google Antigravity
glaforge
0
170
ビジネスを止めない技術的負債の返済のための戦略とその手法 - 技術的負債と向き合う / Complexity and Simplicity
soudai
PRO
3
690
AgentCoreで実践するハーネスエンジニアリング
yakumo
1
300
Loop Engineering これくらいでいい
mikanichinose
0
210
今こそ知りたいAmplifyGen2
mkdev10
2
160
freeeらしさをAIとともに作る / Creating the freee Experience with AI
ymrl
0
220
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
330
FOSS4Gを活用した自治体業務DXの試み
470715
0
150
SDDの運用にめげずに向き合った話
sansantech
PRO
1
140
Featured
See All Featured
Unsuck your backbone
ammeep
672
58k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
400
Into the Great Unknown - MozCon
thekraken
41
2.8k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
560
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
Crafting Experiences
bethany
1
380
Deep Space Network (abreviated)
tonyrice
0
360
Transcript
R.I.P.: REST IN PEACE! a guide through RESTful services
WHY REST ?
WHY REST ? well known concepts optimised technologies and infrastructure
lightweight approach better scale
WHAT REST DO NOT MEANS
WHAT REST DO NOT MEANS REST is NOT a framework
REST is NOT a protocol REST is NOT SOA REST is NOT Client-Server Architecture REST is NOT a URI REST is NOT API
WHAT REST MEANS ?
REST IS ABOUT STYLE
the REST creator
Roy Fielding== Roy Rosello
ROY's WORK … Architectural Styles and the Design of Network-based
Software Architectures REpresentational State Transfer is a architectural style for distributed hypermedia systems HTTP spec & Apache HTTP server
REST CONSTRAINTS
REST CONSTRAINTS CLIENT-SERVER STATELESS RESOURCES
STATELESS each request contains all of the information and cannot
take advantage of any stored context on the server session state is kept entirely on the client
RESOURCES the key abstraction of information in REST is a
resource a resource IS NOT an API or ENDPOINT or METHOD
RESOURCE IDENTIFIER Uniform Resource Identifier (URI) the key to access
the resource { protocol } : { base uri } / { resource path }
URI IS NOT an URL or URN but it covers
it uniform resource locator uniform resource name
REST APIs BEST AND WORSE PRACTICES
NOUNS, NO VERBS
NOUNS, NO VERBS Leave verbs for the HTTP verbs /playlists
/playlists/10 /getAllPlaylists /getPlaylist?id=10 /get?type=playlist&id=10 good bad
HTTP VERBS TO MEAN SOMETHING
GET /playlists GET /playlists/10 POST /playlists PUT /playlists/10 DELETE /playlists/10
HTTP VERBS TO MEAN SOMETHING
HTTP GET SHOULD NOT ALTER THE STATE
use POST, PUT and DELETE. also do not use GET
when you HAVE no choice GET /subscriptions/171/cancel // bad PUT /subscriptions/171/cancel // bad but better ... HTTP GET SHOULD NOT ALTER THE STATE
HTTP STATUS CODE
for successful requests, use 2xx status code. when the client
is wrong, use 4xx status code. for unknown errors, use 5xx status code HTTP STATUS CODE
HTTP HEADERS FOR SERIALIZATION FORMATS
Accept: application/json prefer JSON. HTTP HEADERS FOR SERIALIZATION FORMATS
VERSIONING
prefer /v1, /v2 Instead of /1.0 /v1.0 /20141201 the version
is part of the base URI VERSIONING
ERROR HANDLING
use a standard structure for error messages always identify the
error with a key/code. ERROR HANDLING
THE ZOMBIES FAMILY
THANKS speakerdeck.com/robsondealmeida /robsondealmeida /robsondealmeida