SlideShare a Scribd company logo
1 of 27
<web-components> Web back to future </web-components> 
by Anna Khabibullina
.Agenda 
_ Web Components and their parts 
_ X-Browser Support 
_ Demo 
_ Best Practices
.About Me 
_ Co-founder of DA-14 Web Dev Team 
http://da-14.com 
_ Web Engineer 
http://sitecues.com 
_ Open Source Contributor 
http://github.com/akhabibullina 
_ Social Person 
http://twitter.com/_khabibullina
.What I work on 
_ SaaS application(assistive 
tool) 
_ (No) libraries 
_ No frameworks 
_ UX design matters 
_ Accessibility in mind 
.Welcome every problem as opportunity 
_ Better understanding 
_ R&D challenges 
_ Taking advantage of new technologies 
_ Experimental features 
_ X-browser support for modern browsers
.Web Components Made Of Rainbows 
Set of cutting edge [draft] standards 
proposed by Google that make it 
possible to build secure reusable 
widgets using web platform 
technologies.
.Web Components 
Comprised of four parts: 
_ Templates 
_ Custom Elements 
_ HTML Imports 
_ Shadow DOM
Templates: Standardizing client-side templating 
_ Why? : Maximize code reusability and maintainability. 
_ How? : Declare inert chunks of cloneable DOM with <template>. 
_ http://www.html5rocks.com/en/tutorials/webcomponents/template
Templates 
_ Inert markup 
<table> 
<tr> 
<template id="cells-to-repeat"> 
<td>Some content!</td> 
</template> 
</tr> 
</table> 
_ Activate template 
var t = document.querySelector('template').content; 
var clone = document.importNode(t, true); 
document.body.appendChild(clone);
.Web Components 
Templates 
Custom Elements 
HTML Imports 
Shadow DOM
Custom Elements: Sexy markup 
_ Why? : There is nothing modern in <div> soup. 
_ How? : Define new types of HTML elements and their APIs. 
_ http://www.html5rocks.com/en/tutorials/webcomponents/customelements
Custom Elements 
_ JavaScript 
var CustomElementProto = Object.create(HTMLElement.prototype); 
var XFoo = document.registerElement('x-custom-da-14', { 
prototype: CustomElementProto 
}); 
var xfoo = new XFoo(); 
document.body.appendChild(xfoo); 
_ HTML 
<x-custom-da-14></x-custom-da-14>
.Web Components 
Templates 
Custom Elements 
HTML Imports 
Shadow DOM
HTML Imports: Simple way to load HTML elements 
_ Why? : The web's most basic content, HTML, requires the 
greatest amount of effort to work with. 
_ How? : Import HTML components via <link rel="import">. 
_ http://www.html5rocks.com/en/tutorials/webcomponents/imports
HTML Imports 
index.html 
<head> 
<link rel="import" href="/path/to/import.html"> 
</head> 
<body> 
… 
</body> 
<script> … </script> import.html 
… 
<div id="blog-post">...</div> 
var c = document.querySelector('link[rel="import"]').import; access content
HTML Imports 
Yo dawg. I hear you like imports, so I included an import in your import.
.Web Components 
Templates 
Custom Elements 
HTML Imports 
Shadow DOM
Shadow DOM: Separating content from presentation 
_ Why? : DOM tree encapsulation problem. 
_ How? : Think about DOM hosting DOM, which hosts more DOM. 
_ 
http://www.html5rocks.com/en/tutorials/webcomponent 
s/shadowdom
Shadow DOM 
_ Video player 
<video controls="" autoplay="" name="media"> 
<source src="http://localhost:1000/media" type="audio/mpeg"> 
</video>
Shadow DOM 
_ http://html5-demos.appspot.com/shadowdom-visualizer
.Web Components 
Templates 
Standardizing client-side templating 
Custom Elements 
Sexy markup 
HTML Imports 
Simple way to load HTML elements 
Shadow DOM 
Separating content from presentation
.Web Components
.Best Practices 
_ Namespacing(bower.io, customelements.io) 
_ Mimic built-in elements as closely as possible 
_ Don't put too much in Shadow DOM 
_ Don't create more custom elements than you need 
….. 
_ Accessibility 
_ Performance 
_ Testing 
_ http://webcomponents.org/articles/web-components-best- 
practices/
.X-Browser Support 
_ X-TAG 
http://x-tags.org/ 
_ POLYMER 
http://www.polymer-project. 
_ http://jonrimmer.github.io/are-we-componentized-yet/ 
org/ 
_ BOSONIC 
http://bosonic.github.io/
.Demo 
_ CUSTOMELEMENTS.IO 
A gallery to display Web Components 
created by the community. 
http://customelements.io/ 
_ COMPONENT KITCHEN 
Component catalog for a mainstream 
HTML audience. 
http://component.kitchen/ 
http://html5-demos.appspot.com/static/webcomponents/index.html#1
.Web Components Supporting Cast: Awesome Future Web 
_ document.querySelectorAll() 
_ Object.observe() 
_ MutationObserver 
_ CSS variables, calc() 
http://wiki.ecmascript.org/doku.php?id=harmony:observe
..YYoouurr t tuurnr…nD…is Dcoisvecro!ver!
.Useful links 
_ http://www.w3.org/wiki/WebComponents/ 
_ http://webcomponents.org/ 
_ http://habrahabr.ru/post/210058/ 
_ http://css-tricks.com/modular-future-web-components/ 
_ http://webcomponents.org/presentations/accessibility-of-web-components- 
at-jsconf-us/ 
_ https://www.youtube.com/watch?v=2txPYQOWBtg 
_ http://www.youtube.com/watch?v=eJZx9c6YL8k 
_ http://jonrimmer.github.io/are-we-componentized-yet/ 
_ http://w3c.github.io/webcomponents/spec/custom/#es6

More Related Content

What's hot

Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Polymer - Welcome to the Future @ PyGrunn 08/07/2014Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Polymer - Welcome to the Future @ PyGrunn 08/07/2014Spyros Ioakeimidis
 
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17GreeceJS
 
Web Components
Web ComponentsWeb Components
Web ComponentsFITC
 
Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)jskvara
 
Web Components with Polymer (extra Polymer 2.0)
Web Components with Polymer (extra Polymer 2.0)Web Components with Polymer (extra Polymer 2.0)
Web Components with Polymer (extra Polymer 2.0)Dhyego Fernando
 
Polymer & the web components revolution 6:25:14
Polymer & the web components revolution 6:25:14Polymer & the web components revolution 6:25:14
Polymer & the web components revolution 6:25:14mattsmcnulty
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web ComponentsFu Cheng
 
Google Polymer Introduction
Google Polymer IntroductionGoogle Polymer Introduction
Google Polymer IntroductionDavid Price
 
Александр Кашеверов - Polymer
Александр Кашеверов - PolymerАлександр Кашеверов - Polymer
Александр Кашеверов - PolymerDataArt
 
Web Components and Modular CSS
Web Components and Modular CSSWeb Components and Modular CSS
Web Components and Modular CSSAndrew Rota
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web ComponentsRich Bradshaw
 
HTML5와 오픈소스 기반의 Web Components 기술
HTML5와 오픈소스 기반의 Web Components 기술HTML5와 오픈소스 기반의 Web Components 기술
HTML5와 오픈소스 기반의 Web Components 기술Jeongkyu Shin
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMconnectwebex
 
Levent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & PolymerLevent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & PolymerErik Isaksen
 
Polymer - Lego for the web!
Polymer - Lego for the web!Polymer - Lego for the web!
Polymer - Lego for the web!Codemotion
 
Razor into the Razor'verse
Razor into the Razor'verseRazor into the Razor'verse
Razor into the Razor'verseEd Charbeneau
 
Build Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponentsBuild Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponentsGil Fink
 

What's hot (20)

Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Polymer - Welcome to the Future @ PyGrunn 08/07/2014Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Polymer - Welcome to the Future @ PyGrunn 08/07/2014
 
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
 
Web Components
Web ComponentsWeb Components
Web Components
 
Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)
 
Web Components with Polymer (extra Polymer 2.0)
Web Components with Polymer (extra Polymer 2.0)Web Components with Polymer (extra Polymer 2.0)
Web Components with Polymer (extra Polymer 2.0)
 
Polymer & the web components revolution 6:25:14
Polymer & the web components revolution 6:25:14Polymer & the web components revolution 6:25:14
Polymer & the web components revolution 6:25:14
 
Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
 
Google Polymer Introduction
Google Polymer IntroductionGoogle Polymer Introduction
Google Polymer Introduction
 
Александр Кашеверов - Polymer
Александр Кашеверов - PolymerАлександр Кашеверов - Polymer
Александр Кашеверов - Polymer
 
Google Polymer Framework
Google Polymer FrameworkGoogle Polymer Framework
Google Polymer Framework
 
Web Components and Modular CSS
Web Components and Modular CSSWeb Components and Modular CSS
Web Components and Modular CSS
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
 
HTML5와 오픈소스 기반의 Web Components 기술
HTML5와 오픈소스 기반의 Web Components 기술HTML5와 오픈소스 기반의 Web Components 기술
HTML5와 오픈소스 기반의 Web Components 기술
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
 
Levent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & PolymerLevent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & Polymer
 
Polymer - Lego for the web!
Polymer - Lego for the web!Polymer - Lego for the web!
Polymer - Lego for the web!
 
Polymer
PolymerPolymer
Polymer
 
Razor into the Razor'verse
Razor into the Razor'verseRazor into the Razor'verse
Razor into the Razor'verse
 
Build Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponentsBuild Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponents
 

Viewers also liked

WORKSHOP SULLE ANTICHE TECNICHE DI STAMPA FOTOGRAFICA
WORKSHOP SULLE ANTICHE TECNICHE DI STAMPA FOTOGRAFICAWORKSHOP SULLE ANTICHE TECNICHE DI STAMPA FOTOGRAFICA
WORKSHOP SULLE ANTICHE TECNICHE DI STAMPA FOTOGRAFICAFabrizia Caleari
 
03.07.2014 odf oleg_sentsov_case_ua
03.07.2014 odf oleg_sentsov_case_ua03.07.2014 odf oleg_sentsov_case_ua
03.07.2014 odf oleg_sentsov_case_uaodfoundation
 
Παρουσίαση αποτελεσμάτων Σ.Κ.Ζ.
Παρουσίαση αποτελεσμάτων Σ.Κ.Ζ.Παρουσίαση αποτελεσμάτων Σ.Κ.Ζ.
Παρουσίαση αποτελεσμάτων Σ.Κ.Ζ.nouxristina
 
Diaporama British Museum
Diaporama British MuseumDiaporama British Museum
Diaporama British Museummhr56
 
Tech talk Angular 2
Tech talk Angular 2Tech talk Angular 2
Tech talk Angular 2DA-14
 
Data-Driven Marketing Roadshow ERN - March 26, 2014
Data-Driven Marketing Roadshow ERN - March 26, 2014Data-Driven Marketing Roadshow ERN - March 26, 2014
Data-Driven Marketing Roadshow ERN - March 26, 2014DDM Alliance
 
25 08-2014-odf-report-case-of-nadezhda-savchenko-ua
25 08-2014-odf-report-case-of-nadezhda-savchenko-ua25 08-2014-odf-report-case-of-nadezhda-savchenko-ua
25 08-2014-odf-report-case-of-nadezhda-savchenko-uaodfoundation
 
Train ต.8(peerawat) 5307231
Train ต.8(peerawat) 5307231Train ต.8(peerawat) 5307231
Train ต.8(peerawat) 5307231IndyArch Osk
 
06.02.2014 odf ukraine_military_scenario_pl
06.02.2014 odf ukraine_military_scenario_pl06.02.2014 odf ukraine_military_scenario_pl
06.02.2014 odf ukraine_military_scenario_plodfoundation
 
El prado
El pradoEl prado
El pradomhr56
 
το σχολείο & η πόλη μας!!!
το σχολείο & η πόλη μας!!!το σχολείο & η πόλη μας!!!
το σχολείο & η πόλη μας!!!nouxristina
 
Yd2605142 odf prelim_report_elections_2014_ua
Yd2605142 odf prelim_report_elections_2014_uaYd2605142 odf prelim_report_elections_2014_ua
Yd2605142 odf prelim_report_elections_2014_uaodfoundation
 
23 06-2014-odf-report-russian-federation-supports-terrorists-in-eastern-ukrai...
23 06-2014-odf-report-russian-federation-supports-terrorists-in-eastern-ukrai...23 06-2014-odf-report-russian-federation-supports-terrorists-in-eastern-ukrai...
23 06-2014-odf-report-russian-federation-supports-terrorists-in-eastern-ukrai...odfoundation
 
Nanigans Keynote - DDM Alliance Summit Marketing on Facebook
Nanigans Keynote - DDM Alliance Summit Marketing on FacebookNanigans Keynote - DDM Alliance Summit Marketing on Facebook
Nanigans Keynote - DDM Alliance Summit Marketing on FacebookDDM Alliance
 
Fundacja otwaty dialog_sprawozdanie_finansowe_2014
Fundacja otwaty dialog_sprawozdanie_finansowe_2014Fundacja otwaty dialog_sprawozdanie_finansowe_2014
Fundacja otwaty dialog_sprawozdanie_finansowe_2014odfoundation
 

Viewers also liked (17)

WORKSHOP SULLE ANTICHE TECNICHE DI STAMPA FOTOGRAFICA
WORKSHOP SULLE ANTICHE TECNICHE DI STAMPA FOTOGRAFICAWORKSHOP SULLE ANTICHE TECNICHE DI STAMPA FOTOGRAFICA
WORKSHOP SULLE ANTICHE TECNICHE DI STAMPA FOTOGRAFICA
 
03.07.2014 odf oleg_sentsov_case_ua
03.07.2014 odf oleg_sentsov_case_ua03.07.2014 odf oleg_sentsov_case_ua
03.07.2014 odf oleg_sentsov_case_ua
 
Παρουσίαση αποτελεσμάτων Σ.Κ.Ζ.
Παρουσίαση αποτελεσμάτων Σ.Κ.Ζ.Παρουσίαση αποτελεσμάτων Σ.Κ.Ζ.
Παρουσίαση αποτελεσμάτων Σ.Κ.Ζ.
 
Diaporama British Museum
Diaporama British MuseumDiaporama British Museum
Diaporama British Museum
 
Tech talk Angular 2
Tech talk Angular 2Tech talk Angular 2
Tech talk Angular 2
 
Data-Driven Marketing Roadshow ERN - March 26, 2014
Data-Driven Marketing Roadshow ERN - March 26, 2014Data-Driven Marketing Roadshow ERN - March 26, 2014
Data-Driven Marketing Roadshow ERN - March 26, 2014
 
25 08-2014-odf-report-case-of-nadezhda-savchenko-ua
25 08-2014-odf-report-case-of-nadezhda-savchenko-ua25 08-2014-odf-report-case-of-nadezhda-savchenko-ua
25 08-2014-odf-report-case-of-nadezhda-savchenko-ua
 
Sprawozdanie 2011
Sprawozdanie 2011Sprawozdanie 2011
Sprawozdanie 2011
 
Train ต.8(peerawat) 5307231
Train ต.8(peerawat) 5307231Train ต.8(peerawat) 5307231
Train ต.8(peerawat) 5307231
 
06.02.2014 odf ukraine_military_scenario_pl
06.02.2014 odf ukraine_military_scenario_pl06.02.2014 odf ukraine_military_scenario_pl
06.02.2014 odf ukraine_military_scenario_pl
 
El prado
El pradoEl prado
El prado
 
το σχολείο & η πόλη μας!!!
το σχολείο & η πόλη μας!!!το σχολείο & η πόλη μας!!!
το σχολείο & η πόλη μας!!!
 
Yd2605142 odf prelim_report_elections_2014_ua
Yd2605142 odf prelim_report_elections_2014_uaYd2605142 odf prelim_report_elections_2014_ua
Yd2605142 odf prelim_report_elections_2014_ua
 
23 06-2014-odf-report-russian-federation-supports-terrorists-in-eastern-ukrai...
23 06-2014-odf-report-russian-federation-supports-terrorists-in-eastern-ukrai...23 06-2014-odf-report-russian-federation-supports-terrorists-in-eastern-ukrai...
23 06-2014-odf-report-russian-federation-supports-terrorists-in-eastern-ukrai...
 
Nanigans Keynote - DDM Alliance Summit Marketing on Facebook
Nanigans Keynote - DDM Alliance Summit Marketing on FacebookNanigans Keynote - DDM Alliance Summit Marketing on Facebook
Nanigans Keynote - DDM Alliance Summit Marketing on Facebook
 
Fundacja otwaty dialog_sprawozdanie_finansowe_2014
Fundacja otwaty dialog_sprawozdanie_finansowe_2014Fundacja otwaty dialog_sprawozdanie_finansowe_2014
Fundacja otwaty dialog_sprawozdanie_finansowe_2014
 
SmartSuite Webinar: Turning Data into Actionable Information
SmartSuite Webinar: Turning Data into Actionable InformationSmartSuite Webinar: Turning Data into Actionable Information
SmartSuite Webinar: Turning Data into Actionable Information
 

Similar to Web Components: back to the future

Web Components: Web back to future.
Web Components: Web back to future.Web Components: Web back to future.
Web Components: Web back to future.GlobalLogic Ukraine
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introductioncherukumilli2
 
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 compoents
Introduction to web compoentsIntroduction to web compoents
Introduction to web compoentsRan Wahle
 
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
 
Rawnet Lightning Talk - Web Components
Rawnet Lightning Talk - Web ComponentsRawnet Lightning Talk - Web Components
Rawnet Lightning Talk - Web ComponentsRawnet
 
Web components
Web componentsWeb components
Web componentsNoam Kfir
 
Introduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopIntroduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopMark Rackley
 
Polymer - Una bella historia de amor
Polymer - Una bella historia de amorPolymer - Una bella historia de amor
Polymer - Una bella historia de amorIsrael Blancas
 
Polymer-Powered Design Systems - DevFest Florida
Polymer-Powered Design Systems - DevFest FloridaPolymer-Powered Design Systems - DevFest Florida
Polymer-Powered Design Systems - DevFest FloridaJohn Riviello
 
Building reusable components as micro frontends with glimmer js and webcompo...
Building reusable components as micro frontends  with glimmer js and webcompo...Building reusable components as micro frontends  with glimmer js and webcompo...
Building reusable components as micro frontends with glimmer js and webcompo...Andrei Sebastian Cîmpean
 
Web Components
Web ComponentsWeb Components
Web ComponentsFITC
 
Angular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHEREAngular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHERENadav Mary
 
Leveraging the Power of Custom Elements in Gutenberg
Leveraging the Power of Custom Elements in GutenbergLeveraging the Power of Custom Elements in Gutenberg
Leveraging the Power of Custom Elements in GutenbergFelix Arntz
 
Orchard Harvest 2014 - The Future of Widgets?
Orchard Harvest 2014 - The Future of Widgets?Orchard Harvest 2014 - The Future of Widgets?
Orchard Harvest 2014 - The Future of Widgets?Steve Taylor
 
Vue micro frontend implementation patterns
Vue micro frontend implementation patternsVue micro frontend implementation patterns
Vue micro frontend implementation patternsAlbert Brand
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 
Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013gdgyaounde
 

Similar to Web Components: back to the future (20)

Web Components: Web back to future.
Web Components: Web back to future.Web Components: Web back to future.
Web Components: Web back to future.
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
 
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 compoents
Introduction to web compoentsIntroduction to web compoents
Introduction to web compoents
 
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
 
Rawnet Lightning Talk - Web Components
Rawnet Lightning Talk - Web ComponentsRawnet Lightning Talk - Web Components
Rawnet Lightning Talk - Web Components
 
Web components
Web componentsWeb components
Web components
 
Introduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint WorkshopIntroduction to Client Side Dev in SharePoint Workshop
Introduction to Client Side Dev in SharePoint Workshop
 
Polymer - Una bella historia de amor
Polymer - Una bella historia de amorPolymer - Una bella historia de amor
Polymer - Una bella historia de amor
 
Web components api + Vuejs
Web components api + VuejsWeb components api + Vuejs
Web components api + Vuejs
 
Polymer-Powered Design Systems - DevFest Florida
Polymer-Powered Design Systems - DevFest FloridaPolymer-Powered Design Systems - DevFest Florida
Polymer-Powered Design Systems - DevFest Florida
 
Building reusable components as micro frontends with glimmer js and webcompo...
Building reusable components as micro frontends  with glimmer js and webcompo...Building reusable components as micro frontends  with glimmer js and webcompo...
Building reusable components as micro frontends with glimmer js and webcompo...
 
Web Components
Web ComponentsWeb Components
Web Components
 
Angular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHEREAngular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHERE
 
Leveraging the Power of Custom Elements in Gutenberg
Leveraging the Power of Custom Elements in GutenbergLeveraging the Power of Custom Elements in Gutenberg
Leveraging the Power of Custom Elements in Gutenberg
 
Orchard Harvest 2014 - The Future of Widgets?
Orchard Harvest 2014 - The Future of Widgets?Orchard Harvest 2014 - The Future of Widgets?
Orchard Harvest 2014 - The Future of Widgets?
 
Vue micro frontend implementation patterns
Vue micro frontend implementation patternsVue micro frontend implementation patterns
Vue micro frontend implementation patterns
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013
 

More from DA-14

Express js clean-controller
Express js clean-controllerExpress js clean-controller
Express js clean-controllerDA-14
 
Express js api-versioning
Express js api-versioningExpress js api-versioning
Express js api-versioningDA-14
 
AngularJS: what is underneath the hood
AngularJS: what is underneath the hood AngularJS: what is underneath the hood
AngularJS: what is underneath the hood DA-14
 
Firebase not really_yohoho
Firebase not really_yohohoFirebase not really_yohoho
Firebase not really_yohohoDA-14
 
Techtalk#8: Design patterns in real life
Techtalk#8: Design patterns in real lifeTechtalk#8: Design patterns in real life
Techtalk#8: Design patterns in real lifeDA-14
 
Techtalk#7: Architecture principles by Steve McConnell's book "Code Complete"
Techtalk#7: Architecture principles by Steve McConnell's book "Code Complete"Techtalk#7: Architecture principles by Steve McConnell's book "Code Complete"
Techtalk#7: Architecture principles by Steve McConnell's book "Code Complete"DA-14
 
Mysql, MongoDb feat. Doctrine2
Mysql, MongoDb feat. Doctrine2Mysql, MongoDb feat. Doctrine2
Mysql, MongoDb feat. Doctrine2DA-14
 
Techtalk#6: NodeJs: pitfalls (based on game project)
Techtalk#6: NodeJs: pitfalls (based on game project)Techtalk#6: NodeJs: pitfalls (based on game project)
Techtalk#6: NodeJs: pitfalls (based on game project)DA-14
 
JS Frameworks Day April,26 of 2014
JS Frameworks Day April,26 of 2014JS Frameworks Day April,26 of 2014
JS Frameworks Day April,26 of 2014DA-14
 
TechTalk#2: Принципы управления временем
TechTalk#2: Принципы управления временемTechTalk#2: Принципы управления временем
TechTalk#2: Принципы управления временемDA-14
 
TechTalk#3: REST
TechTalk#3: RESTTechTalk#3: REST
TechTalk#3: RESTDA-14
 

More from DA-14 (11)

Express js clean-controller
Express js clean-controllerExpress js clean-controller
Express js clean-controller
 
Express js api-versioning
Express js api-versioningExpress js api-versioning
Express js api-versioning
 
AngularJS: what is underneath the hood
AngularJS: what is underneath the hood AngularJS: what is underneath the hood
AngularJS: what is underneath the hood
 
Firebase not really_yohoho
Firebase not really_yohohoFirebase not really_yohoho
Firebase not really_yohoho
 
Techtalk#8: Design patterns in real life
Techtalk#8: Design patterns in real lifeTechtalk#8: Design patterns in real life
Techtalk#8: Design patterns in real life
 
Techtalk#7: Architecture principles by Steve McConnell's book "Code Complete"
Techtalk#7: Architecture principles by Steve McConnell's book "Code Complete"Techtalk#7: Architecture principles by Steve McConnell's book "Code Complete"
Techtalk#7: Architecture principles by Steve McConnell's book "Code Complete"
 
Mysql, MongoDb feat. Doctrine2
Mysql, MongoDb feat. Doctrine2Mysql, MongoDb feat. Doctrine2
Mysql, MongoDb feat. Doctrine2
 
Techtalk#6: NodeJs: pitfalls (based on game project)
Techtalk#6: NodeJs: pitfalls (based on game project)Techtalk#6: NodeJs: pitfalls (based on game project)
Techtalk#6: NodeJs: pitfalls (based on game project)
 
JS Frameworks Day April,26 of 2014
JS Frameworks Day April,26 of 2014JS Frameworks Day April,26 of 2014
JS Frameworks Day April,26 of 2014
 
TechTalk#2: Принципы управления временем
TechTalk#2: Принципы управления временемTechTalk#2: Принципы управления временем
TechTalk#2: Принципы управления временем
 
TechTalk#3: REST
TechTalk#3: RESTTechTalk#3: REST
TechTalk#3: REST
 

Recently uploaded

Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringJuanCarlosMorales19600
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptJasonTagapanGulla
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 

Recently uploaded (20)

Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineering
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.ppt
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 

Web Components: back to the future

  • 1. <web-components> Web back to future </web-components> by Anna Khabibullina
  • 2. .Agenda _ Web Components and their parts _ X-Browser Support _ Demo _ Best Practices
  • 3. .About Me _ Co-founder of DA-14 Web Dev Team http://da-14.com _ Web Engineer http://sitecues.com _ Open Source Contributor http://github.com/akhabibullina _ Social Person http://twitter.com/_khabibullina
  • 4. .What I work on _ SaaS application(assistive tool) _ (No) libraries _ No frameworks _ UX design matters _ Accessibility in mind .Welcome every problem as opportunity _ Better understanding _ R&D challenges _ Taking advantage of new technologies _ Experimental features _ X-browser support for modern browsers
  • 5. .Web Components Made Of Rainbows Set of cutting edge [draft] standards proposed by Google that make it possible to build secure reusable widgets using web platform technologies.
  • 6. .Web Components Comprised of four parts: _ Templates _ Custom Elements _ HTML Imports _ Shadow DOM
  • 7. Templates: Standardizing client-side templating _ Why? : Maximize code reusability and maintainability. _ How? : Declare inert chunks of cloneable DOM with <template>. _ http://www.html5rocks.com/en/tutorials/webcomponents/template
  • 8. Templates _ Inert markup <table> <tr> <template id="cells-to-repeat"> <td>Some content!</td> </template> </tr> </table> _ Activate template var t = document.querySelector('template').content; var clone = document.importNode(t, true); document.body.appendChild(clone);
  • 9. .Web Components Templates Custom Elements HTML Imports Shadow DOM
  • 10. Custom Elements: Sexy markup _ Why? : There is nothing modern in <div> soup. _ How? : Define new types of HTML elements and their APIs. _ http://www.html5rocks.com/en/tutorials/webcomponents/customelements
  • 11. Custom Elements _ JavaScript var CustomElementProto = Object.create(HTMLElement.prototype); var XFoo = document.registerElement('x-custom-da-14', { prototype: CustomElementProto }); var xfoo = new XFoo(); document.body.appendChild(xfoo); _ HTML <x-custom-da-14></x-custom-da-14>
  • 12. .Web Components Templates Custom Elements HTML Imports Shadow DOM
  • 13. HTML Imports: Simple way to load HTML elements _ Why? : The web's most basic content, HTML, requires the greatest amount of effort to work with. _ How? : Import HTML components via <link rel="import">. _ http://www.html5rocks.com/en/tutorials/webcomponents/imports
  • 14. HTML Imports index.html <head> <link rel="import" href="/path/to/import.html"> </head> <body> … </body> <script> … </script> import.html … <div id="blog-post">...</div> var c = document.querySelector('link[rel="import"]').import; access content
  • 15. HTML Imports Yo dawg. I hear you like imports, so I included an import in your import.
  • 16. .Web Components Templates Custom Elements HTML Imports Shadow DOM
  • 17. Shadow DOM: Separating content from presentation _ Why? : DOM tree encapsulation problem. _ How? : Think about DOM hosting DOM, which hosts more DOM. _ http://www.html5rocks.com/en/tutorials/webcomponent s/shadowdom
  • 18. Shadow DOM _ Video player <video controls="" autoplay="" name="media"> <source src="http://localhost:1000/media" type="audio/mpeg"> </video>
  • 19. Shadow DOM _ http://html5-demos.appspot.com/shadowdom-visualizer
  • 20. .Web Components Templates Standardizing client-side templating Custom Elements Sexy markup HTML Imports Simple way to load HTML elements Shadow DOM Separating content from presentation
  • 22. .Best Practices _ Namespacing(bower.io, customelements.io) _ Mimic built-in elements as closely as possible _ Don't put too much in Shadow DOM _ Don't create more custom elements than you need ….. _ Accessibility _ Performance _ Testing _ http://webcomponents.org/articles/web-components-best- practices/
  • 23. .X-Browser Support _ X-TAG http://x-tags.org/ _ POLYMER http://www.polymer-project. _ http://jonrimmer.github.io/are-we-componentized-yet/ org/ _ BOSONIC http://bosonic.github.io/
  • 24. .Demo _ CUSTOMELEMENTS.IO A gallery to display Web Components created by the community. http://customelements.io/ _ COMPONENT KITCHEN Component catalog for a mainstream HTML audience. http://component.kitchen/ http://html5-demos.appspot.com/static/webcomponents/index.html#1
  • 25. .Web Components Supporting Cast: Awesome Future Web _ document.querySelectorAll() _ Object.observe() _ MutationObserver _ CSS variables, calc() http://wiki.ecmascript.org/doku.php?id=harmony:observe
  • 26. ..YYoouurr t tuurnr…nD…is Dcoisvecro!ver!
  • 27. .Useful links _ http://www.w3.org/wiki/WebComponents/ _ http://webcomponents.org/ _ http://habrahabr.ru/post/210058/ _ http://css-tricks.com/modular-future-web-components/ _ http://webcomponents.org/presentations/accessibility-of-web-components- at-jsconf-us/ _ https://www.youtube.com/watch?v=2txPYQOWBtg _ http://www.youtube.com/watch?v=eJZx9c6YL8k _ http://jonrimmer.github.io/are-we-componentized-yet/ _ http://w3c.github.io/webcomponents/spec/custom/#es6

Editor's Notes

  1. Кто такая я и почему я сейчас рассказываю про веб компоненты…
  2. Если описание моего проекта перекликается с вашим, то это значит, что вам тоже можно присмотреться к web components.
  3. Все 4 части можно использовать отдельно, но
  4. Тема шаблонизации в Вебе не нова, бекенд - фронтенд.
  5. Контент шаблона не находится в ДОМе, все запросы querySelector() или getElementById() не выберут детей Можно разместить где угодно в документе <head>, <body>, or <frameset
  6. Чтобы избежать конфликтов, согласно стандарту, кастомные элементы должны содержать дефис в своём названии. По-умолчанию они наследуют HTMLElement.
  7. Простое АПИ, которое давно должно было появится.
  8. CORS
  9. Простое АПИ, которое давно должно было появится.
  10. http://localhost:1000/media
  11. http://html5-demos.appspot.com/shadowdom-visualizer
  12. Темплейты - фрагменты HTML, которые программист собирается использовать в будущем. Custom позволят писать модульный, удобочитаемый код на высоком уровне. HTMl Imports Импорт фрагментов разметки из других файлов. Shadow DOM - Инструмент инкапсуляции HTML.
  13. Темплейты - фрагменты HTML, которые программист собирается использовать в будущем. Custom позволят писать модульный, удобочитаемый код на высоком уровне. HTMl Imports Импорт фрагментов разметки из других файлов. Shadow DOM - Инструмент инкапсуляции HTML.
  14. http://localhost:8000/site/chess-test/bower_components/chess-board/index.html
  15. На мой взгляд, Web Components — это следующий шаг. Разработчики смогут создавать интерактивные виджеты. Их легко поддерживать, переиспользовать, интегрировать. Изучайте и дерзайте!