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.1k
How to create a service, How to google !
yoheimune
0
270
Machine Learning Basic and Python
yoheimune
1
460
Python Scraping and Web Apps for G's ACADEMY TOKYO
yoheimune
0
220
DevelopWorkflow and Solving Problems
yoheimune
0
420
Git and Github for Beginners
yoheimune
1
270
Data Science BOOTCAMP Practices - Recommendation
yoheimune
0
180
Data Science BOOTCAMP Practices
yoheimune
0
340
Machine Learning with Python
yoheimune
0
310
Other Decks in Technology
See All in Technology
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
110
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
120
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
380
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
3
200
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
フルカイテン株式会社 採用資料
fullkaiten
0
40k
[FOSS4G 2024 Japan LT] LLMを使ってGISデータ解析を自動化したい!
nssv
1
210
いざ、BSC討伐の旅
nikinusu
2
780
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
120
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
A designer walks into a library…
pauljervisheath
203
24k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Making Projects Easy
brettharned
115
5.9k
Git: the NoSQL Database
bkeepers
PRO
427
64k
For a Future-Friendly Web
brad_frost
175
9.4k
BBQ
matthewcrist
85
9.3k
Six Lessons from altMBA
skipperchong
27
3.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
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