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
7 Principles of Rich Web Apps
Search
Yosuke Furukawa
PRO
January 16, 2016
Programming
1
270
7 Principles of Rich Web Apps
Node学園付属小学校の基調講演で話した『リッチなウェブアプリケーションのための7つの原則』の話です。
Yosuke Furukawa
PRO
January 16, 2016
Tweet
Share
More Decks by Yosuke Furukawa
See All by Yosuke Furukawa
Welcome JSConf.jp 2024
yosuke_furukawa
PRO
0
190
tc39 x jsconf.jp Panel Discussion 2024
yosuke_furukawa
PRO
0
150
Removing Corepack
yosuke_furukawa
PRO
9
1.3k
JavaScript Runtime とはなにか
yosuke_furukawa
PRO
15
2.5k
Strip Types と Storage
yosuke_furukawa
PRO
4
340
Module Harmony について
yosuke_furukawa
PRO
3
1.5k
LTのやり方
yosuke_furukawa
PRO
16
2.2k
AppRouter Panel Talk
yosuke_furukawa
PRO
3
700
Node.js v22 で変わること
yosuke_furukawa
PRO
13
5.3k
Other Decks in Programming
See All in Programming
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
1
120
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
EMになってからチームの成果を最大化するために取り組んだこと/ Maximize team performance as EM
nashiusagi
0
100
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
290
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
360
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
15
2.3k
flutterkaigi_2024.pdf
kyoheig3
0
170
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
150
Realtime API 入門
riofujimon
0
150
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
200
Jakarta EE meets AI
ivargrimstad
0
270
Featured
See All Featured
Visualization
eitanlees
145
15k
Designing for humans not robots
tammielis
250
25k
Writing Fast Ruby
sferik
627
61k
Ruby is Unlike a Banana
tanoku
97
11k
Fireside Chat
paigeccino
34
3k
YesSQL, Process and Tooling at Scale
rocio
169
14k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Scaling GitHub
holman
458
140k
Transcript
7 principles of Rich Web Applications @yosuke_furukawa
Twitter: @yosuke_furukawa Github: yosuke-furukawa
Node.jsຊϢʔβʔάϧʔϓද io.js Evangelist / io.js Collaborator
WebApps 2016
7 principles of Rich Web Applications • socket.io ͷ࡞ऀ •
Guillermo Rauch ࢯఏএ • ༁ • http://yosuke-furukawa.hatenablog.com/entry/2014/11/14/141415
7 principles of Rich Web Applications • αʔόʔͰϖʔδΛϨϯμϦϯά͢Δ • ϢʔβʔͷೖྗʹਝʹԠ͢Δ
• σʔλͷมߋʹԠ͢Δ • αʔόʔͱͷσʔλަΛίϯτϩʔϧ͢Δ • historyΛյ͢ͳɺhistoryΛ֦ு͠Ζ • ίʔυͷߋ৽Λαʔόʔ͔ΒPush͢Δ • ৼΔ͍Λ༧ଌ͢Δ
αʔόʔͰϖʔδΛϨϯμϦ ϯά͢Δ • server side web apps vs single page
apps • ͜͏͍͏ରཱߏͰޠΒΕͯ͘Δ͜ͱ͕ଟ͍ • Α͋͘Δͷ “SEO” ͷͨΊʹαʔόʔαΠυϨ ϯμϦϯάͨ͠ํ͕͍͍ͱ͍͏ͷɻ • UXͱੑೳΛ࠷దʹ͢Δʹ྆ํΔͷ͕Ұ൪ྑ͍
αʔόʔͰϖʔδΛϨϯμϦ ϯά͢Δ
αʔόʔͰϖʔδΛϨϯμϦ ϯά͢Δ
αʔόʔͰϖʔδΛϨϯμϦ ϯά͢Δ • Ͳ͜·Ͱ͘ͳͬͯϨΠςϯγ(ߦ͔ͬͯΒ ؼͬͯ͘Δ·Ͱͷ࣌ؒ)ͱ͍͏ͷ͕͋Δ • Boston <=> Stanford ؒͳΒݱ࣌Ͱ
50ms • SPAॳظϖʔδͷϩʔυʹ͓͍ͯෆར
αʔόʔͰϖʔδΛϨϯμϦ ϯά͢Δ • SPAॳظϖʔδͷϩʔυʹ͓͍ͯෆར • ߦ͔ͬͯΒؼͬͯ͘Δ·Ͱͷ͕͔͔࣌ؒΔɻ • JSONΛड͚औͬͯϖʔδΛߏ͠ɺimage audioͳͲͷใΛΒ͏ɻɻɻ
αʔόʔͰϖʔδΛϨϯμϦ ϯά͢Δ • ͡Ό͋Ͳ͏͢Δ͔ʁ • ॳظϖʔδͷϩʔυͰαʔόʔαΠυϨϯμϦ ϯά • ͦͷޙͷߋ৽SPAͰΔ •
ϋΠϒϦουͷΞϓϩʔνͰϨΠςϯγΛ࠷খݶ ʹͯ͠ɺUXੑೳ࠷దԽ͢Δɻ
αʔόʔͰϖʔδΛϨϯμϦ ϯά͢Δ • ํ๏ʁ • isomorphic web application • universal
web apps ͰޠΒΕͯΔ • fluxibleWeb Application Frameworkͷ࣮ ͋Δɻ
ϢʔβʔͷೖྗʹਝʹԠ͢ Δ • Googleͷྫ
ϢʔβʔͷೖྗʹਝʹԠ͢ Δ • CloudUpͷྫ
ϢʔβʔͷೖྗʹਝʹԠ͢ Δ • ͲΜͳʹϨΠςϯγΛԼ͛ͯݶք͕͋Δ • ޫͷʹউͯͳ͍ • Ұ୴ΫϥΠΞϯτଆͰԠ͍ͯ͠ΔࣄΛද͢
ϢʔβʔͷೖྗʹਝʹԠ͢ Δ • ͲΜͳʹϨΠςϯγΛԼ͛ͯݶք͕͋Δ • ޫͷʹউͯͳ͍ • Ұ୴ΫϥΠΞϯτଆͰԠ͍ͯ͠ΔࣄΛද͢ • ʢ͝·͔͢ͱݴ͏ʣ
ϢʔβʔͷೖྗʹਝʹԠ͢ Δ • ͳΜΒ͔ͷԠΛࣔͯ͋͛͠Δɻ • ࠷ۙͰRAILͱ͍͏ݴ༿͋Γɺݪଇʹैͬ ͯ։ൃ͢Δࣄ͕ॏཁɻ
σʔλͷมߋʹԠ͢Δ
σʔλͷมߋʹԠ͢Δ • ߋ৽ॲཧΛߦΘ࣮ͯ͘ࡍʹσʔλΛಉظ͢ Δɻ • มߋ͕ൃੜͨ͠ΒͦͷσʔλΛมߋ͢Δɻ
σʔλͷมߋʹԠ͢Δ • ํ๏ • WebSocketͷσʔλߋ৽ݕͷΈΛ ݕ౼͢Δ
αʔόʔͱͷσʔλަΛίϯ τϩʔϧ͢Δɻ • ͖ͬ͞ͷͭʹࣅͯΔ͚Ͳͪΐͬͱҧ͏ɻ • σʔλͷߋ৽ͷࣦഊΛϋϯυϦϯά͢Δɻ • ੲPOSTʹࣦഊ͢Δͱ͜͏͍͏Τϥʔϝοηʔδ ͕ग़ͯͨɻ
αʔόʔͱͷσʔλަΛίϯ τϩʔϧ͢Δɻ • ࠓͰXHR͋Δ͠ɺWebSocketͳͲ͋ ΔɻJavaScriptͰͳΜͰϋϯυϦϯάͰ͖Δ ࣌ʹͳ͍ͬͯΔɻ • ະདྷͰServiceWorker͕͋ΓɺΦϑϥΠϯʹ ͳͬͯߋ৽͢Δ͜ͱ͕Ͱ͖Δɻ
αʔόʔͱͷσʔλަΛίϯ τϩʔϧ͢Δɻ • ํ๏ • ServiceWorker ʹΑΔόοΫάϥϯυͰͷ σʔλަ • WebSocketΛͬͨσʔλ௨৴ɾϦτϥΠ
historyΛյ͢ͳhistoryΛ֦ு ͠Α͏
historyΛյ͢ͳhistoryΛ֦ு ͠Α͏
historyΛյ͢ͳhistoryΛ֦ு ͠Α͏
historyΛյ͢ͳhistoryΛ֦ு ͠Α͏ • ํ๏ • historyͷ֦ுΛݕ౼͢Δ • history.pushState/popState/replaceState • localStorageͷݕ౼ͳͲ
ίʔυͷߋ৽Λpush͠Α͏ • Demo • http://gaearon.github.io/react-hot-loader/
ίʔυͷߋ৽Λpush͠Α͏ • ํ๏ • react hot loaderͳͲͷhot loaderͷݕ౼ • Server
push websocket ʹΑΔίʔυม ߋͷ࣮ࢪ
ৼΔ͍Λ༧ଌ͠Α͏ • ϨΠςϯγʔͷนΛ͑Ζ
ৼΔ͍Λ༧ଌ͠Α͏ • Ϣʔβʔͷಈ͖Λ༧ଌ͢Δɻ • Google Map ͷઌಡΈͷΑ͏ͳߟ͑ • ํ๏·ཱͩ֬͞Ε͍ͯͳ͍ɻɻ
·ͱΊ • αʔόʔͰϖʔδΛϨϯμϦϯά͢Δ • ϢʔβʔͷೖྗʹਝʹԠ͢Δ • σʔλͷมߋʹԠ͢Δ • αʔόʔͱͷσʔλަΛίϯτϩʔϧ͢Δ •
historyΛյ͢ͳɺhistoryΛ֦ு͠Ζ • ίʔυͷߋ৽Λαʔόʔ͔ΒPush͢Δ • ৼΔ͍Λ༧ଌ͢Δ
JavaScriptͷςΫϊϩδʔͰ΄ ΅࣮ݱͰ͖Δɻ • fluxibleͳͲͷisomorphic web application framework ͷݕ౼ • RAILͳͲͷํ๏
• WebSocket ͷػߏ • ServiceWorker ͰͷωοτϫʔΫ֦ு • historyͷ֦ு • Ϣʔβʔͷಈ͖༧ଌ