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 Components: What, Why, How, When
Search
Peter Gasston
November 24, 2014
Technology
0
70
Web Components: What, Why, How, When
Given at #lwsroots, 24th November 2014.
Peter Gasston
November 24, 2014
Tweet
Share
More Decks by Peter Gasston
See All by Peter Gasston
People Don’t Change
stopsatgreen
0
130
Your Reality Here
stopsatgreen
0
80
Growing Up, Getting Serious - #SotB6
stopsatgreen
1
320
Growing Up, Getting Serious
stopsatgreen
0
71
Surveying the Landscape — November 2016
stopsatgreen
1
140
Surveying the Landscape - Fronteers
stopsatgreen
2
450
The Web vs. The Browser
stopsatgreen
0
160
Surveying the Landscape Sept. 2016
stopsatgreen
1
280
Surveying the Landscape
stopsatgreen
4
750
Other Decks in Technology
See All in Technology
Larkご案内資料
customercloud
PRO
0
600
データの品質が低いと何が困るのか
kzykmyzw
6
1k
君も受託系GISエンジニアにならないか
sudataka
2
370
AndroidデバイスにFTPサーバを建立する
e10dokup
0
240
『AWS Distinguished Engineerに学ぶ リトライの技術』 #ARC403/Marc Brooker on Try again: The tools and techniques behind resilient systems
quiver
0
130
室長と気ままに学ぶマイクロソフトのビジネスアプリケーションとビジネスプロセス
ryoheig0405
0
320
現場の種を事業の芽にする - エンジニア主導のイノベーションを事業戦略に装着する方法 -
kzkmaeda
2
1.5k
オブザーバビリティの観点でみるAWS / AWS from observability perspective
ymotongpoo
7
1k
スクラムのイテレーションを導入してチームの雰囲気がより良くなった話
eccyun
0
110
Tech Blogを書きやすい環境づくり
lycorptech_jp
PRO
0
120
APIファーストで実現する運用性の高い IoT プラットフォーム: SORACOMのアプローチ
soracom
PRO
0
240
急成長する企業で作った、エンジニアが輝ける制度/ 20250214 Rinto Ikenoue
shift_evolve
2
880
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Fireside Chat
paigeccino
34
3.2k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
We Have a Design System, Now What?
morganepeng
51
7.4k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Statistics for Hackers
jakevdp
797
220k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
630
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
400
Transcript
@stopsatgreen WEB COMPONENTS What, Why, How, When #LWSROOTS, 24/11
@stopsatgreen @stopsatgreen Peter Gasston broken-links.com
@stopsatgreen WEB COMPONENTS
@stopsatgreen ‘Demeaning’ ‘Condescending’ ‘A bit silly’
@stopsatgreen
@stopsatgreen
@stopsatgreen WHAT?
@stopsatgreen “The component model for the Web.”
@stopsatgreen A suite of technologies for making reusable UI controls
or services.
@stopsatgreen Fundamental change to the way we build the Web.
@stopsatgreen
@stopsatgreen
@stopsatgreen
@stopsatgreen ® The Lego Group
@stopsatgreen Custom Elements
@stopsatgreen Shadow DOM
@stopsatgreen HTML Imports
@stopsatgreen
@stopsatgreen Templates
@stopsatgreen WHY?
@stopsatgreen
@stopsatgreen OOCSS BEM Java Applets Dynamic Drive React Ember jQuery
UI Bootstrap Web Components
@stopsatgreen W3C WHATWG
@stopsatgreen
@stopsatgreen • jQuery : querySelector(), classList • Modernizr : @supports
• Sass : --custom-properties()
@stopsatgreen #extendthewebforward http://extensiblewebmanifesto.org/
@stopsatgreen <flex-carousel> <prev-next> <show-position> <open-lightbox>
@stopsatgreen http://msdn.microsoft.com/library/ie/ms531426.aspx
@stopsatgreen
@stopsatgreen
@stopsatgreen
@stopsatgreen meaningful naming + modularisation + encapsulation + sharing =
web components
@stopsatgreen HOW?
@stopsatgreen <indiana-jones></indiana-jones> document.registerElement('indiana-jones');
@stopsatgreen proto = Object.create(HTMLElement.prototype); proto.whip = function(…); document.registerElement('indiana-jones', { prototype:
proto }); indy = document.querySelector('indiana-jones'); indy.whip();
@stopsatgreen <button is="indiana-jones"></button> proto = Object.create(HTMLButtonElement.prototype); proto.whip = function(…); document.registerElement('indiana-jones',
{ prototype: proto, extends: 'button' });
@stopsatgreen
@stopsatgreen
@stopsatgreen var root = foo.createShadowRoot(); root.innerHTML = '<div>…</div>';
@stopsatgreen <indiana-jones> <template id="doom">…</template> <script>…</script> </indiana-jones>
@stopsatgreen <link rel="import" href="button-super.htm">
@stopsatgreen http://leafletjs.com/
@stopsatgreen <leaf-map lat="33.9186805" lon="8.1198406"></leaf-map> <link rel="import" href="leaflet-map.htm">
@stopsatgreen Everything Useful Useful & well-made Crap http://en.wikipedia.org/wiki/Sturgeon%27s_law
@stopsatgreen http://addyosmani.com/first/
@stopsatgreen http://www.paciellogroup.com/blog/2014/09/web-components-punch-list/
@stopsatgreen
@stopsatgreen
@stopsatgreen /path/to/library.min.js /path/to/a/library.min.js
@stopsatgreen <link rel="import" href="//foo.com/btn-a.htm"> <link rel="import" href="//bar.com/btn-b.htm"> <link rel="import" href="//baz.com/btn-c.htm">
@stopsatgreen WHEN?
@stopsatgreen Browser Custom Elements Shadow DOM HTML Imports Template Who
knows? ‘Under consideration’ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ http://jonrimmer.github.io/are-we-componentized-yet/
@stopsatgreen
Platform.js (polyfill) Polymer Core Bosonic Core Elements Brick Paper Elements
Elements polymer-project.org | brick.mozilla.io | bosonic.github.io | webcomponents.org Standard
@stopsatgreen Web Components are for you to drive the future
of the web. Please drive responsibly.
@stopsatgreen THE END
@stopsatgreen Unless otherwise stated, all photos in this deck are
copyright George Lucas or Mickey Mouse or someone and used without permission.