Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Web Components: What, Why, How, When
Search
Peter Gasston
November 24, 2014
Technology
86
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Web Components: What, Why, How, When
Given at #lwsroots, 24th November 2014.
Peter Gasston
November 24, 2014
Transcript
57 slides
@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.
More Decks by Peter Gasston
See All by Peter Gasston
People Don’t Change
stopsatgreen
0
260
Your Reality Here
stopsatgreen
0
160
Growing Up, Getting Serious - #SotB6
stopsatgreen
1
410
Growing Up, Getting Serious
stopsatgreen
0
150
Surveying the Landscape — November 2016
stopsatgreen
1
240
Surveying the Landscape - Fronteers
stopsatgreen
2
550
The Web vs. The Browser
stopsatgreen
0
260
Surveying the Landscape Sept. 2016
stopsatgreen
1
490
Surveying the Landscape
stopsatgreen
4
950
Other Decks in Technology
See All in Technology
お風呂場をサーバルームにしよう
yusuke427
0
390
現地速報! Microsoft Ignite アップデートレポート
kasada
1
460
自動計装なしでECSサービスをApplication Signalsに載せるまで
ota1022
2
470
PHPで家庭用ゲーム機の専用コントローラーをMIDIデバイスとして扱ってみる
wind111
0
200
[NW-JAWS DAY]「うちのAWS、インターネット出られないんで」― AWS外の自社サービスをPrivateLinkでシュッと公開する方法
ykimi
3
920
統制されたID・権限をどう利用するか : DPoP/FAPIによるAPIセキュリティ強化
oidfj
2
300
kubellの最新データ分析環境
kubell_hr
2
260
プラガブルで宣言的なソフトウェアファクトリーを支えるTypeScript
timakin
1
310
さようならSSH鍵、こんにちはゼロトラスト ― AIフレンドリーで快適な自宅鯖SSH
atalie2m
14
7.5k
「個社」ではなく「業界」の課題を解く AI 対話開発 ー 価値を広げる設計と、価値を守るエンジニアリング ー
ivry_presentationmaterials
4
860
From vibe coding to reliable (agentic) development
jcabot
0
240
AWS DevOps Agentの構造から読み解く運用 AI エージェントの設計原則/aws-devops-agent-design-principles
tomoki10
0
280
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Prompt Engineering for Job Search
mfonobong
0
610
Everyday Curiosity
cassininazir
0
420
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.3k
Believing is Seeing
oripsolob
1
290
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
440
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.7k
The Limits of Empathy - UXLibs8
cassininazir
2
800
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
490