Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
初心者のためのWeb標準技術 / Study Web Standards
Shogo Sensui
August 27, 2015
Technology
0
220
初心者のためのWeb標準技術 / Study Web Standards
2015年8月27日に行われたHTML5ビギナーズ勉強会の「初心者のためのWeb標準技術」のセッションの資料です。
Shogo Sensui
August 27, 2015
Tweet
Share
More Decks by Shogo Sensui
See All by Shogo Sensui
Web Standards Interop 2022
1000ch
0
120
パフォーマンスを高める CSS / Performance Optimized CSS
1000ch
1
550
HTML Optimization for Web Performance
1000ch
0
530
Introduction to Performance APIs
1000ch
0
530
PWA 対応戦略と現実解 / PWA strategy and realistic solution
1000ch
0
490
merpay Frontend における BFF / bff-at-merpay-frontend
1000ch
1
8.8k
2018 年の Web 標準 / Web Standards 2018
1000ch
11
3.2k
アクセシビリティとメルカリの話 / A11y and Mercari
1000ch
0
86
Web Components Re-Introduction
1000ch
3
930
Other Decks in Technology
See All in Technology
データサイエンティストとしてどう学んでいくべきか/東京大学講義: データマイニング概論: #10
yp_genzitsu
10
5.9k
F1 Ochanomizu GP '23
miholovesq
0
640
私見「UNIXの考え方」/20230124-kameda-unix-phylosophy
opelab
0
130
Startup Studio Sereal / Culture Deck
sereal
0
590
学びを仕事に繋げる
sansanbuildersbox
15
5.9k
Astroで始める爆速個人サイト開発
takanorip
12
8.2k
Virtual Thread - 導入の背景と、効果的な使い方 -
skrb
3
230
2022年に起きたフロントエンドの変化
sakito
27
16k
Lyssa Adkins : Agilists Superpower and Challenge
kawaguti
PRO
1
160
Technologies for developing editors / Webエディタ開発を支える技術
shuta13
1
220
RDS/Aurora バージョンアップのポイント
hmatsu47
PRO
8
1.6k
テクニカルライターよ概念図を描くのです 〜テクニカルライターのためのイラストテクニック2〜 / cybozu illust technique2
yuki_kondo
13
3.4k
Featured
See All Featured
How GitHub (no longer) Works
holman
298
140k
The Language of Interfaces
destraynor
149
21k
What’s in a name? Adding method to the madness
productmarketing
12
1.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
31
20k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
24
4.5k
4 Signs Your Business is Dying
shpigford
171
20k
Code Reviewing Like a Champion
maltzj
508
38k
Fantastic passwords and where to find them - at NoRuKo
philnash
31
1.8k
Thoughts on Productivity
jonyablonski
49
2.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
7
560
WebSockets: Embracing the real-time Web
robhawkes
58
6k
Into the Great Unknown - MozCon
thekraken
2
270
Transcript
ॳ৺ऀͷͨΊͷ Webඪ४ٕज़2015ळ at HTML5ϏΪφʔζ by 1000ch
1000ch
Profile WebϑϩϯτΤϯυΤϯδχΞ HTML5ͱ͍͏͔Webٕज़શൠ Node.js + iOS/Mac #perfmatters
@cssradar @hiloki @t32k @1000ch @ahomu Frontend Weekly • ࠃ֎ͷϑϩϯτΤϯυใΛΩϡϨʔγϣϯ •
िʹҰਫ༵ʹ৴
@cssradar @hiloki @t32k @1000ch @ahomu Frontend Weekly • ࠃ֎ͷϑϩϯτΤϯυใΛΩϡϨʔγϣϯ •
िʹҰਫ༵ʹ৴ https://frontendweekly.tokyo
ࡢࠓͷWebϑϩϯτΤϯυ…
None
ߴԽ͢ΔWebϑϩϯτΤϯυ ߴ·Γଓ͚ΔϑϩϯτΤϯυͷൺॏ มΘΓଓ͚ΔWebΞϓϦέʔγϣϯ ૿͑ଓ͚Δ৽͍ٕ͠ज़ͱपลπʔϧ
ʮؾ͍ͮͨ࣌ʹഇΕͯΔʯ ͳΜͯ͜ͱ͠͠
ͦΜͳதͰ ഇΕʹ͍ٕ͘ज़…
Web Standards W3CɾWHATWGɾECMAͳͲ͕த৺ʹͳͬͯ Webͷඪ४ͱͳΔٕज़༷Λࡦఆ͍ͯ͠Δ
࠷ۙྲྀߦΓͷ͓͖͍͑ͯͨ Webඪ४Λ͓͞Β͍ ※͜Ε͚ͩΕΠΠͱ͍͏จ຺Ͱܾͯ͋͠Γ·ͤΜ
࠷ۙϫαͷ… Webඪ४ٕज़ ݫબ5બ
1. ECMAScript 2015
ECMAScript 2015 ΫϥεߏจΞϩʔؔɺPromiseͳͲ ػೳɾγϯλοΫεڞʹେ෯ʹڧԽ͞Εͨ ͍ΘΏΔES6HarmonyͱݺΕΔͷ 20156݄ʹ6th edition͕ඪ४Խ͞Εͨ ChromeFirefox͕࣮ΛਐΊΔ γΣΞશମΛݟΔͱ·ͩ·͍ͩ͠ !
? ♥
function Human(name) { if (name === undefined) { name =
'Taro'; } this.name = name; } Human.prototype.hello = function() { console.log('My name is ' + this.name); }; class Human { constructor(name = 'Taro') { this.name = name; } hello() { console.log(`My name is ${this.name}`); } } ES5 ES6
͍·͔Β͡ΊΔECMAScript 6 http://www.slideshare.net/1000ch/begin-ecmascript6
͍·͙͢׆͔͢ʂ࠷৽JavaScript WEB+DB PRESS Vol.87 ಛू1
2. CSS.next
CSS.next Selector Level4ɾNotationɾϓϩύςΟͳͲ ػೳ໘Ͱ༷ʑͳڧԽ͕ͳ͞Ε͍ͯΔ ʮCSS3ͰΓ্͕ͬͨʙʯҎ߱ͷมߋ ϓϦϓϩηοαͷӨڹΛड͚͍ͯΔ ES6ಉ༷ϒϥβͷରԠঢ়گࢥΘ͘͠ͳ͍ ! ? ♥
CSS.next CSS :root { --primary-color: #E86100; --base-fontsize: 1rem; } h1
{ font-size: calc(var(--base-fontsize) * 2); height: calc(100px - 2em); } body { font-size: var(--base-fontsize); } h1 { font-size: 2rem; height: calc(100px - 2em); } body { font-size: 1rem; }
cssnextͰΈΔ࣍ੈCSSͱPostCSS http://blog.yucchiy.com/2015/04/22/cssnext-postcss-for- nextgeneration-of-css
3. HTTP/2
HTTP/2 ! ? ♥ ϓϩτίϧϨϕϧͰ௨৴ޮ͕ྑ͘ͳΓ αʔόʔPushͳͲWebج൫ͱͯ͠ਐԽ WWWͰ࠾༻͞Ε͍ͯΔHTTPͷ 1.1͔Β2࣮ʹ16ͿΓόʔδϣϯUP ϒϥβ͓ΑͼαʔόʔͷରԠ͕ඞཁ طଘͷύϑΥʔϚϯεʹؔ͢Δϊϋͷݟ͠
http://www.http2demo.io/
HTTP/2ͷݱঢ়ͱ͜Ε͔Β http://www.slideshare.net/shigeki_ohtsu/http2-ohtsu-html5conf2015
4. Web Components
Web Components ! ? ♥ HTML/CSS/JSͷείʔϓͷࠜຊతͳղܾ Web෦ͷ࠶ར༻ʹ͚ͨ ίϯϙʔωϯτԽͷ࡞๏ͷඪ४Խ ϒϥβͷ࣮Ҏલʹɺ༷͕Fix͍ͯ͠ͳ͍ ʢಛʹShadow
DOMͱHTML Importsʣ
http://1000ch.github.io/switch-element/
ͳͥWeb ComponentsΣϒ։ൃʹֵ໋Λى͜͢ͷ͔ https://blog.agektmr.com/2014/05/web-components.html
جૅ͔ΒΘ͔Δ Web Components పఈղઆ https://html5experts.jp/series/web-components-2/
5. Service Worker
Service Worker ! ? ♥ αʔόʔPushͷड৴ΦϑϥΠϯԽͳͲ Webʹ͓͚ΔϢʔβʔମݧΛେ͖͘ม͑Δ Push APIɾCache APIͳͲΛ୲͏
ػೳΛ࣮ݱ͢Δ৽ͨͳWebͷج൫ٕज़ ηΩϡΞͳWebʢHTTPSʣͰ͔͠ར༻Ͱ͖ͳ͍
https://1000ch.github.io/todo/
Service Workerʹؔ͢Δ༷ͱ͔ػೳͱ͔ https://1000ch.net/posts/2014/service-worker-internals.html
Service Workerͷհ http://www.html5rocks.com/ja/tutorials/service-worker/introduction
ʮศརͦ͏ͳͷΘ͔ͬͨʯ ʮࢼͯ͠Έ͍ͨؾ͢Δʯ
ʮϒϥβͷରԠঢ়گͬͯ Ͳ͏ͳΜͰ͠ΐ͏…ʯ
How to fallback?
ES 2015 CSS.next HTTP/2 Web Components Service Worker
ES 2015 CSS.next HTTP/2 Web Components Service Worker BabelɾCSSnextɾAutoprefixerͱ ͍ͬͨΑ͏ͳ֤छπʔϧͬͯɺ
ඇରԠϒϥβͰ࣮ߦͰ͖ΔΑ ͏ͳJavaScriptʹมʢτϥϯε ύΠϧʣ͢Δ
ES 2015 CSS.next HTTP/2 Web Components Service Worker ΫϥΠΞϯτͱͷΤϯυϙΠϯτ αʔόʔʹHTTP/2ΛରԠͤ͞Δ
ʢΫϥΠΞϯτ͕HTTP/2ʹରԠ͠ ͍ͯΕHTTP/2Ͱ௨৴͠ɺඇରԠ Ͱ͋ΕHTTP/1.1ʹʣ
ES 2015 CSS.next HTTP/2 Web Components Service Worker WebComponents.jsͱ͍͏ϙϦϑΟ ϧΛ͏͜ͱͰݹ͍ϒϥβ
ʢSafari 7+ɾIE11+ʣͰ͋Δఔ ࣮ߦͰ͖ΔΑ͏ʹͳΔ
ES 2015 CSS.next HTTP/2 Web Components Service Worker ΦϑϥΠϯରԠαʔόʔPushΛ ඞਢͷཁ݅ͱ͠ͳ͚Εɺͦͦ
ΦϓτΠϯͱͯ͠ಋೖ͍͢͠ɻ ରԠ͍ͯ͠Δϒϥβʹରͯͩ͠ ͚ͰϢʔβʔΤϯήʔδϝϯτ ΛߴΊΒΕΔ
·ͱΊ தʹීٴͤͣʹඇਪʹͳ͍ͬͯ͘ͷ… ރΕʹ͍͕͘ಋೖ͠ʹ͔֬͘͞ʹ͋Δ հͨ͠ϞϊΩϟονΞοϓͯ͠ଛͳ͍
खݩͰࢼͯ͠ΈΔΑ͠ αʔϏεʹऔΓೖΕΔΑ͠
※͝ར༻ܭըతʹ
͓ΘΓ + +ShogoSensui % & 1000ch 1000ch