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
Building APIs with Lumen
Search
Ian Rodrigues
December 17, 2016
Technology
0
56
Building APIs with Lumen
Ian Rodrigues
December 17, 2016
Tweet
Share
More Decks by Ian Rodrigues
See All by Ian Rodrigues
Trabalhando com Value Objects no PHP
ianrodrigues
0
240
Testando PHP na Prática - 5º Encontro de Devs PHP com Rapadura
ianrodrigues
1
53
Refactoring: porquê, quando e como
ianrodrigues
1
120
Refactoring: porque, quando e como
ianrodrigues
0
87
Other Decks in Technology
See All in Technology
サービスメッシュ環境における OpenTelemetry 活用 / OpenTelemetry in Service Mesh
k6s4i53rx
2
860
GraphQLに入門してみた
chiroruxx
2
130
HoneycombとOpenTelemetryでオブザーバビリティに入門してみる
sumiren
2
160
暗黙知を集積するプラットフォーム : 「健常者エミュレータ事例集」の取り組み
sora32127
1
170
これまでのキャリアとこれからMLエンジニアとしてどう動くか
masatakashiwagi
1
640
オブジェクトのおしゃべり大失敗 メッセージングアンチパターン集 / messaging anti-pattern collection
ytake
0
340
Cloud Friendly(?) Jenkins. How we failed to make Jenkins cloud native and what we learned?
onenashev
PRO
0
110
技術広報として2023年度に頑張ったこと / What we did well in FY2023 as a DevRel
pauli
5
490
現実世界の事象から学ぶSOLID原則
h0r15h0
25
10k
中央集権体制からDataOpsへの転換 / centralized-to-dataops-transformation
pei0804
7
1.6k
エバンジェリスト活動を7年やってきて見えてきた、コミュニティとエバンジェリストの関係
soracom
PRO
1
200
初心者が行く!サーバレスWebアプリ開発の道
nagaharutogawa
0
450
Featured
See All Featured
Making Projects Easy
brettharned
106
5.4k
Teambox: Starting and Learning
jrom
126
8.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
644
57k
Optimising Largest Contentful Paint
csswizardry
7
2.3k
Creatively Recalculating Your Daily Design Routine
revolveconf
209
11k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
101
6.6k
Faster Mobile Websites
deanohume
296
30k
Web Components: a chance to create the future
zenorocha
304
41k
Practical Orchestrator
shlominoach
180
9.7k
Ruby is Unlike a Banana
tanoku
95
10k
The Invisible Customer
myddelton
114
12k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
240
1.2M
Transcript
BUILDING APIs WITH LUMEN Ian Rodrigues - @ianrodriguesbr Darkmira Tour
Community & PHP com Rapadura 2016
WHO AM I? IAN RODRIGUES - Since 2009 - Laravel/Lumen
- Clean Code & TDD - Hypnologist on spare time - @ianrodriguesbr
ianrodriguesbr.github.io
ABOUT LUMEN - Micro Framework - Released on April 2015
- Comes from Laravel - http://lumen.laravel.com
WHAT IS AN API?
RESTful APIs REpresentational State Transfer Resources HTTP Verbs - GET
- POST - PUT - DELETE Universal Syntax
RESTful APIs REpresentational State Transfer Resources HTTP Verbs - GET
- POST - PUT - DELETE Universal Syntax
RESTful APIs REpresentational State Transfer Resources HTTP Verbs - GET
- POST - PUT - DELETE Universal Syntax
RESTful APIs REpresentational State Transfer Resources HTTP Verbs - GET
- POST - PUT - DELETE Universal Syntax
RESTful APIs GET POST GET PUT DELETE /users /users /users/1
/users/1 /users/1
RESTful APIs GET POST GET PUT DELETE /users /users /users/1
/users/1 /users/1
RESTful APIs GET POST GET PUT DELETE /users /users /users/1
/users/1 /users/1
404 - Not Found
WHY LUMEN?
Why Lumen? Less Configuration Comes from Laravel Easy to Test
Too Fast
Why Lumen? Less Configuration Comes from Laravel Easy to Test
Too Fast
Why Lumen? Less Configuration Comes from Laravel Easy to Test
Too Fast
Why Lumen? Less Configuration Comes from Laravel Easy to Test
Too Fast
REALY TOO FAST
Benchmarking Silex Slim 3 Lumen 1000 1800 1900 Requests per
Second
~$ lumen new book-store Crafting application... Application ready! Build something
amazing.
// bootstrap/app.php $app->withFacades(); $app->withEloquent();
~/book-store $ phpunit OK (1 test, 1 assertion)
GET /books - Get all Books POST /books - Create
a new Book GET /books/{id} - Get a Book PUT /books/{id} - Update a Book DELETE /books/{id} - Delete a Book
TALK IS CHEAP. SHOW ME THE CODE, BITCH!
USEFUL TOOLS!
Useful Tools Postman - Chrome Extension HTTPie - CLI HTTP
Client
Resources Laravel & Lumen Docs - https://lumen.laravel.com/docs/5.3 Paul Redmond’s Book
- http://www.apress.com/gp/book/9781484221860 Phil Sturgeon’s Book - https://apisyouwonthate.com/
THANK YOU! Ian Rodrigues - @ianrodriguesbr Darkmira Tour Community &
PHP com Rapadura 2016