SlideShare a Scribd company logo
Going Native
with HTML5
Web Components
The Current State of Web Development
My Team’s JavaScript Tech Stack
The current native toolset has not kept pace with the needs
of modern web applications. As a result, we have come to
rely on libraries and frameworks to get make our lives
easier as developers and get the functionality we need to
make robust web apps.
Why Would You Do This?!
These are the issues these tools are trying to solve in one
way or another.
1. Undescriptive Markup
2. Style Conflicts
3. No Templates
4. No Bundling
5. No Standard
Let’s look at each of these individually
So What Are These problems?
HTML kind of sucks. What’s worse is the way most developers
use HTML.
Even though there are more semantic elements available in
HTML5, browser compatibility and lazy developers mean they
usually aren’t taken advantage of.
There are workarounds such as class names and IDs but wouldn’t
it be nice to just have whatever descriptive name you wanted for a
thing? Oh yeah lots of frameworks have that, problem solved
right? Bzzzt! No. We’ll talk about why in a second.
Undescriptive Markup
Undescriptive Markup
CSS kind of sucks. What’s worse is the way most developers
use CSS.
When things live on the same page, you have to strike a balance
between creating a unified look and reducing duplication among
styles and selectors so they don’t conflict.
Again, we have workarounds like highly specific selectors or
hacks like !important. But these can cause performance
impacts and you really shouldn’t use !important.
Style Conflicts
There is currently no way to import HTML into a page without it
immediately being parsed and placed somewhere on the
document.
You guessed it, there’s a workaround for that. You can import
script with foreign types like ‘text/html’ or absolutely position
them way off the page. More hacks, more hacks, more hacks.
No Templates
Once you start using a framework or tool, you have to import all
of its assets separately. Consider Bootstrap. You need at least 3
separate references (JQuery, bootstrap.js, bootstrap.css) just to
start using Bootstrap’s components. Couldn’t we make this a
one-liner like a Java import or a C++ #include
You can use a package manager like Bower but that creates
more overhead, more dependencies to manage who may have
dependencies of their own.
No Bundling
This is similar to all of the other previous reasons but all of the
hacky or framework-based solutions to the above problems are
non-standardized. The skills you build learning one framework
do not translate to any other framework.
No Standard
!== !==
Unfortunately the answer right now is, ‘grin and bear it.’ Modern
web development jobs come with a kind of understanding that
this is the state of things is a hot mess and that skill sets may be
appropriately disparate.
So what’s a web dev to do?
But What If…?
We could turn this…
But What If…?
Into this...
But What If…?
or maybe more realistically...
But What If…?
or maybe even more realistically...
What are Web Components
Web Components are a set of standards currently being
reviewed by the W3C that allow for the creation of reusable
widgets or components in web documents and web
applications. The intention behind them is to bring
component-based software engineering to the World Wide
Web. The components model allows for encapsulation and
interoperability of individual HTML elements.
So there are a number of features provided by web components
that address many of these concerns.
● Native Templates
● Custom Elements
● Shadow DOM
● HTML Imports
Let’s take a quick look at each of these.
Sounds Hot… What’s included?
HTML5 adds the ability to add inert HTML templates to the page
without them being parsed and displayed to the DOM.
The templates will remain inert until they are cloned and
inserted into the DOM. All this stuff is easier to show than
talk about. So let’s look at a ...
DEMO!
Templates
HTML5 also adds the ability to add custom HTML Element tags.
This works similarly to the way it works in a lot of
frameworks such as Angular directives or Ember
components. Again, show don’t tell...
DEMO!
Custom Elements
The Shadow DOM solves the issue of encapsulation on web
pages. It has a spooky name but it’s actually something we’ve
had in our browsers for a while and didn’t know it. Don’t believe
me?
DEMO!
Shadow DOM
Now not only do we have things like the video and range input
tags, we can now define our own Shadow DOMs and
encapsulate our own mini-DOMs on the pages. This is the
deepest well in the new web components spec so we will only hit
this at the highest level. Even so...
DEMO!
Shadow DOM - A New Hope
Web components also make it easy to share other external web
components as a one-line import. Guess what time it is...
DEMO!
HTML Imports
Awesome, When Can I Use them?
Native browser support is still pretty terrible except on
Chrome and Opera. Luckily, you can pretty much polyfill
everything else all the way back to IE 10...
Awesome, When Can I Use them?
Ad

Recommended

Lecture 6 Data Driven Design
Lecture 6 Data Driven Design
Sur College of Applied Sciences
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
David Wesst
 
Beg, Borrow or Steal: The Art of Flashing Without Flashing
Beg, Borrow or Steal: The Art of Flashing Without Flashing
spjwebster
 
Lecture 9 Professional Practices
Lecture 9 Professional Practices
Sur College of Applied Sciences
 
5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)
5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)
David Wesst
 
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SK
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SK
David Wesst
 
HTML5: The Parts You Care About - 4/Nov/13 - PrDC Saskatoon, SK
HTML5: The Parts You Care About - 4/Nov/13 - PrDC Saskatoon, SK
David Wesst
 
Lecture1 B Frames&Forms
Lecture1 B Frames&Forms
Sur College of Applied Sciences
 
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
David Wesst
 
Everyones invited! Meet accesibility requirements with ColdFusion
Everyones invited! Meet accesibility requirements with ColdFusion
ColdFusionConference
 
Wordpress Questions & Answers
Wordpress Questions & Answers
Nicole Dion
 
Basic HTML
Basic HTML
coachhahn
 
Worry free web development
Worry free web development
Estelle Weyl
 
Responsive Web Design Tutorial PDF for Beginners
Responsive Web Design Tutorial PDF for Beginners
Bootstrap Creative
 
Understand front end developer
Understand front end developer
Hsuan Fu Lien
 
Module 2 Lesson 1
Module 2 Lesson 1
claytors
 
Top java script frameworks ppt
Top java script frameworks ppt
Omkarsoft Bangalore
 
Front end for back end developers
Front end for back end developers
Wojciech Bednarski
 
Maintainable Javascript carsonified
Maintainable Javascript carsonified
Christian Heilmann
 
Say Hello 2 Bdd
Say Hello 2 Bdd
mh_azad
 
Web Design Primer Sample - HTML CSS JS
Web Design Primer Sample - HTML CSS JS
Bootstrap Creative
 
Visual Rhetoric: Some Web Odds and Ends
Visual Rhetoric: Some Web Odds and Ends
Miami University
 
My Portfolio website
My Portfolio website
ALLA CHANDRA KIRAN
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
Evan Mullins
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
Vitaly Friedman
 
Web Development Tutorial Workshop for Beginners - Learn Responsive Web Design...
Web Development Tutorial Workshop for Beginners - Learn Responsive Web Design...
Bootstrap Creative
 
Using a CSS Framework
Using a CSS Framework
Gareth Saunders
 
Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)
Stephen Hay
 
Web Components - Rutgers Tech Meetup Fall 2014
Web Components - Rutgers Tech Meetup Fall 2014
Yair Aviner
 
Webcomponents v2
Webcomponents v2
Dmitry Bakaleinik
 

More Related Content

What's hot (20)

NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
David Wesst
 
Everyones invited! Meet accesibility requirements with ColdFusion
Everyones invited! Meet accesibility requirements with ColdFusion
ColdFusionConference
 
Wordpress Questions & Answers
Wordpress Questions & Answers
Nicole Dion
 
Basic HTML
Basic HTML
coachhahn
 
Worry free web development
Worry free web development
Estelle Weyl
 
Responsive Web Design Tutorial PDF for Beginners
Responsive Web Design Tutorial PDF for Beginners
Bootstrap Creative
 
Understand front end developer
Understand front end developer
Hsuan Fu Lien
 
Module 2 Lesson 1
Module 2 Lesson 1
claytors
 
Top java script frameworks ppt
Top java script frameworks ppt
Omkarsoft Bangalore
 
Front end for back end developers
Front end for back end developers
Wojciech Bednarski
 
Maintainable Javascript carsonified
Maintainable Javascript carsonified
Christian Heilmann
 
Say Hello 2 Bdd
Say Hello 2 Bdd
mh_azad
 
Web Design Primer Sample - HTML CSS JS
Web Design Primer Sample - HTML CSS JS
Bootstrap Creative
 
Visual Rhetoric: Some Web Odds and Ends
Visual Rhetoric: Some Web Odds and Ends
Miami University
 
My Portfolio website
My Portfolio website
ALLA CHANDRA KIRAN
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
Evan Mullins
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
Vitaly Friedman
 
Web Development Tutorial Workshop for Beginners - Learn Responsive Web Design...
Web Development Tutorial Workshop for Beginners - Learn Responsive Web Design...
Bootstrap Creative
 
Using a CSS Framework
Using a CSS Framework
Gareth Saunders
 
Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)
Stephen Hay
 
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
David Wesst
 
Everyones invited! Meet accesibility requirements with ColdFusion
Everyones invited! Meet accesibility requirements with ColdFusion
ColdFusionConference
 
Wordpress Questions & Answers
Wordpress Questions & Answers
Nicole Dion
 
Worry free web development
Worry free web development
Estelle Weyl
 
Responsive Web Design Tutorial PDF for Beginners
Responsive Web Design Tutorial PDF for Beginners
Bootstrap Creative
 
Understand front end developer
Understand front end developer
Hsuan Fu Lien
 
Module 2 Lesson 1
Module 2 Lesson 1
claytors
 
Front end for back end developers
Front end for back end developers
Wojciech Bednarski
 
Maintainable Javascript carsonified
Maintainable Javascript carsonified
Christian Heilmann
 
Say Hello 2 Bdd
Say Hello 2 Bdd
mh_azad
 
Web Design Primer Sample - HTML CSS JS
Web Design Primer Sample - HTML CSS JS
Bootstrap Creative
 
Visual Rhetoric: Some Web Odds and Ends
Visual Rhetoric: Some Web Odds and Ends
Miami University
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
Evan Mullins
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
Vitaly Friedman
 
Web Development Tutorial Workshop for Beginners - Learn Responsive Web Design...
Web Development Tutorial Workshop for Beginners - Learn Responsive Web Design...
Bootstrap Creative
 
Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)
Stephen Hay
 

Similar to Going native with html5 web components (20)

Web Components - Rutgers Tech Meetup Fall 2014
Web Components - Rutgers Tech Meetup Fall 2014
Yair Aviner
 
Webcomponents v2
Webcomponents v2
Dmitry Bakaleinik
 
Rawnet Lightning Talk - Web Components
Rawnet Lightning Talk - Web Components
Rawnet
 
Html5 basics
Html5 basics
sagaroceanic11
 
HTML 5 & The Modern Web
HTML 5 & The Modern Web
Jumping Bean
 
Delhi student's day
Delhi student's day
Ankur Mishra
 
Brownbag on basics of web components
Brownbag on basics of web components
Jason Park
 
HTML5 introduction for beginners
HTML5 introduction for beginners
Vineeth N Krishnan
 
HTML5 - The Good, the Bad, the Ugly
HTML5 - The Good, the Bad, the Ugly
Mario Heiderich
 
Web components and Package managers
Web components and Package managers
btopro
 
HTML5 Technical Executive Summary
HTML5 Technical Executive Summary
Gilad Khen
 
Build Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponents
Gil Fink
 
Report html5
Report html5
Himanshu Phulara
 
Webcomponents TLV October 2014
Webcomponents TLV October 2014
Dmitry Bakaleinik
 
Sitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_template
Daniel Downs
 
Fii Practic Frontend BeeNear - laborator 1
Fii Practic Frontend BeeNear - laborator 1
BeeNear
 
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith
 
WEB [email protected] (1).pdf
WEB [email protected] (1).pdf
PrathimaMahapurush1
 
HTML5 and XHTML2
HTML5 and XHTML2
Michael(tm) Smith
 
Real solutions, no tricks
Real solutions, no tricks
Jens Grochtdreis
 
Web Components - Rutgers Tech Meetup Fall 2014
Web Components - Rutgers Tech Meetup Fall 2014
Yair Aviner
 
Rawnet Lightning Talk - Web Components
Rawnet Lightning Talk - Web Components
Rawnet
 
HTML 5 & The Modern Web
HTML 5 & The Modern Web
Jumping Bean
 
Delhi student's day
Delhi student's day
Ankur Mishra
 
Brownbag on basics of web components
Brownbag on basics of web components
Jason Park
 
HTML5 introduction for beginners
HTML5 introduction for beginners
Vineeth N Krishnan
 
HTML5 - The Good, the Bad, the Ugly
HTML5 - The Good, the Bad, the Ugly
Mario Heiderich
 
Web components and Package managers
Web components and Package managers
btopro
 
HTML5 Technical Executive Summary
HTML5 Technical Executive Summary
Gilad Khen
 
Build Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponents
Gil Fink
 
Webcomponents TLV October 2014
Webcomponents TLV October 2014
Dmitry Bakaleinik
 
Sitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_template
Daniel Downs
 
Fii Practic Frontend BeeNear - laborator 1
Fii Practic Frontend BeeNear - laborator 1
BeeNear
 
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith
 
Ad

Recently uploaded (20)

Curietech AI in action - Accelerate MuleSoft development
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
 
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
Safe Software
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
PyCon SG 25 - Firecracker Made Easy with Python.pdf
PyCon SG 25 - Firecracker Made Easy with Python.pdf
Muhammad Yuga Nugraha
 
Curietech AI in action - Accelerate MuleSoft development
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
 
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
Safe Software
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
PyCon SG 25 - Firecracker Made Easy with Python.pdf
PyCon SG 25 - Firecracker Made Easy with Python.pdf
Muhammad Yuga Nugraha
 
Ad

Going native with html5 web components

  • 2. The Current State of Web Development
  • 4. The current native toolset has not kept pace with the needs of modern web applications. As a result, we have come to rely on libraries and frameworks to get make our lives easier as developers and get the functionality we need to make robust web apps. Why Would You Do This?!
  • 5. These are the issues these tools are trying to solve in one way or another. 1. Undescriptive Markup 2. Style Conflicts 3. No Templates 4. No Bundling 5. No Standard Let’s look at each of these individually So What Are These problems?
  • 6. HTML kind of sucks. What’s worse is the way most developers use HTML. Even though there are more semantic elements available in HTML5, browser compatibility and lazy developers mean they usually aren’t taken advantage of. There are workarounds such as class names and IDs but wouldn’t it be nice to just have whatever descriptive name you wanted for a thing? Oh yeah lots of frameworks have that, problem solved right? Bzzzt! No. We’ll talk about why in a second. Undescriptive Markup
  • 8. CSS kind of sucks. What’s worse is the way most developers use CSS. When things live on the same page, you have to strike a balance between creating a unified look and reducing duplication among styles and selectors so they don’t conflict. Again, we have workarounds like highly specific selectors or hacks like !important. But these can cause performance impacts and you really shouldn’t use !important. Style Conflicts
  • 9. There is currently no way to import HTML into a page without it immediately being parsed and placed somewhere on the document. You guessed it, there’s a workaround for that. You can import script with foreign types like ‘text/html’ or absolutely position them way off the page. More hacks, more hacks, more hacks. No Templates
  • 10. Once you start using a framework or tool, you have to import all of its assets separately. Consider Bootstrap. You need at least 3 separate references (JQuery, bootstrap.js, bootstrap.css) just to start using Bootstrap’s components. Couldn’t we make this a one-liner like a Java import or a C++ #include You can use a package manager like Bower but that creates more overhead, more dependencies to manage who may have dependencies of their own. No Bundling
  • 11. This is similar to all of the other previous reasons but all of the hacky or framework-based solutions to the above problems are non-standardized. The skills you build learning one framework do not translate to any other framework. No Standard !== !==
  • 12. Unfortunately the answer right now is, ‘grin and bear it.’ Modern web development jobs come with a kind of understanding that this is the state of things is a hot mess and that skill sets may be appropriately disparate. So what’s a web dev to do?
  • 13. But What If…? We could turn this…
  • 15. But What If…? or maybe more realistically...
  • 16. But What If…? or maybe even more realistically...
  • 17. What are Web Components Web Components are a set of standards currently being reviewed by the W3C that allow for the creation of reusable widgets or components in web documents and web applications. The intention behind them is to bring component-based software engineering to the World Wide Web. The components model allows for encapsulation and interoperability of individual HTML elements.
  • 18. So there are a number of features provided by web components that address many of these concerns. ● Native Templates ● Custom Elements ● Shadow DOM ● HTML Imports Let’s take a quick look at each of these. Sounds Hot… What’s included?
  • 19. HTML5 adds the ability to add inert HTML templates to the page without them being parsed and displayed to the DOM. The templates will remain inert until they are cloned and inserted into the DOM. All this stuff is easier to show than talk about. So let’s look at a ... DEMO! Templates
  • 20. HTML5 also adds the ability to add custom HTML Element tags. This works similarly to the way it works in a lot of frameworks such as Angular directives or Ember components. Again, show don’t tell... DEMO! Custom Elements
  • 21. The Shadow DOM solves the issue of encapsulation on web pages. It has a spooky name but it’s actually something we’ve had in our browsers for a while and didn’t know it. Don’t believe me? DEMO! Shadow DOM
  • 22. Now not only do we have things like the video and range input tags, we can now define our own Shadow DOMs and encapsulate our own mini-DOMs on the pages. This is the deepest well in the new web components spec so we will only hit this at the highest level. Even so... DEMO! Shadow DOM - A New Hope
  • 23. Web components also make it easy to share other external web components as a one-line import. Guess what time it is... DEMO! HTML Imports
  • 24. Awesome, When Can I Use them? Native browser support is still pretty terrible except on Chrome and Opera. Luckily, you can pretty much polyfill everything else all the way back to IE 10...
  • 25. Awesome, When Can I Use them?