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
Battle tested API design - Laracon EU Online
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Johannes Pichler
May 20, 2020
Programming
91
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Battle tested API design - Laracon EU Online
Johannes Pichler
May 20, 2020
More Decks by Johannes Pichler
See All by Johannes Pichler
Crafting Elegant APIs with Laravel
fetzi
0
23
Crafting Elegant APIs with Laravel
fetzi
0
160
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
93
Battle tested API design
fetzi
0
99
Mastering CLIs
fetzi
0
64
(Understanding) OAuth2
fetzi
0
240
Decouple Everything
fetzi
0
220
Go Basics Workshop
fetzi
1
87
Getting more out of Git (german)
fetzi
0
78
Other Decks in Programming
See All in Programming
Lessons from Spec-Driven Development
simas
PRO
0
150
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
A2UI という光を覗いてみる
satohjohn
1
120
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
250
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.6k
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.6k
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
200
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
net-httpのHTTP/2対応について
naruse
0
470
Swiftのレキシカルスコープ管理
kntkymt
0
220
CSC307 Lecture 17
javiergs
PRO
0
320
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
210
Evolving SEO for Evolving Search Engines
ryanjones
0
210
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.7k
Designing Experiences People Love
moore
143
24k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
150
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
390
Are puppies a ranking factor?
jonoalderson
1
3.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
How GitHub (no longer) Works
holman
316
150k
Documentation Writing (for coders)
carmenintech
77
5.4k
Transcript
Ba#le tested API design Laracon EU Online 2020
Johannes Pichler • Web Developer since 2006 • PHP, .NET,
Java • working @ karriere.at
Agenda • API design • Implemen/ng an API in Laravel
None
API Design
Steps for building your API Design • Requirements & Planning
• Implementa4on • Verifica4on & Maintenance
Requirements & Planning
Consider the client(s)
Rou$ng • based on resources • use standard HTTP methods
• be as explicit as possible
Rou$ng GET: /todos GET: /todos/{id} POST: /todos PUT: /todos/{id} DELETE:
/todos/{id}
Rou$ng - API Versioning • frequency of endpoint changes •
handling of breaking changes • use seman8c versioning • use only major version in URLs
Response format • no custom response format • use a
defined standard • JSON:API • HAL
Authoriza*on • use specific client tokens • add access tokens
for sensi3ve endpoints
API Specifica,on • use an API client like Stoplight Studio
or Postman • define your endpoints with edge cases • make your specifica;on testable
Implemen'ng an API in Laravel
Verifica(on & Maintenance
Verifica(on • it's all about metrics • have useful error
logging in place • verify your assump7ons during development
Maintenance • be careful with breaking changes • s3ck to
seman3c versioning • keep your API specifica3on up to date
Summary
Resources • h#ps:/ /github.com/fetzi/laracon-api-design • h#ps:/ /jsonapi.org/
THANKS @fetzi_io