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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ian Rodrigues
December 17, 2016
Technology
0
63
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
380
Testando PHP na Prática - 5º Encontro de Devs PHP com Rapadura
ianrodrigues
1
69
Refactoring: porquê, quando e como
ianrodrigues
1
130
Refactoring: porque, quando e como
ianrodrigues
0
97
Other Decks in Technology
See All in Technology
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.4k
データの整合性を保ちたいだけなんだ
shoheimitani
8
3.2k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
670
Red Hat OpenStack Services on OpenShift
tamemiya
0
120
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
580
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
140
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
600
【Oracle Cloud ウェビナー】[Oracle AI Database + AWS] Oracle Database@AWSで広がるクラウドの新たな選択肢とAI時代のデータ戦略
oracle4engineer
PRO
2
170
20260204_Midosuji_Tech
takuyay0ne
1
160
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
190
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
How to make the Groovebox
asonas
2
1.9k
Evolving SEO for Evolving Search Engines
ryanjones
0
130
Being A Developer After 40
akosma
91
590k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Site-Speed That Sticks
csswizardry
13
1.1k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
330
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Google's AI Overviews - The New Search
badams
0
910
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
Become a Pro
speakerdeck
PRO
31
5.8k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
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