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
Johannes Pichler
May 20, 2020
Programming
0
83
Battle tested API design - Laracon EU Online
Johannes Pichler
May 20, 2020
Tweet
Share
More Decks by Johannes Pichler
See All by Johannes Pichler
Crafting Elegant APIs with Laravel
fetzi
0
120
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
80
Battle tested API design
fetzi
0
89
Mastering CLIs
fetzi
0
49
(Understanding) OAuth2
fetzi
0
220
Decouple Everything
fetzi
0
210
Go Basics Workshop
fetzi
1
76
Getting more out of Git (german)
fetzi
0
68
Go for PHP devs
fetzi
3
110
Other Decks in Programming
See All in Programming
After go func(): Goroutines Through a Beginner’s Eye
97vaibhav
0
380
技術的負債の正体を知って向き合う / Facing Technical Debt
irof
0
170
非同期jobをtransaction内で 呼ぶなよ!絶対に呼ぶなよ!
alstrocrack
0
860
Cursorハンズオン実践!
eltociear
2
1k
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
1k
チームの境界をブチ抜いていけ
tokai235
0
170
Software Architecture
hschwentner
6
2.3k
Leading Effective Engineering Teams in the AI Era
addyosmani
3
350
株式会社 Sun terras カンパニーデック
sunterras
0
290
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.3k
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
580
育てるアーキテクチャ:戦い抜くPythonマイクロサービスの設計と進化戦略
fujidomoe
1
170
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Rails Girls Zürich Keynote
gr2m
95
14k
Into the Great Unknown - MozCon
thekraken
40
2.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
4 Signs Your Business is Dying
shpigford
185
22k
Become a Pro
speakerdeck
PRO
29
5.5k
The Pragmatic Product Professional
lauravandoore
36
6.9k
We Have a Design System, Now What?
morganepeng
53
7.8k
Scaling GitHub
holman
463
140k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
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