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
Pixelpillow College Tour - HTTP APIs
Search
Joël Cox
October 18, 2023
Programming
22
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pixelpillow College Tour - HTTP APIs
Joël Cox
October 18, 2023
More Decks by Joël Cox
See All by Joël Cox
Pixelpillow College Tour - Call me Maybe
joelcox
0
36
Pixelpillow College Tour - Grafen, automaten en reguliere talen
joelcox
0
66
CI Joe
joelcox
0
76
Shipping products in a start-up environment
joelcox
0
67
Measuring Dependency Freshness in Software Systems
joelcox
0
120
Why you should use a MV* framework
joelcox
2
630
(Really) naive data mining
joelcox
2
650
Deploying large scale web applications
joelcox
1
270
Other Decks in Programming
See All in Programming
初めてのKubernetes 本番運用でハマった話
oku053
0
120
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
200
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
300
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
240
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
370
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
220
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
8.8k
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
130
スマートグラスで並列バイブコーディング
hyshu
0
280
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
130
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
The Invisible Side of Design
smashingmag
301
52k
How to make the Groovebox
asonas
2
2.3k
How GitHub (no longer) Works
holman
316
150k
Discover your Explorer Soul
emna__ayadi
2
1.2k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
900
How to build a perfect <img>
jonoalderson
1
5.8k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
180
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Evolving SEO for Evolving Search Engines
ryanjones
0
240
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
800
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
610
Transcript
Pixelpillow College Tour HTTP APIs
Waaaa tt t?!?! • HTTP als protocol. • Een communica
ti elaag tussen twee system.
HTTP is een… • URL – h tt ps://google.com/search?q=lmgt fy
• Methode – POST, PATH, DELETE • Headers – Content-Type: “applica ti on/json” • Body – { “foo”: “bar” } • Status code – 200 OK
Maar zegt niks over… • Structuur (zoals paden) • Transport
(HTML, XML, JSON, etc.)
Dus: smaakjes! • SOAP • RESTful • JSON-API • GraphQL
SOAP
SOAP
RESTful Stateless – Geen afhankelijkheden tussen opvolgende requests. Decoupled –
Geen aannames over gebruik door een client. Cacheable – En dus snel Uniform – Voorspelbaar!
RESTful requests GET /api/posts ! 200 OK POST /api/posts !
201 Created GET /api/posts/1 ! 200 OK PATCH /api/posts/12 ! 200 OK DELETE /api/posts/12 ! 410 Gone
RESTful is niet genoeg… Geen standaard, slechts principes 👎 Geen
ondersteuning voor “ac ti es” 🤔 Rela ti onele data is las ti g. 😭
JSON-API: Best of REST Een standaard! Vanuit de prak ti
jk ( fi lters, meta data, etc.) Rela ti es via links en included
{ "data": [ { "type": "articles", "id": "1", "attributes": {
“title": "JSON:API paints my bikeshed!" }, "relationships": { "author": { "links": { "self": "http://example.com/articles/1/relationships/author", "related": "http://example.com/articles/1/author" }, "data": { "type": "people", "id": "9" } }, "comments": { "links": { "self": "http://example.com/articles/1/relationships/comments", "related": "http://example.com/articles/1/comments" }, "data": [ { "type": "comments", "id": "5" }, { "type": "comments", "id": "12" } ] } }, "links": { "self": "http://example.com/articles/1" } }], "included": [{ "type": "people", "id": "9", "attributes": { "firstName": "Dan", "lastName": "Gebhardt", "twitter": "dgeb" },
{ "data": [ { "type": "articles", "id": "1", "attributes": {
"title": "JSON:API paints my bikeshed!" }, "relationships": { "author": { "links": { "self": "http://example.com/articles/1/relationships/author", "related": "http://example.com/articles/1/author" }, "data": { "type": "people", "id": "9" } }, "comments": { "links": { "self": "http://example.com/articles/1/relationships/comments", "related": "http://example.com/articles/1/comments" }, "data": [ { "type": "comments", "id": "5" }, { "type": "comments", "id": "12" } ] } }, "links": { "self": "http://example.com/articles/1" } }], "included": [{ "type": "people", "id": "9", "attributes": { "firstName": "Dan", "lastName": "Gebhardt", "twitter": "dgeb" },
JSON:API hee ft geen… Geen ondersteuning voor “ac ti es”
🤔 (bijv. het favoriten van een resource) Is niet self-documen ti ng… 📚
GraphQL Alles is een graaf™ Mutations en Queries
GraphQL Playground!!! https://www.apollographql.com/docs/apollo-server/v2/testing/graphql-playground/
Can’t have your cake and eat it too. Paradigma sluit
niet aan bij onze manier van backends bouwen.
Vragen? 038 750 3491
[email protected]