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
Creating rich universal React apps powered by R...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Akihito Koriyama
September 30, 2017
Technology
1
8.1k
Creating rich universal React apps powered by RESTful PHP
phpnw17 unconf session
See more about BEAR.Sunday
http://bearsunday.github.io
Akihito Koriyama
September 30, 2017
Tweet
Share
More Decks by Akihito Koriyama
See All by Akihito Koriyama
BEAR.Sunday Framework Masterclass
koriym
0
30
Be Framework: 生命システムとしての存在理解
koriym
0
81
新世界の理解
koriym
0
200
AI Centric
koriym
0
470
app-state-diagram
koriym
0
120
OOP, Double Dispatch and Visitor Pattern
koriym
3
180
BEAR.Sunday 2014-2024
koriym
0
83
イベント駆動コンテンツ (a.k.a Webアプリケーションの効率を再定義するBEAR.Sundayの分散キャッシングフレームワーク)
koriym
5
9.3k
Unconf: RWA読書会
koriym
0
650
Other Decks in Technology
See All in Technology
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
220
AI駆動開発を事業のコアに置く
tasukuonizawa
1
1.3k
22nd ACRi Webinar - NTT Kawahara-san's slide
nao_sumikawa
0
130
ランサムウェア対策としてのpnpm導入のススメ
ishikawa_satoru
0
290
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
1
240
猫でもわかるKiro CLI(セキュリティ編)
kentapapa
1
190
横断SREがSRE社内留学制度 / Enablingになぜ踏み切ったのか
rvirus0817
0
180
生成AIで始める業務改革 - 製造業編 in 福島 -
daikikanemitsu
2
470
Webhook best practices for rock solid and resilient deployments
glaforge
2
340
20260208_第66回 コンピュータビジョン勉強会
keiichiito1978
0
230
Oracle AI Database移行・アップグレード勉強会 - RAT活用編
oracle4engineer
PRO
0
140
OpenShiftでllm-dを動かそう!
jpishikawa
0
190
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
440
Building the Perfect Custom Keyboard
takai
2
690
The World Runs on Bad Software
bkeepers
PRO
72
12k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
210
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
130
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
600
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Marketing to machines
jonoalderson
1
4.9k
The SEO Collaboration Effect
kristinabergwall1
0
360
Transcript
Creating rich universal React apps powered by RESTful PHP Akihito
Koriyama (@koriym) phpnw17 12.00 @ Manchester Conference Centre
None
None
GET /menu
None
8FC
$POTPMF
GET /menu .. 200 OK Then ?
IUUQTFOXJLJQFEJBPSHXJLJ"⒎PSEBODF
no affordance 8IBUJTUIFQPTTJCJMJUZPGUIFBDUJPO
None
None
rel=“order” ! *U`TUIFQPTTJCJMJUZPGUIFBDUJPOz
/order but how ?
None
OPTIONS /order
None
(FOFSBUFGSPNQIQEPD
POST /order?name=latte ☕
None
GET /order?id=123
None
OPTIONS /payment
PUT: the payment should be idempotent
IUUQTXXXJOGPRDPNKQBSUJDMFTXFCCFSSFTUXPSLqPX Resource interface for state machine URI as a state
" " "
None
CURIEs (Compact URI) IUUQTFOXJLJQFEJBPSHXJLJ$63*&
GET rels/?rel=todo
None
201 POST /order/?name=latte 200 PUT /payment?order_id&card_num=123&expire=101018 URIs as an event
source BQQMJDBUJPOSFTPVSDFMPH
Hypermedia API
= REST API
None
REST != CRUD over HTTP
REST != Return JSON with pretty URI
REST should be hypermedia driven
Hypermedia Driven Development
None
IUUQTXXXXPSHJOUFHSBUJPOXPSLTIPQQIZQFSNFEJBPSJFOUFEEFTJHOQEG
IUUQTXXXJOGPRDPNKQBSUJDMFTXFCCFSSFTUXPSLqPX
IUUQKTPOTDIFNBPSH
JOQVUWBMJEBUJPO
None
Backend Frontend
REST API • Discoverable • Self Descriptive • Hypermedia constraint
Separation of Responsibilities
200 GET / Get the link of APIs 200
OPTIONS /todo Get the communication options available 201 POST /todo?title=run Create new resource and get the URI of new resource in location header 200 GET /todo?id=1 Get the created resource = headless application REST App
Headless REST application / CMS + template engine =
HTML application
Headless REST application / CMS + JS UI application
= ?
None
SSR (Sever Side Rendering)
None
None
None
None
$MJFOU4JEF3FOEFSJOH 4FSWFS4JEF3FOEFSJOH
$43 443
4FSWFS4JEF
1)13&45"QQ +46*"QQ
None
PHP First Rich UI App • PHP - Routing
- Application logic - Domain logic • JS (SSR + CSR) - View logic - UI logic
Benefit • Performance + Caching • HTTP Status Code, Header
• HTML Header (OGP / Twitter card) • SEO • Only when needed
SSR Performance
None
IUUQTUFTJFHJUIVCJPTOBQTIPUQFSGPSNBODF
7KT 4PVSDF$PEF 7KT *OUFSOBM 4OBQTIPU &YUFSOBM 4OBQTIPU /P 4OBQTIPU TOBQTIPU
+4MJCSBSJFT 3FBDUBQQ 4OBQTIPU 7KT
IUUQTHJUIVCDPNLPSJZN,PSJZN#BSBDPB JOEFYKT #BSBDPB 5XJH A framework agnostic SSR interface
Other REST Oriented Framework
BEAR.Sunday • “Everything is a resource” • 100% DI, Multi
application at once • No BC break
@koriym Thanks @BEARSunday