SlideShare une entreprise Scribd logo
1  sur  27
Web Components 
Jeff Tapper 
Digital Primates 
@jefftapper / @digitalprimates
Who am I? 
• Senior Consultant at Digital Primates 
– Building next generation client applications 
• Developing Internet applications for 19 years 
• Author of 12 books on Internet technologies
Who are you?
What are Web Components? 
Web Components are an attempt to let 
you write custom components that can be 
used like this: 
<body> 
Sales:<br> 
<my-super-cool-chart id="coolChart"> 
</ my-super-cool-chart > 
</body>
What is Polymer? 
A library built on top of Web Components. 
Allows us to use Web Components today in modern browsers 
which don’t yet support Web Components 
3 main pieces 
• A set of polyfills 
• Web application framework 
• Set of UI components
What are we covering? 
Web Components, specifically: 
What in the world are web components? 
What problem are they trying to solve? 
How do they work? 
Can I actually use these things? 
What does it mean to my app/development process?
Life on the Edge 
Web Components are beyond leading edge. 
As of this moment, they do not work in their entirety in any 
browser 
A good portion of the functionality is available in Chrome 
Canary if you turn on all of the experimental WebKit and 
JavaScript features
So, is it real? 
Even though Web Components are not fully supported in 
any browser, and are only partially supported in some 
browsers, Polymer and Polyfills allow use in many 
modern browsers today
Where can I use this today?
So why do I care? 
A few minor reasons you may like the idea, first: 
Encapsulation 
• Manageable Reuse 
• Hiding complexity and implementation 
• Dealing with duplicated IDs 
• Dealing with CSS scoping / propagation 
Ease of Distribution 
Appropriate technology choices 
• Markup in markup, not in code
How does it work? 
Web Components are a series of editors draft 
specifications: 
• Shadow DOM 
– http://w3c.github.io/webcomponents/spec/shadow/ 
• Custom Elements 
– http://w3c.github.io/webcomponents/spec/custom/ 
• HTML Imports 
– http://w3c.github.io/webcomponents/spec/imports/
Example Application 
• Let’s look at a sample application built using a 
series of Web Components 
• Combination of custom components, and 
those provided by the polymer-project
Templates 
The concept of templates is prolific and nearly self-explanatory. 
Their use takes a bit more effort: 
Inactive DOM Fragment 
Easily Clone-able 
Easily Change-able
Built In Templates 
You define them with the template element 
<template id="productTemplate"> 
<div> 
<img src=""> 
<div class="name"></div> 
<div class="description"></div> 
</div> 
</template> 
This is parsed but it’s not active. It’s not rendered.
Shadow DOM 
Shadow DOM is at the heart of the whole component 
concepts 
It’s encapsulation 
Its used by the browsers today to implement their own 
controls 
Ultimately its about hiding implementation details and 
exposing an interface
Shadow DOM 
The name and the technical explanation 
sometimes get in the way of the concept. 
Put simply, the user sees this: 
Photo by Photo by: Mark Kaelin/TechRepublic
Shadow DOM 
The browser sees this: 
Photo by Photo by: Mark Kaelin/TechRepublic
Shadow Host/Root
Rendering
Styles 
The Shadow also forms a boundary. Styles don’t cross 
unless you let them. So you to keep control of this area
Styles 
This, by default, goes both ways… meaning we aren’t 
worried about collisions. 
Outside styles don’t 
affect shadow content 
Styles defined in here 
are scoped locally
HTML Imports 
• HTML imports are about importing and sharing HTML 
content. 
• Why? Well, reuse, it facilitates the reuse of templates 
and provides us a fundamental need if we are going to 
share an encapsulated chunk we might call a 
component. 
• <link rel="import" href="goodies.html">
HTML Imports 
• Last word on this… 
• Imports aren’t supported pretty much anywhere yet, 
however, there are polyfills. 
• Imports are blocking. So, your page will act as though it 
needs this content before it can render.
Custom Elements 
• Elements are the key to putting this together. 
• Custom Elements are DOM elements that can be 
defined by a developer. 
• They are allowed to manage state and provide a 
scriptable interface. 
• In other words, they are the shell of what will become 
our component
Custom Elements 
• Defining a custom element like this: 
<polymer-element extends="button" name="fancy-button"> 
</polymer-element> 
• Allows you to use that custom element in your 
own markup: 
<div> 
<fancy-button></fancy-button> 
</div>
Custom Elements 
• You can use the concepts we previously discussed, 
templates, Shadow DOM, etc. from within a custom 
element. 
• Further, custom elements give you a set of Lifecycle 
callbacks so you can know things like when you are 
inserted into the DOM, removed and ready. 
• This means you can define the visual aspects of a 
custom element in mark up and the code in script.
Resources 
• http://www.w3.org/wiki/WebComponents/ 
• http://www.polymer-project.org/ 
• @polymer – officical twitter of the polymer 
project 
• @digitalprimates 
• @jefftapper

Contenu connexe

Tendances

Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPressLumosTech
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid LayoutRachel Andrew
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS PresentationShawn Calvert
 
Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming  Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming WebStackAcademy
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation joilrahat
 
Wordpress CMS tutorial and guide manual
Wordpress CMS tutorial and guide manualWordpress CMS tutorial and guide manual
Wordpress CMS tutorial and guide manualRalph Francis Cue
 
Introduction To WordPress
Introduction To WordPressIntroduction To WordPress
Introduction To WordPressCraig Bailey
 
Basic WordPress Workshop Presentation
Basic WordPress Workshop PresentationBasic WordPress Workshop Presentation
Basic WordPress Workshop PresentationFelix Albutra
 
Basic WordPress for Beginner ppt
Basic WordPress for Beginner pptBasic WordPress for Beginner ppt
Basic WordPress for Beginner pptDipika Wadhvani
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPressHarshad Mane
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Aaron Gustafson
 
Frontend Crash Course: HTML and CSS
Frontend Crash Course: HTML and CSSFrontend Crash Course: HTML and CSS
Frontend Crash Course: HTML and CSSThinkful
 

Tendances (20)

Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPress
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming  Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation
 
Css position
Css positionCss position
Css position
 
Java script
Java scriptJava script
Java script
 
Wordpress CMS tutorial and guide manual
Wordpress CMS tutorial and guide manualWordpress CMS tutorial and guide manual
Wordpress CMS tutorial and guide manual
 
Introduction To WordPress
Introduction To WordPressIntroduction To WordPress
Introduction To WordPress
 
Web design 3
Web design 3Web design 3
Web design 3
 
Basic WordPress Workshop Presentation
Basic WordPress Workshop PresentationBasic WordPress Workshop Presentation
Basic WordPress Workshop Presentation
 
CSS Best practice
CSS Best practiceCSS Best practice
CSS Best practice
 
Java script
Java scriptJava script
Java script
 
HTML5 & CSS3
HTML5 & CSS3 HTML5 & CSS3
HTML5 & CSS3
 
Basic WordPress for Beginner ppt
Basic WordPress for Beginner pptBasic WordPress for Beginner ppt
Basic WordPress for Beginner ppt
 
Design sitemap
Design sitemapDesign sitemap
Design sitemap
 
Wordpress
WordpressWordpress
Wordpress
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPress
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]
 
Frontend Crash Course: HTML and CSS
Frontend Crash Course: HTML and CSSFrontend Crash Course: HTML and CSS
Frontend Crash Course: HTML and CSS
 

En vedette

Website Design & Web History Presentation Add By Upul Chanaka
Website Design & Web History Presentation Add By Upul ChanakaWebsite Design & Web History Presentation Add By Upul Chanaka
Website Design & Web History Presentation Add By Upul ChanakaUpul Chanaka
 
Publishing Your Family History to the Web - Version 3
Publishing Your Family History to the Web - Version 3Publishing Your Family History to the Web - Version 3
Publishing Your Family History to the Web - Version 3Teresa Pask
 
Cloud Services with Doteasy.com
Cloud Services with Doteasy.comCloud Services with Doteasy.com
Cloud Services with Doteasy.comDoteasy
 
A concept for a web browser
A concept for a web browserA concept for a web browser
A concept for a web browserMphasis
 
Context And Concept Of Web Services
Context And Concept Of Web ServicesContext And Concept Of Web Services
Context And Concept Of Web ServicesFatih Taşkın
 
Internet infrastructure
Internet infrastructureInternet infrastructure
Internet infrastructureAmos Mpungu
 
Emerging payment technologies
Emerging payment technologiesEmerging payment technologies
Emerging payment technologiesUjwal Tamminedi
 
The Web: history - now - future
The Web: history - now - futureThe Web: history - now - future
The Web: history - now - futureKnowledge Hives
 
Internet infrastructure and the history of the world wide web presentation, f...
Internet infrastructure and the history of the world wide web presentation, f...Internet infrastructure and the history of the world wide web presentation, f...
Internet infrastructure and the history of the world wide web presentation, f...Graham Garner
 
Hardware for a_soft_world_bkup
Hardware for a_soft_world_bkupHardware for a_soft_world_bkup
Hardware for a_soft_world_bkupFITC
 
The Little Shop of TDD Horrors
The Little Shop of TDD HorrorsThe Little Shop of TDD Horrors
The Little Shop of TDD HorrorsFITC
 
Upgrading the Web with Douglas Crockford @ FITC's Web Unleashed 2015
Upgrading the Web with Douglas Crockford @ FITC's Web Unleashed 2015Upgrading the Web with Douglas Crockford @ FITC's Web Unleashed 2015
Upgrading the Web with Douglas Crockford @ FITC's Web Unleashed 2015FITC
 
Goofy, Goodfellas and a Gardener: The Masters of Experience Design.
Goofy, Goodfellas and a Gardener: The Masters of Experience Design.Goofy, Goodfellas and a Gardener: The Masters of Experience Design.
Goofy, Goodfellas and a Gardener: The Masters of Experience Design.FITC
 
21st Century Crystal Ball
21st Century Crystal Ball21st Century Crystal Ball
21st Century Crystal BallFITC
 
Everydays
EverydaysEverydays
EverydaysFITC
 
The Future of Motion/Gesture Technology
The Future of Motion/Gesture TechnologyThe Future of Motion/Gesture Technology
The Future of Motion/Gesture TechnologyFITC
 

En vedette (19)

Intensivo 80h - Links Patrocinados
Intensivo 80h - Links PatrocinadosIntensivo 80h - Links Patrocinados
Intensivo 80h - Links Patrocinados
 
Website Design & Web History Presentation Add By Upul Chanaka
Website Design & Web History Presentation Add By Upul ChanakaWebsite Design & Web History Presentation Add By Upul Chanaka
Website Design & Web History Presentation Add By Upul Chanaka
 
Publishing Your Family History to the Web - Version 3
Publishing Your Family History to the Web - Version 3Publishing Your Family History to the Web - Version 3
Publishing Your Family History to the Web - Version 3
 
Cloud Services with Doteasy.com
Cloud Services with Doteasy.comCloud Services with Doteasy.com
Cloud Services with Doteasy.com
 
A concept for a web browser
A concept for a web browserA concept for a web browser
A concept for a web browser
 
Context And Concept Of Web Services
Context And Concept Of Web ServicesContext And Concept Of Web Services
Context And Concept Of Web Services
 
Internet infrastructure
Internet infrastructureInternet infrastructure
Internet infrastructure
 
Sensex Sep 2015
Sensex Sep 2015Sensex Sep 2015
Sensex Sep 2015
 
Emerging payment technologies
Emerging payment technologiesEmerging payment technologies
Emerging payment technologies
 
The Web: history - now - future
The Web: history - now - futureThe Web: history - now - future
The Web: history - now - future
 
Internet infrastructure and the history of the world wide web presentation, f...
Internet infrastructure and the history of the world wide web presentation, f...Internet infrastructure and the history of the world wide web presentation, f...
Internet infrastructure and the history of the world wide web presentation, f...
 
Web Workflow
Web WorkflowWeb Workflow
Web Workflow
 
Hardware for a_soft_world_bkup
Hardware for a_soft_world_bkupHardware for a_soft_world_bkup
Hardware for a_soft_world_bkup
 
The Little Shop of TDD Horrors
The Little Shop of TDD HorrorsThe Little Shop of TDD Horrors
The Little Shop of TDD Horrors
 
Upgrading the Web with Douglas Crockford @ FITC's Web Unleashed 2015
Upgrading the Web with Douglas Crockford @ FITC's Web Unleashed 2015Upgrading the Web with Douglas Crockford @ FITC's Web Unleashed 2015
Upgrading the Web with Douglas Crockford @ FITC's Web Unleashed 2015
 
Goofy, Goodfellas and a Gardener: The Masters of Experience Design.
Goofy, Goodfellas and a Gardener: The Masters of Experience Design.Goofy, Goodfellas and a Gardener: The Masters of Experience Design.
Goofy, Goodfellas and a Gardener: The Masters of Experience Design.
 
21st Century Crystal Ball
21st Century Crystal Ball21st Century Crystal Ball
21st Century Crystal Ball
 
Everydays
EverydaysEverydays
Everydays
 
The Future of Motion/Gesture Technology
The Future of Motion/Gesture TechnologyThe Future of Motion/Gesture Technology
The Future of Motion/Gesture Technology
 

Similaire à Web Components: Building Reusable UI Components

Web Components
Web ComponentsWeb Components
Web ComponentsFITC
 
Reaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerReaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerFITC
 
Web components, so close!
Web components, so close!Web components, so close!
Web components, so close!Aleks Zinevych
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web ComponentsRich Bradshaw
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Componentssonumanoj
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyMarcos Labad
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Marco Breveglieri
 
Webcomponents TLV October 2014
Webcomponents TLV October 2014Webcomponents TLV October 2014
Webcomponents TLV October 2014Dmitry Bakaleinik
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialThomas Daly
 
Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...Marios Fakiolas
 
Introduction to Web Components & Polymer Workshop - JS Interactive
Introduction to Web Components & Polymer Workshop - JS InteractiveIntroduction to Web Components & Polymer Workshop - JS Interactive
Introduction to Web Components & Polymer Workshop - JS InteractiveJohn Riviello
 
Web component driven development
Web component driven developmentWeb component driven development
Web component driven developmentGil Fink
 
Angular Ivy- An Overview
Angular Ivy- An OverviewAngular Ivy- An Overview
Angular Ivy- An OverviewJalpesh Vadgama
 
IRJET- Polymer Javascript
IRJET- Polymer JavascriptIRJET- Polymer Javascript
IRJET- Polymer JavascriptIRJET Journal
 

Similaire à Web Components: Building Reusable UI Components (20)

Web Components
Web ComponentsWeb Components
Web Components
 
Reaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerReaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and Polymer
 
Web components, so close!
Web components, so close!Web components, so close!
Web components, so close!
 
Polymer 101
Polymer 101Polymer 101
Polymer 101
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Components
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
 
Manasa
ManasaManasa
Manasa
 
1_Intro_toHTML.ppt
1_Intro_toHTML.ppt1_Intro_toHTML.ppt
1_Intro_toHTML.ppt
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016
 
SDWest2005Goetsch
SDWest2005GoetschSDWest2005Goetsch
SDWest2005Goetsch
 
Webcomponents TLV October 2014
Webcomponents TLV October 2014Webcomponents TLV October 2014
Webcomponents TLV October 2014
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJSMicro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
 
Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...
 
Introduction to Web Components & Polymer Workshop - JS Interactive
Introduction to Web Components & Polymer Workshop - JS InteractiveIntroduction to Web Components & Polymer Workshop - JS Interactive
Introduction to Web Components & Polymer Workshop - JS Interactive
 
Webcomponents v2
Webcomponents v2Webcomponents v2
Webcomponents v2
 
Web component driven development
Web component driven developmentWeb component driven development
Web component driven development
 
Angular Ivy- An Overview
Angular Ivy- An OverviewAngular Ivy- An Overview
Angular Ivy- An Overview
 
IRJET- Polymer Javascript
IRJET- Polymer JavascriptIRJET- Polymer Javascript
IRJET- Polymer Javascript
 

Plus de FITC

Cut it up
Cut it upCut it up
Cut it upFITC
 
Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital HealthFITC
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript PerformanceFITC
 
Surviving Your Tech Stack
Surviving Your Tech StackSurviving Your Tech Stack
Surviving Your Tech StackFITC
 
How to Pitch Your First AR Project
How to Pitch Your First AR ProjectHow to Pitch Your First AR Project
How to Pitch Your First AR ProjectFITC
 
Start by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerStart by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerFITC
 
Cocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryCocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryFITC
 
Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday InnovationFITC
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight WebsitesFITC
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is TerrifyingFITC
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanFITC
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)FITC
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameFITC
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare SystemFITC
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignFITC
 
The Power of Now
The Power of NowThe Power of Now
The Power of NowFITC
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAsFITC
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstackFITC
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFITC
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForFITC
 

Plus de FITC (20)

Cut it up
Cut it upCut it up
Cut it up
 
Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital Health
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript Performance
 
Surviving Your Tech Stack
Surviving Your Tech StackSurviving Your Tech Stack
Surviving Your Tech Stack
 
How to Pitch Your First AR Project
How to Pitch Your First AR ProjectHow to Pitch Your First AR Project
How to Pitch Your First AR Project
 
Start by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerStart by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the Answer
 
Cocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryCocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s Story
 
Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday Innovation
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight Websites
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is Terrifying
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future Human
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR Game
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare System
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product Design
 
The Power of Now
The Power of NowThe Power of Now
The Power of Now
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAs
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstack
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self Discovery
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time For
 

Dernier

Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 

Dernier (20)

Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 

Web Components: Building Reusable UI Components

  • 1. Web Components Jeff Tapper Digital Primates @jefftapper / @digitalprimates
  • 2. Who am I? • Senior Consultant at Digital Primates – Building next generation client applications • Developing Internet applications for 19 years • Author of 12 books on Internet technologies
  • 4. What are Web Components? Web Components are an attempt to let you write custom components that can be used like this: <body> Sales:<br> <my-super-cool-chart id="coolChart"> </ my-super-cool-chart > </body>
  • 5. What is Polymer? A library built on top of Web Components. Allows us to use Web Components today in modern browsers which don’t yet support Web Components 3 main pieces • A set of polyfills • Web application framework • Set of UI components
  • 6. What are we covering? Web Components, specifically: What in the world are web components? What problem are they trying to solve? How do they work? Can I actually use these things? What does it mean to my app/development process?
  • 7. Life on the Edge Web Components are beyond leading edge. As of this moment, they do not work in their entirety in any browser A good portion of the functionality is available in Chrome Canary if you turn on all of the experimental WebKit and JavaScript features
  • 8. So, is it real? Even though Web Components are not fully supported in any browser, and are only partially supported in some browsers, Polymer and Polyfills allow use in many modern browsers today
  • 9. Where can I use this today?
  • 10. So why do I care? A few minor reasons you may like the idea, first: Encapsulation • Manageable Reuse • Hiding complexity and implementation • Dealing with duplicated IDs • Dealing with CSS scoping / propagation Ease of Distribution Appropriate technology choices • Markup in markup, not in code
  • 11. How does it work? Web Components are a series of editors draft specifications: • Shadow DOM – http://w3c.github.io/webcomponents/spec/shadow/ • Custom Elements – http://w3c.github.io/webcomponents/spec/custom/ • HTML Imports – http://w3c.github.io/webcomponents/spec/imports/
  • 12. Example Application • Let’s look at a sample application built using a series of Web Components • Combination of custom components, and those provided by the polymer-project
  • 13. Templates The concept of templates is prolific and nearly self-explanatory. Their use takes a bit more effort: Inactive DOM Fragment Easily Clone-able Easily Change-able
  • 14. Built In Templates You define them with the template element <template id="productTemplate"> <div> <img src=""> <div class="name"></div> <div class="description"></div> </div> </template> This is parsed but it’s not active. It’s not rendered.
  • 15. Shadow DOM Shadow DOM is at the heart of the whole component concepts It’s encapsulation Its used by the browsers today to implement their own controls Ultimately its about hiding implementation details and exposing an interface
  • 16. Shadow DOM The name and the technical explanation sometimes get in the way of the concept. Put simply, the user sees this: Photo by Photo by: Mark Kaelin/TechRepublic
  • 17. Shadow DOM The browser sees this: Photo by Photo by: Mark Kaelin/TechRepublic
  • 20. Styles The Shadow also forms a boundary. Styles don’t cross unless you let them. So you to keep control of this area
  • 21. Styles This, by default, goes both ways… meaning we aren’t worried about collisions. Outside styles don’t affect shadow content Styles defined in here are scoped locally
  • 22. HTML Imports • HTML imports are about importing and sharing HTML content. • Why? Well, reuse, it facilitates the reuse of templates and provides us a fundamental need if we are going to share an encapsulated chunk we might call a component. • <link rel="import" href="goodies.html">
  • 23. HTML Imports • Last word on this… • Imports aren’t supported pretty much anywhere yet, however, there are polyfills. • Imports are blocking. So, your page will act as though it needs this content before it can render.
  • 24. Custom Elements • Elements are the key to putting this together. • Custom Elements are DOM elements that can be defined by a developer. • They are allowed to manage state and provide a scriptable interface. • In other words, they are the shell of what will become our component
  • 25. Custom Elements • Defining a custom element like this: <polymer-element extends="button" name="fancy-button"> </polymer-element> • Allows you to use that custom element in your own markup: <div> <fancy-button></fancy-button> </div>
  • 26. Custom Elements • You can use the concepts we previously discussed, templates, Shadow DOM, etc. from within a custom element. • Further, custom elements give you a set of Lifecycle callbacks so you can know things like when you are inserted into the DOM, removed and ready. • This means you can define the visual aspects of a custom element in mark up and the code in script.
  • 27. Resources • http://www.w3.org/wiki/WebComponents/ • http://www.polymer-project.org/ • @polymer – officical twitter of the polymer project • @digitalprimates • @jefftapper