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
Webは今まさに面白い(オフライン編)
Search
Yohei Munesada
November 27, 2014
Technology
0
1.1k
Webは今まさに面白い(オフライン編)
自分がWebについてワクワクしていることを共有したく話したLT資料です。第5回 HTML5 minutes!
https://atnd.org/events/59057
Yohei Munesada
November 27, 2014
Tweet
Share
More Decks by Yohei Munesada
See All by Yohei Munesada
G'sデータベース設計の講義
yoheimune
4
5.3k
How to create a service, How to google !
yoheimune
0
310
Machine Learning Basic and Python
yoheimune
1
520
Python Scraping and Web Apps for G's ACADEMY TOKYO
yoheimune
0
240
DevelopWorkflow and Solving Problems
yoheimune
0
450
Git and Github for Beginners
yoheimune
1
300
Data Science BOOTCAMP Practices - Recommendation
yoheimune
0
210
Data Science BOOTCAMP Practices
yoheimune
0
370
Machine Learning with Python
yoheimune
0
360
Other Decks in Technology
See All in Technology
Kubernetes における cgroup v2 でのOut-Of-Memory 問題の解決
pfn
PRO
0
210
知られざるprops命名の慣習 アクション編
uhyo
11
2.7k
KiroでGameDay開催してみよう(準備編)
yuuuuuuu168
1
150
進捗
ydah
1
190
RAID6 を楔形文字で組んで現代人を怖がらせましょう(実装編)
mimifuwa
1
320
生成AI時代に必要な価値ある意思決定を育てる「開発プロセス定義」を用いた中期戦略
kakehashi
PRO
1
110
プロダクトの成長に合わせたアーキテクチャの段階的進化と成長痛、そして、ユニットエコノミクスの最適化
kakehashi
PRO
1
100
KINTO FACTORYから学ぶ生成AI活用戦略
kintotechdev
0
120
Yahoo!広告ビジネス基盤におけるバックエンド開発
lycorptech_jp
PRO
1
300
新卒(ほぼ)専業Kagglerという選択肢
nocchi1
1
2.5k
そのコンポーネント、サーバー?クライアント?App Router開発のモヤモヤを可視化する補助輪
makotot
4
750
モダンな現場と従来型の組織——そこに生じる "不整合" を解消してこそチームがパフォーマンスを発揮できる / Team-oriented Organization Design 20250825
mtx2s
6
35k
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
Docker and Python
trallard
45
3.5k
Art, The Web, and Tiny UX
lynnandtonic
302
21k
GraphQLとの向き合い方2022年版
quramy
49
14k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
How to Ace a Technical Interview
jacobian
279
23k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Faster Mobile Websites
deanohume
309
31k
How to Think Like a Performance Engineer
csswizardry
26
1.8k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Transcript
8FCࠓ·͞ʹ໘ന͍ ΦϑϥΠϯฤ फఆ༸ฏ @yoheiMune ג αΠόʔΤʔδΣϯτ
What is the weakness of the Web?
Weakness of the Web ✓ Slow Speed දࣔը໘ͷସɺϓϩάϥϜͷ࣮ߦͳͲ ✓ JavaScript
Poor Functions MapSetͱ͍ͬͨجຊతͳίϨΫγϣϯαϙʔτ͍ͯ͠ͳ͍ ✓ Restricted functionality ిΧϝϥϚΠΫͳͲ͑ͳ͍ػೳ͕·ͩ·ͩଟ͍ ✓ etc
Weakness of the Web ✓ Slow Speed දࣔը໘ͷସɺϓϩάϥϜͷ࣮ߦͳͲ ✓ JavaScript
Poor Functions MapSetͱ͍ͬͨجຊతͳίϨΫγϣϯαϙʔτ͍ͯ͠ͳ͍ ✓ Restricted functionality ిΧϝϥϚΠΫͳͲ͑ͳ͍ػೳ͕·ͩ·ͩଟ͍ ✓ etc
Web Apps are Slow
Web Apps are Slower
Web Apps are Slower than Native Apps
Why is the web slow?
Why is the web slow? Let’s focus on networking
Reason of slow web http://yoheim.net/index.html ͔ΒσʔλΛऔಘ͢Δ߹Λߟ͑Δ
Step1: DNS Lookup DNS Server What is “yoheim.net” ? 182.48.49.53
Progress
Step2: 3-way Handshake 182.48.49.53 (yoheim.net) ଓ͍͍ͯ͠ʁ OK ͡Ό͋ΑΖ͘͠! Progress
Step3: Content Download yoheim.net GET /index.html Download Progress
Step4: Code Execution yoheim.net Progress )5.-ͷղੳͱ࣮ߦ
Reason of slow web DNS Lookup 3-way handshake Content Download
Execution ϑΝΠϧ࣮ߦ͢Δʹͳ͔ͳ͔େมʂʂ
Reason of slow web html css javascript image 4MPX
͠ΦϑϥΠϯػೳΛ͑
Online vs Offline Online Offline ͱͬͯ͘ͳΔͧʂ
Available Offline Functionality ✓ HTML5 App Cacheʢ2008ʙʣ ✓ LocalStorage /
SessionStorageʢ2009ʙʣ ✓ Navigator.onLine ✓ etc
HTML5 App Cache ✓ ϚχϑΣετϑΝΠϧΛॻ͚͑ͯ؆୯ CACHE MANIFEST # Time: Thu
Oct 02 2014 20:10:16 GMT+0900 (JST) CACHE: js/all.js css/all.css NETWORK: * manifest.appcache
HTML5 App Cache But…
Problems of HTML5 App Cache ✓ Ωϟογϡཧ͕ϒϥβͤ ✓ ్தͰΤϥʔ͕ى͖ͨ࣌ʹͲ͏͢Ε͍͍ͷ͔… ✓
indexϑΝΠϧ͕ඞͣΩϟογϡ͞ΕΔ
Service Worker is coming!
About Service Worker ✓ JavaScriptΛ༻͍ͨΩϟογϡίϯτϩʔϧ ✓ ։ൃऀ͕͖Ίࡉ͔ͳΩϟογϡཧ͕Ͱ͖Δ ✓ ϝΠϯεϨουҎ֎Ͱಈ࡞͢Δ
Register - Service Worker navigator .serviceWorker.register('/sw.js', { scope: '/' }).then(function(sw)
{ console.log('ॲཧޭ'); }).catch(function(error) { console.log('ॲཧࣦഊ'); });
Install - Service Worker this.addEventListener('install', function(event) { event.waitUntil( caches.create('v1').then(function(cache) {
return cache.add( '/index.html', '/style.css', '/app.js', '/img/logo.svg' ); }) ); });
Use Cache - Service Worker this .addEventListener('fetch', function(event){ event.respondWith( caches.match(event.request);
); });
Service Worker is difficult, but magic!
Available Offline Functionality ✓ HTML5 App Cacheʢ2008ʙʣ ✓ LocalStorage /
SessionStorageʢ2009ʙʣ ✓ Navigation.onLine ✓ Service Workerʢ2014ʙʣ
And more…
Weakness of the Web ✓ Slow Speed දࣔը໘ͷସɺϓϩάϥϜͷ࣮ߦͳͲ ✓ JavaScript
Poor Functions MapSetͱ͍ͬͨجຊతͳίϨΫγϣϯαϙʔτ͍ͯ͠ͳ͍ ✓ Restricted functionality ిΧϝϥϚΠΫͳͲ͑ͳ͍ػೳ͕·ͩ·ͩଟ͍ ✓ etc ΦϑϥΠϯ +BWB4DSJQUΤϯ δϯͷੑೳ61 8FC(- &$."4DSJQU 8FC $PNQPOFOUT $P⒎FF4DSJQU "VEJP7JEFP .FEJB$BQUVSF 8FC4QFFDI "1*
Weakness of the Web ✓ Slow Speed දࣔը໘ͷସɺϓϩάϥϜͷ࣮ߦͳͲ ✓ JavaScript
Poor Functions MapSetͱ͍ͬͨجຊతͳίϨΫγϣϯαϙʔτ͍ͯ͠ͳ͍ ✓ Restricted functionality ిΧϝϥϚΠΫͳͲ͑ͳ͍ػೳ͕·ͩ·ͩଟ͍ ✓ etc ΦϑϥΠϯ +BWB4DSJQUΤϯ δϯͷੑೳ61 8FC(- &$."4DSJQU 8FC $PNQPOFOUT $P⒎FF4DSJQU "VEJP7JEFP .FEJB$BQUVSF 8FC4QFFDI "1* 8FCࠓ·͞ʹਐԽ͍ͯͯ͠໘ന͍ʂ
ະདྷ࡞Δ͜ͱ͕Ͱ͖Δ ✓ Join to Github / Publish your code Polymer,
jQuery, Angular, … ✓ Join to Mailing List Service Worker, … ✓ Join to User Group HTML5j, Angular, ….
ະདྷ࡞Δ͜ͱ͕Ͱ͖Δ ✓ Join to Github / Publish your code Polymer,
jQuery, Angular, … ✓ Join to Mailing List Service Worker, … ✓ Join to User Group HTML5j, Angular, …. ຊ͔Βٕज़Λਐา͍ͤͨ͞
http://github.com/yoheiMune http://www.yoheim.net http://twitter.com/yoheiMune Thank you