Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Building APIs with Lumen
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ian Rodrigues
December 17, 2016
Technology
74
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Building APIs with Lumen
Ian Rodrigues
December 17, 2016
Transcript
29 slides
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
More Decks by Ian Rodrigues
See All by Ian Rodrigues
Trabalhando com Value Objects no PHP
ianrodrigues
0
420
Testando PHP na Prática - 5º Encontro de Devs PHP com Rapadura
ianrodrigues
1
79
Refactoring: porquê, quando e como
ianrodrigues
1
150
Refactoring: porque, quando e como
ianrodrigues
0
120
Other Decks in Technology
See All in Technology
競馬予想をAIでやってみた話
yoshimura_datam
0
150
AI-DLCでソフトウェア開発の速さは 上がったのか?
rfdnxbro
0
190
エンタープライズIAMについて - ID・権限をどう統制するか
oidfj
1
360
データ界隈LT祭の運営のふりかえり
yoshimura_datam
0
110
AIが学べる子供の夏休みの自由研究教材を作ったが空振りだった話
yoshimura_datam
0
120
一口馬主の募集馬をAIで診断してみた
yoshimura_datam
0
110
PR 生成AIガバナンスの全体像がわかる本
yoshimura_datam
0
120
不具合データを用いたプロダクトコードの弱点可視化
tarappo
4
120
データから見る AI時代のエンジニア転職と採用
junya_okura
4
1.4k
Kiro Enterprise Management: 管理者が 1 か所で決め、全員の Kiro に届ける
inariku
PRO
1
170
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
4
2.2k
フロントエンドのテストカバレッジは 100%強制がいい
bengo4com
7
3.9k
Featured
See All Featured
Code Review Best Practice
trishagee
74
20k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Abbi's Birthday
coloredviolet
5
11k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.5k
Context Engineering - Making Every Token Count
addyosmani
9
1.3k
The Invisible Side of Design
smashingmag
301
52k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
370
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Ethics towards AI in product and experience design
skipperchong
2
470
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k