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
Rapid REST API Development with Symfony
Search
Pawel Jedrzejewski
October 31, 2015
Technology
2
610
Rapid REST API Development with Symfony
Combining multiple tools from Symfony community to create a REST API in minutes.
Pawel Jedrzejewski
October 31, 2015
Tweet
Share
More Decks by Pawel Jedrzejewski
See All by Pawel Jedrzejewski
5 Years with Symfony
pjedrzejewski
0
350
Sylius - Decoupled eCommerce Platform
pjedrzejewski
0
380
You Should Be An Open Source Developer
pjedrzejewski
2
490
Monetyzacja oprogramowania Open Source
pjedrzejewski
0
160
Sylius - E-Commerce for Symfony2
pjedrzejewski
2
1.4k
Pierwsze kroki z Sylius E-Commerce
pjedrzejewski
0
1.5k
Sylius - E-Commerce for Symfony Developers
pjedrzejewski
4
740
Getting started with Sylius
pjedrzejewski
0
280
BDD in Open Source
pjedrzejewski
3
330
Other Decks in Technology
See All in Technology
re:Inventに行きたい いつか行きたい 行けるようにできることは?
yama3133
0
110
設計に疎いエンジニアでも始めやすいアーキテクチャドキュメント
phaya72
30
20k
AWS IAM Identity Centerによる権限設定をグラフ構造で可視化+グラフRAGへの挑戦
ykimi
2
580
なぜ新機能リリース翌日にモニタリング可能なのか? 〜リードタイム短縮とリソース問題を「自走」で改善した話〜 / data_summit_findy_Session_2
sansan_randd
1
140
The Twin Mandate of Observability
charity
1
1k
DMARCは導入したんだけど・・・現場のつぶやき 〜 BIMI?何それ美味しいの?
hirachan
1
170
サブドメインテイクオーバー事例紹介と対策について
mikit
16
7.9k
Boxを“使われる場”にする統制と自動化の仕組み
demaecan
0
220
プロダクトエンジニアとしてのマインドセットの育み方 / How to improve product engineer mindset
saka2jp
2
200
Data Engineering Guide 2025 #data_summit_findy by @Kazaneya_PR / 20251106
kazaneya
PRO
10
2k
龍昌餃子で理解するWebサーバーの並行処理モデル - 東葛.dev #9
kozy4324
1
140
GTC 2025 : 가속되고 있는 미래
inureyes
PRO
0
160
Featured
See All Featured
The Language of Interfaces
destraynor
162
25k
Rails Girls Zürich Keynote
gr2m
95
14k
Scaling GitHub
holman
463
140k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
116
20k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
[RailsConf 2023] Rails as a piece of cake
palkan
57
6k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Building Adaptive Systems
keathley
44
2.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
Unsuck your backbone
ammeep
671
58k
Transcript
None
Paweł Jędrzejewski I really like Open Source I created Sylius
I co-founded Lakion I help organize PHPers Łódź
@pjedrzejewski What does it mean to be rapid? ?
@pjedrzejewski rapid - [rap-id] - adjec7ve Moving, acGng, or occurring
with great speed.
@pjedrzejewski Every startup needs an MVP.
*Minimum Viable Product
@pjedrzejewski Many of them are unpleasantly surprised with the fact
that they need to maintain it aLer going live.
When you need to do a significant change in your
„prototype”.
None
@pjedrzejewski Time Value delivered This is not rapid.
@pjedrzejewski Time Value delivered This is rapid.
@pjedrzejewski Long-term flexibility over short-term graGficaGon from saGsfying the management
or the investors.
@pjedrzejewski What is an API? ?
@pjedrzejewski ApplicaGon Programming Interface
@pjedrzejewski SoLware-to-SoLware interfaces
Machines talking to machines… You have been warned.
Why do we need APIs? @pjedrzejewski User Your app Amazon
UI API
Why do we need APIs? @pjedrzejewski • Sharing data and
avoiding duplicaGon • Decoupling funcGonality (SRP, SeparaGon of Concerns etc.) • Allowing other people to consume our service
@pjedrzejewski What kind of APIs are out there? ?
@pjedrzejewski GET /createNewChargeV2 CrappyAPI „I\ don\’t\ want\ 2\ do\ this”!UserID:1!250!USD!
[email protected]
# With the following data sent:
@pjedrzejewski POST / HTTP/1.1 Host: xyz.com Content-Type: applicaGon/soap+xml; charset=uo-8 <?xml
version=„1.0” ?> <soap:Envelope …> <m:GetUserDetails> <m:UserID>41</m:UserID> </m:GetUserDetails> </soap:Envelope> SOAP
@pjedrzejewski GET /users/41 HTTP/1.1 Host: xyz.com Accept: applicaGon/json REST
@pjedrzejewski That being said, „REST or SOAP?” is a wrong
quesGon.
@pjedrzejewski REST is not a protocol. It is an architectural
style.
REST API Principles @pjedrzejewski Client-server architecture Stateless Cacheable Based on
standards (HTTP, URL, XML, JSON) Independent from the plaoorm and language
The Richardson Maturity Model @pjedrzejewski Level 0: Swamp of POX
Level 1: Resources Level 2: HTTP Verbs Level 3: Hypermedia Controls
Install LIONFRAME $ composer create-project lakion/lionframe @pjedrzejewski @pjedrzejewski
@pjedrzejewski DEMO
How?
@pjedrzejewski @pjedrzejewski
@pjedrzejewski @pjedrzejewski
Bundles, Bundles, Bundles @pjedrzejewski FOSRestBundle JMSSerializerBundle BazingaHateoasBundle SyliusResourceBundle
@pjedrzejewski It can be plugged into an exisGng Symfony app.
Use case: Sylius E-Commerce API Sylius API Mobile API @pjedrzejewski
User API
Extras! @pjedrzejewski FOSOAuthServerBundle FOSHzpCacheBundle SyliusRbacBundle
lakion.com/lionframe
DOCS.sylius.org - Sylius Resource Bundle
@pjedrzejewski @Sylius @Lakion pjedrzejewski.com sylius.org lakion.com THANK YOU!