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
62
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
360
Testando PHP na Prática - 5º Encontro de Devs PHP com Rapadura
ianrodrigues
1
65
Refactoring: porquê, quando e como
ianrodrigues
1
120
Refactoring: porque, quando e como
ianrodrigues
0
96
Other Decks in Technology
See All in Technology
Building a cloud native business on open source
lizrice
0
140
JSConf JPのwebsiteをGatsbyからNext.jsに移行した話 - Next.jsの多言語静的サイトと課題
leko
1
110
RDS の負荷が高い場合に AWS で取りうる具体策 N 連発/a-series-of-specific-countermeasures-available-on-aws-when-rds-is-under-high-load
emiki
7
4.4k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
12
81k
OpenTelemetry が拡げる Gemini CLI の可観測性
phaya72
2
970
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3k
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
8.9k
Zephyr(RTOS)にEdge AIを組み込んでみた話
iotengineer22
0
230
webpack依存からの脱却!快適フロントエンド開発をViteで実現する #vuefes
bengo4com
0
1.1k
AIとともに歩んでいくデザイナーの役割の変化
lycorptech_jp
PRO
0
720
クラウドとリアルの融合により、製造業はどう変わるのか?〜クラスメソッドの製造業への取組と共に〜
hamadakoji
0
240
MCP ✖️ Apps SDKを触ってみた
hisuzuya
0
210
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Thoughts on Productivity
jonyablonski
70
4.9k
KATA
mclloyd
PRO
32
15k
Done Done
chrislema
185
16k
Rails Girls Zürich Keynote
gr2m
95
14k
Navigating Team Friction
lara
190
15k
A Tale of Four Properties
chriscoyier
161
23k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Automating Front-end Workflow
addyosmani
1371
200k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
The Cost Of JavaScript in 2023
addyosmani
55
9.1k
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