SlideShare a Scribd company logo
1 of 57
Download to read offline
@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
® The Lego Group @stopsatgreen
@stopsatgreen 
Custom Elements
@stopsatgreen 
Shadow DOM
@stopsatgreen 
HTML Imports
@stopsatgreen
@stopsatgreen 
Templates
@stopsatgreen 
WHY?
@stopsatgreen
@stopsatgreen 
Java Applets 
Dynamic Drive 
OOCSS 
BEM 
jQuery UI 
Bootstrap 
React 
Ember 
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> 
<open-lightbox> 
<show-position>
http://msdn.microsoft.com/library/ie/ms531426.aspx @stopsatgreen
@stopsatgreen
@stopsatgreen
@stopsatgreen
@stopsatgreen 
meaningful naming 
+ modularisation 
+ encapsulation 
+ sharing 
= web components
@stopsatgreen 
HOW?
@stopsatgreen 
document.registerElement('indiana-jones'); 
<indiana-jones></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">
http://leafletjs.com/ @stopsatgreen
<leaf-map lat="33.9186805" lon="8.1198406"></leaf-map> 
@stopsatgreen 
<link rel="import" href="leaflet-map.htm">
@stopsatgreen 
Everything 
Useful 
Useful & well-made Crap 
http://en.wikipedia.org/wiki/Sturgeon%27s_law
http://addyosmani.com/first/ @stopsatgreen
http://www.paciellogroup.com/blog/2014/09/web-components-punch-list/ @stopsatgreen
@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?
Browser Custom Elements Shadow DOM HTML Imports Template 
@stopsatgreen 
✓ ✓ ✓ 
✓ ✓ ✓ 
Who knows? 
‘Under consideration’ 
✓ 
✓ 
✓ 
http://jonrimmer.github.io/are-we-componentized-yet/
@stopsatgreen
Polymer Core Bosonic 
Platform.js (polyfill) 
Core Elements 
Brick 
Paper Elements 
Elements 
Standard 
polymer-project.org | brick.mozilla.io | bosonic.github.io | webcomponents.org
@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 Related Content

What's hot

jQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsjQtouch, Building Awesome Webapps
jQtouch, Building Awesome Webapps
Home
 
Plugging into plugins
Plugging into pluginsPlugging into plugins
Plugging into plugins
Josh Harrison
 
Microdata semantic-extend
Microdata semantic-extendMicrodata semantic-extend
Microdata semantic-extend
Seek Tan
 

What's hot (20)

The Future of CSS with Web Components
The Future of CSS with Web ComponentsThe Future of CSS with Web Components
The Future of CSS with Web Components
 
BOOM Performance
BOOM PerformanceBOOM Performance
BOOM Performance
 
jQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsjQtouch, Building Awesome Webapps
jQtouch, Building Awesome Webapps
 
Introduction to Backbone.js - DDD North
Introduction to Backbone.js - DDD NorthIntroduction to Backbone.js - DDD North
Introduction to Backbone.js - DDD North
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaks
 
jQuery UI and Plugins
jQuery UI and PluginsjQuery UI and Plugins
jQuery UI and Plugins
 
关于 Html5 那点事
关于 Html5 那点事关于 Html5 那点事
关于 Html5 那点事
 
“Good design is obvious. Great design is transparent.” — How we use Bootstrap...
“Good design is obvious. Great design is transparent.” — How we use Bootstrap...“Good design is obvious. Great design is transparent.” — How we use Bootstrap...
“Good design is obvious. Great design is transparent.” — How we use Bootstrap...
 
Plugging into plugins
Plugging into pluginsPlugging into plugins
Plugging into plugins
 
J Query - Your First Steps
J Query - Your First StepsJ Query - Your First Steps
J Query - Your First Steps
 
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp VictoriaWidgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
 
programming
programmingprogramming
programming
 
Nobody Wants Junior Engineers
Nobody Wants Junior EngineersNobody Wants Junior Engineers
Nobody Wants Junior Engineers
 
Liferay + Wearables
Liferay + WearablesLiferay + Wearables
Liferay + Wearables
 
jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009
 
Microdata semantic-extend
Microdata semantic-extendMicrodata semantic-extend
Microdata semantic-extend
 
モバイル検索とアプリ
モバイル検索とアプリモバイル検索とアプリ
モバイル検索とアプリ
 
Using HTML code to add page number and its output are there..
Using HTML code to add page number and its output are there..Using HTML code to add page number and its output are there..
Using HTML code to add page number and its output are there..
 
Jackie's porfolio edited
Jackie's porfolio editedJackie's porfolio edited
Jackie's porfolio edited
 
Calender
CalenderCalender
Calender
 

Similar to Web Components: What, Why, How, and When

Private slideshow
Private slideshowPrivate slideshow
Private slideshow
sblackman
 
Los Estados De La Materia
Los Estados De La MateriaLos Estados De La Materia
Los Estados De La Materia
Mayritalinda
 
Open social 2.0 sandbox ee and breaking out of the gadget box
Open social 2.0 sandbox  ee and breaking out of the gadget boxOpen social 2.0 sandbox  ee and breaking out of the gadget box
Open social 2.0 sandbox ee and breaking out of the gadget box
Ryan Baxter
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
James Pearce
 

Similar to Web Components: What, Why, How, and When (20)

The Devil and HTML5
The Devil and HTML5The Devil and HTML5
The Devil and HTML5
 
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
 
An Introduction to HTML5
An Introduction to HTML5An Introduction to HTML5
An Introduction to HTML5
 
2016 First steps with Angular 2 – enterjs
2016 First steps with Angular 2 – enterjs2016 First steps with Angular 2 – enterjs
2016 First steps with Angular 2 – enterjs
 
Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015
 
HTML5
HTML5HTML5
HTML5
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshow
 
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
 
Jquery mobile
Jquery mobileJquery mobile
Jquery mobile
 
Los Estados De La Materia
Los Estados De La MateriaLos Estados De La Materia
Los Estados De La Materia
 
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJRealize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
 
20190118_NetadashiMeetup#8_React2019
20190118_NetadashiMeetup#8_React201920190118_NetadashiMeetup#8_React2019
20190118_NetadashiMeetup#8_React2019
 
Schoology tutorial[1]
Schoology tutorial[1]Schoology tutorial[1]
Schoology tutorial[1]
 
New Browsers
New BrowsersNew Browsers
New Browsers
 
Open social 2.0 sandbox ee and breaking out of the gadget box
Open social 2.0 sandbox  ee and breaking out of the gadget boxOpen social 2.0 sandbox  ee and breaking out of the gadget box
Open social 2.0 sandbox ee and breaking out of the gadget box
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
Building Faster Websites
Building Faster WebsitesBuilding Faster Websites
Building Faster Websites
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
 
Lone StarPHP 2013 - Building Web Apps from a New Angle
Lone StarPHP 2013 - Building Web Apps from a New AngleLone StarPHP 2013 - Building Web Apps from a New Angle
Lone StarPHP 2013 - Building Web Apps from a New Angle
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
 

More from Peter Gasston (8)

CSS3 With A Safety Net - Sudweb 2012
CSS3 With A Safety Net - Sudweb 2012CSS3 With A Safety Net - Sudweb 2012
CSS3 With A Safety Net - Sudweb 2012
 
CSS: The Boring Bits
CSS: The Boring BitsCSS: The Boring Bits
CSS: The Boring Bits
 
The CSS of Tomorrow (Front Row 2011)
The CSS of Tomorrow (Front Row 2011)The CSS of Tomorrow (Front Row 2011)
The CSS of Tomorrow (Front Row 2011)
 
The CSS3 of Tomorrow (Version 2)
The CSS3 of Tomorrow (Version 2)The CSS3 of Tomorrow (Version 2)
The CSS3 of Tomorrow (Version 2)
 
The Home of the Future: CSS Layouts
The Home of the Future: CSS LayoutsThe Home of the Future: CSS Layouts
The Home of the Future: CSS Layouts
 
The CSS3 of Tomorrow
The CSS3 of TomorrowThe CSS3 of Tomorrow
The CSS3 of Tomorrow
 
A Sensational Exposé With Bewildering Demonstrations
A Sensational Exposé With Bewildering DemonstrationsA Sensational Exposé With Bewildering Demonstrations
A Sensational Exposé With Bewildering Demonstrations
 
The Top 10 Best Biases
The Top 10 Best BiasesThe Top 10 Best Biases
The Top 10 Best Biases
 

Recently uploaded

Recently uploaded (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Web Components: What, Why, How, and When