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標準技術 / Study Web Standards
Search
Shogo Sensui
August 27, 2015
Technology
0
280
初心者のための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
EU のデジタル市場法と Apple / DMA and Apple
1000ch
0
79
Web Share API
1000ch
0
86
2023 年の Web 開発のベースライン / Web Development Baseline 2023
1000ch
0
28
開発生産性と組織 / Productivity and Organization
1000ch
0
1.1k
なぜ私達は働くのか / Why We Work?
1000ch
0
50
新しいメルカリ Web とそのパフォーマンス / The New Mercari Web and its performance
1000ch
0
44
Web Standards Interop 2022
1000ch
0
270
パフォーマンスを高める CSS / Performance Optimized CSS
1000ch
1
760
HTML Optimization for Web Performance
1000ch
0
680
Other Decks in Technology
See All in Technology
Amazon FSx for NetApp ONTAPを利用するにあたっての要件整理と設計のポイント
non97
1
110
強すぎるIAMをCloudTrailを使って適正化した話
yjszk
0
230
APIテスト自動化の勘所
yokawasa
2
150
LLMアプリをRagasで評価して、Langfuseで可視化しよう!
minorun365
PRO
2
190
Apple/Google/Amazonの決済システムの違いを踏まえた定期購読課金システムの構築 / abema-billing-system
cyberagentdevelopers
PRO
1
140
Tokyo dbt Meetup #10 dbt Cloudユーザー会 & パネルディスカッション
dbttokyo
1
160
Figma Dev Modeで進化するデザインとエンジニアリングの協働 / figma-with-engineering
cyberagentdevelopers
PRO
1
200
全部見せます! BigQueryのコスト削減の手法とその効果 / BigQuery Cost Reduction Methods
shiozaki
1
520
実は仲良し?Amplify Gen2と生成AI
mkdev10
1
240
dbt-coreで実現するCore DataMartsのデータモデリング〜dbt編〜 / Core DataMarts Modeling with dbt-core
i125
3
1k
Comparing Apache Flink and Spark for Modern Stream Data Processing
sharonx
0
170
What's in a Postgres major release? An analysis of contributions in the v17 timeframe | Claire Giordano | PGConf EU 2024
clairegiordano
1
660
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
131
8.9k
What's new in Ruby 2.0
geeforr
342
31k
Docker and Python
trallard
40
3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
760
YesSQL, Process and Tooling at Scale
rocio
167
14k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
A better future with KSS
kneath
237
17k
Adopting Sorbet at Scale
ufuk
73
9k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.7k
Designing the Hi-DPI Web
ddemaree
280
34k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
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