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
Pixelpillow College Tour - HTTP APIs
Search
Joël Cox
October 18, 2023
Programming
27
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
68
CI Joe
joelcox
0
77
Shipping products in a start-up environment
joelcox
0
71
Measuring Dependency Freshness in Software Systems
joelcox
0
130
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駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
790
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
590
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.8k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
280
新卒PdEのリアル
ryu1013
1
490
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
110
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
130
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
220
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
120
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
700
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
370
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
6.3k
Featured
See All Featured
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
202
76k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
310
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.7k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
450
Building the Perfect Custom Keyboard
takai
2
870
Statistics for Hackers
jakevdp
799
230k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
520
So, you think you're a good person
axbom
PRO
2
2.1k
Deep Space Network (abreviated)
tonyrice
0
300
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
How STYLIGHT went responsive
nonsquared
100
6.3k
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]