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
25
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
67
CI Joe
joelcox
0
76
Shipping products in a start-up environment
joelcox
0
69
Measuring Dependency Freshness in Software Systems
joelcox
0
120
Why you should use a MV* framework
joelcox
2
640
(Really) naive data mining
joelcox
2
660
Deploying large scale web applications
joelcox
1
270
Other Decks in Programming
See All in Programming
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.6k
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
2
440
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
1
420
AIの中の人になってみる
htkym
0
120
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
280
リアルな遅延を測る仕様
kota_yata
1
130
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
430
初めての模倣学習とVLA
natsutan
0
230
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
380
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
370
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
170
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Product Roadmaps are Hard
iamctodd
55
12k
Exploring anti-patterns in Rails
aemeredith
3
470
Joys of Absence: A Defence of Solitary Play
codingconduct
1
440
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
430
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
630
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
380
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
810
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]