SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Web Components
What happens next is unbelievable
Design and
Specification
Abstract into
components
Implement &
Document
Plug & Play
Component
Asset Driven Development
Break designs down into a toolkit of components / blocks / modules / layouts
Easier to test and fix bugs
DRY - Don’t Repeat Yourself
Reusable *
* ish
Problems
Components can be influenced by context
Responsive Design
Documentation
Changing HTML
Tied to a back end technology or templating language
Process
Components can be influenced by context
Conflicting styles / scripts
BEM - .block__element--modifier
Data behaviour - <button data-behaviour=”js-awesomeness”>
Would be nicer to “seal” components
Responsive Design
Media queries are limited
Based on viewport
Step in the right direction
Only really useful for page-level layouts
Very rarely want a component to be influenced by viewport
Brittle
Responsive Design
Media queries are limited
Based on viewport
Step in the right direction
Only really useful for page-level layouts
Very rarely want a component to be influenced by viewport
Brittle
Element / Container queries
Responsive Design
Media queries are limited
Based on viewport
Step in the right direction
Only really useful for page-level layouts
Very rarely want a component to be influenced by viewport
Brittle
Element / Container queries
No CSS Specification
Use Cases & Requirements Document
Responsive Images Community Group
In draft
Main cause for contention is how to handle circularity
Long way off
Documentation
Styleguide
More of a design thing
Asset Library
Front End Frameworks - Bootstrap, Foundation
Documentation
Styleguide
More of a design thing
Asset Library
Front End Frameworks - Bootstrap, Foundation
Copy & pasting HTML
What if HTML changes?
“Bootstrap for every client”
Writing decent documentation is time consuming
Dealing with changes / keeping up to date
Ideal situation is to automate as much of the process as possible
“Bootstrap for every client”
Hundreds of tools claim to do this
Sturgeon’s Law - 90% are shit
2 we’ve trialled:
Tied to a back end or templating language
PHP
Concrete5
Symfony
Rails
There is a need for a pure front end - back end agnostic - solution
Web Components
What happens next is unbelievable
HTML Imports
4 new specifications
Shadow DOMCustom Elements
HTML Templates
HTML Imports
Include and reuse a HTML Document in a HTML Document
Block rendering
Better to concatenate multiple import files
Vulcanise - npm build tool
async attribute
Don’t block parsing
Accessing the content of an import with the link element’s .import property
warnings.html index.html
Javascript within an import
Behaves just like a script tag with a defer attribute
Executes in the context of the importing document
JS within an import can access it’s own DOM and/or the DOM of the page that’s
importing it
Scripts are executed in order
index.html
component.html
Allows you to bundle HTML/CSS/JS together into re-usable packages
Code organisation
Manage dependencies with automatic de-deduplication
Parallel HTML parsing
HTML Imports
DOM-based, client-side templating
Allow you to declare chunks of reusable mark-up
Inert until activated
Hidden DOM that doesn’t render
Scripts don’t run, images don’t load, etc
document.getElementById() won’t return child nodes of a template
Can be placed anywhere within <head> or <body>
HTML Templates
Declaring and activating a template
Declare using the new <template> tag
Activate by copying a template’s .content with document.importNode()
Encapsulation
Hidden DOM within an element
Shadow DOM
<video>
Adds a new type of node than can be associated with an element
This node is called a shadow root
An element that has a shadow root is called a shadow host
Create Shadow DOM by invoking .createShadowRoot() on a DOM node
Shadow DOM
Allows developers to extend the DOM and create new elements
We can be more expressive and give more meaning to our mark up
Bundle functionality together into a single tag
Extend the API of existing elements
Custom Elements
Allows developers to extend the DOM and create new elements
Custom Elements
We can be more expressive and give more meaning to our mark up
Bundle functionality together into a single tag
Extend the API of existing elements
Elements are created using document.registerElement(tag-name, prototype)
Tag names must contain a dash
prototype argument is optional; custom elements inherit from HTMLELement by
default
Calling document.registerElement() tells the browser about your new element and
returns a constructor that can be used to create instances of your element
Registering a new element
To extend a native HTML element create a new element that inherits the
prototype of the element you want to extend
Extending an existing element
GitHub example
time is used as base element
datetime attribute provides an absolute date/time
relative-time is specified as type extension
TextContent shows the relative date/time
HTML Imports
Shadow DOMCustom Elements
HTML Templates
Not quite!
HTML Imports
Shadow DOM
Custom Elements
HTML Templates
Supported In development Under consideration Not interested
PolymerX-Tag Bosonic
Small library for creating
custom elements
IE9+
All web components specs
Adds features like two-way
data binding and property
observation
Large library of pre-built
components
IE10+
All web components specs
Includes a handful of basic
elements like tabs
IE9+
HTML Imports
Shadow DOMCustom Elements
HTML Templates
Rawnet Lightning Talk - Web Components

Weitere ähnliche Inhalte

Was ist angesagt?

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
 
Razor into the Razor'verse
Razor into the Razor'verseRazor into the Razor'verse
Razor into the Razor'verseEd Charbeneau
 
Google Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talkGoogle Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talkImam Raza
 
Ria Development With Flex And PHP
Ria Development With Flex And PHPRia Development With Flex And PHP
Ria Development With Flex And PHPJohn Coggeshall
 
Building Cool apps with flex
Building Cool apps with flexBuilding Cool apps with flex
Building Cool apps with flexJoseph Khan
 
Html 5 tutorial - By Bally Chohan
Html 5 tutorial - By Bally ChohanHtml 5 tutorial - By Bally Chohan
Html 5 tutorial - By Bally Chohanballychohanuk
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5kolev-prp
 
Front-end tower of Babylon
Front-end tower of BabylonFront-end tower of Babylon
Front-end tower of BabylonDenis Radin
 
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008Michael(tm) Smith
 
Building Flexible SharePoint Solutions with AngularJS
Building Flexible SharePoint Solutions with AngularJSBuilding Flexible SharePoint Solutions with AngularJS
Building Flexible SharePoint Solutions with AngularJSbgerman
 
From Solutions to Apps - Moving to SP2013
From Solutions to Apps - Moving to SP2013From Solutions to Apps - Moving to SP2013
From Solutions to Apps - Moving to SP2013bgerman
 
2012 12 best of spc - moving to the sp2013 app model
2012 12 best of spc - moving to the sp2013 app model2012 12 best of spc - moving to the sp2013 app model
2012 12 best of spc - moving to the sp2013 app modelbgerman
 
Web components
Web componentsWeb components
Web componentsGil Fink
 
Custom Elements with Polymer Web Components #econfpsu16
Custom Elements with Polymer Web Components #econfpsu16Custom Elements with Polymer Web Components #econfpsu16
Custom Elements with Polymer Web Components #econfpsu16John Riviello
 
An Introduction to HTML5
An Introduction to HTML5An Introduction to HTML5
An Introduction to HTML5Steven Chipman
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and ResourcesRon Reiter
 

Was ist angesagt? (20)

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
 
Html 5
Html 5Html 5
Html 5
 
Razor into the Razor'verse
Razor into the Razor'verseRazor into the Razor'verse
Razor into the Razor'verse
 
Google Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talkGoogle Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talk
 
HTML - 5 - Introduction
HTML - 5 - IntroductionHTML - 5 - Introduction
HTML - 5 - Introduction
 
Ria Development With Flex And PHP
Ria Development With Flex And PHPRia Development With Flex And PHP
Ria Development With Flex And PHP
 
Building Cool apps with flex
Building Cool apps with flexBuilding Cool apps with flex
Building Cool apps with flex
 
Html 5 tutorial - By Bally Chohan
Html 5 tutorial - By Bally ChohanHtml 5 tutorial - By Bally Chohan
Html 5 tutorial - By Bally Chohan
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
Front-end tower of Babylon
Front-end tower of BabylonFront-end tower of Babylon
Front-end tower of Babylon
 
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008
 
Building Flexible SharePoint Solutions with AngularJS
Building Flexible SharePoint Solutions with AngularJSBuilding Flexible SharePoint Solutions with AngularJS
Building Flexible SharePoint Solutions with AngularJS
 
From Solutions to Apps - Moving to SP2013
From Solutions to Apps - Moving to SP2013From Solutions to Apps - Moving to SP2013
From Solutions to Apps - Moving to SP2013
 
2012 12 best of spc - moving to the sp2013 app model
2012 12 best of spc - moving to the sp2013 app model2012 12 best of spc - moving to the sp2013 app model
2012 12 best of spc - moving to the sp2013 app model
 
Web components
Web componentsWeb components
Web components
 
Html 5
Html 5Html 5
Html 5
 
Custom Elements with Polymer Web Components #econfpsu16
Custom Elements with Polymer Web Components #econfpsu16Custom Elements with Polymer Web Components #econfpsu16
Custom Elements with Polymer Web Components #econfpsu16
 
Html5 Basics
Html5 BasicsHtml5 Basics
Html5 Basics
 
An Introduction to HTML5
An Introduction to HTML5An Introduction to HTML5
An Introduction to HTML5
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
 

Andere mochten auch

4 byte AS number workshop material
4 byte AS number workshop material4 byte AS number workshop material
4 byte AS number workshop materialKae Hsu
 
Rawnet Lightning talk - 'A Day in the Life of an Account Manager'
Rawnet Lightning talk - 'A Day in the Life of an Account Manager'Rawnet Lightning talk - 'A Day in the Life of an Account Manager'
Rawnet Lightning talk - 'A Day in the Life of an Account Manager'Rawnet
 
Botnets & DDoS Introduction
Botnets & DDoS IntroductionBotnets & DDoS Introduction
Botnets & DDoS IntroductionKae Hsu
 
Rawnet Lightning Talk - Design Inspiration
Rawnet Lightning Talk - Design InspirationRawnet Lightning Talk - Design Inspiration
Rawnet Lightning Talk - Design InspirationRawnet
 
How internet works and how messages are transferred in Internet
How internet works and how messages are transferred in InternetHow internet works and how messages are transferred in Internet
How internet works and how messages are transferred in Internetpagetron
 
Rawnet Lightning Talk - Elasticsearch
Rawnet Lightning Talk -  ElasticsearchRawnet Lightning Talk -  Elasticsearch
Rawnet Lightning Talk - ElasticsearchRawnet
 
Network and TCP performance relationship workshop
Network and TCP performance relationship workshopNetwork and TCP performance relationship workshop
Network and TCP performance relationship workshopKae Hsu
 
FEGTS IP Training - Network Diagnostic Introduction
FEGTS IP Training - Network Diagnostic IntroductionFEGTS IP Training - Network Diagnostic Introduction
FEGTS IP Training - Network Diagnostic IntroductionKae Hsu
 
4 Byte As Ns Test Scenarios
4 Byte As Ns Test Scenarios4 Byte As Ns Test Scenarios
4 Byte As Ns Test ScenariosKae Hsu
 
Toward The Semantic Deep Web
Toward The Semantic Deep WebToward The Semantic Deep Web
Toward The Semantic Deep WebSamiul Hoque
 
A review of Concrete 5 and what is new in version 5.7
A review of Concrete 5 and what is new in version 5.7A review of Concrete 5 and what is new in version 5.7
A review of Concrete 5 and what is new in version 5.7Rawnet
 
Rawnet Lightning Talk - 'What is an idea & how do you create them?'
Rawnet Lightning Talk - 'What is an idea & how do you create them?'Rawnet Lightning Talk - 'What is an idea & how do you create them?'
Rawnet Lightning Talk - 'What is an idea & how do you create them?'Rawnet
 
How To Process And Solve Network Security In ISP
How To Process And Solve Network Security In ISPHow To Process And Solve Network Security In ISP
How To Process And Solve Network Security In ISPKae Hsu
 
4byte As Number Migration Suggestion
4byte As Number Migration Suggestion4byte As Number Migration Suggestion
4byte As Number Migration SuggestionKae Hsu
 
Noisy information transmission through molecular interaction networks
Noisy information transmission through molecular interaction networksNoisy information transmission through molecular interaction networks
Noisy information transmission through molecular interaction networksMichael Stumpf
 
Web 101 by Jennifer Lill
Web 101 by Jennifer LillWeb 101 by Jennifer Lill
Web 101 by Jennifer LillJennifer Lill
 
Rawnet Lightning Talk - Anyone Can Draw.
Rawnet Lightning Talk - Anyone Can Draw.Rawnet Lightning Talk - Anyone Can Draw.
Rawnet Lightning Talk - Anyone Can Draw.Rawnet
 
20th TWNIC OPM IPv6 Support by SDN & NFV
20th TWNIC OPM IPv6 Support by SDN & NFV20th TWNIC OPM IPv6 Support by SDN & NFV
20th TWNIC OPM IPv6 Support by SDN & NFVKae Hsu
 
Network Design in Cloud-ready IDC
Network Design in Cloud-ready IDCNetwork Design in Cloud-ready IDC
Network Design in Cloud-ready IDCKae Hsu
 
CDN and ISP Operation
CDN and ISP OperationCDN and ISP Operation
CDN and ISP OperationKae Hsu
 

Andere mochten auch (20)

4 byte AS number workshop material
4 byte AS number workshop material4 byte AS number workshop material
4 byte AS number workshop material
 
Rawnet Lightning talk - 'A Day in the Life of an Account Manager'
Rawnet Lightning talk - 'A Day in the Life of an Account Manager'Rawnet Lightning talk - 'A Day in the Life of an Account Manager'
Rawnet Lightning talk - 'A Day in the Life of an Account Manager'
 
Botnets & DDoS Introduction
Botnets & DDoS IntroductionBotnets & DDoS Introduction
Botnets & DDoS Introduction
 
Rawnet Lightning Talk - Design Inspiration
Rawnet Lightning Talk - Design InspirationRawnet Lightning Talk - Design Inspiration
Rawnet Lightning Talk - Design Inspiration
 
How internet works and how messages are transferred in Internet
How internet works and how messages are transferred in InternetHow internet works and how messages are transferred in Internet
How internet works and how messages are transferred in Internet
 
Rawnet Lightning Talk - Elasticsearch
Rawnet Lightning Talk -  ElasticsearchRawnet Lightning Talk -  Elasticsearch
Rawnet Lightning Talk - Elasticsearch
 
Network and TCP performance relationship workshop
Network and TCP performance relationship workshopNetwork and TCP performance relationship workshop
Network and TCP performance relationship workshop
 
FEGTS IP Training - Network Diagnostic Introduction
FEGTS IP Training - Network Diagnostic IntroductionFEGTS IP Training - Network Diagnostic Introduction
FEGTS IP Training - Network Diagnostic Introduction
 
4 Byte As Ns Test Scenarios
4 Byte As Ns Test Scenarios4 Byte As Ns Test Scenarios
4 Byte As Ns Test Scenarios
 
Toward The Semantic Deep Web
Toward The Semantic Deep WebToward The Semantic Deep Web
Toward The Semantic Deep Web
 
A review of Concrete 5 and what is new in version 5.7
A review of Concrete 5 and what is new in version 5.7A review of Concrete 5 and what is new in version 5.7
A review of Concrete 5 and what is new in version 5.7
 
Rawnet Lightning Talk - 'What is an idea & how do you create them?'
Rawnet Lightning Talk - 'What is an idea & how do you create them?'Rawnet Lightning Talk - 'What is an idea & how do you create them?'
Rawnet Lightning Talk - 'What is an idea & how do you create them?'
 
How To Process And Solve Network Security In ISP
How To Process And Solve Network Security In ISPHow To Process And Solve Network Security In ISP
How To Process And Solve Network Security In ISP
 
4byte As Number Migration Suggestion
4byte As Number Migration Suggestion4byte As Number Migration Suggestion
4byte As Number Migration Suggestion
 
Noisy information transmission through molecular interaction networks
Noisy information transmission through molecular interaction networksNoisy information transmission through molecular interaction networks
Noisy information transmission through molecular interaction networks
 
Web 101 by Jennifer Lill
Web 101 by Jennifer LillWeb 101 by Jennifer Lill
Web 101 by Jennifer Lill
 
Rawnet Lightning Talk - Anyone Can Draw.
Rawnet Lightning Talk - Anyone Can Draw.Rawnet Lightning Talk - Anyone Can Draw.
Rawnet Lightning Talk - Anyone Can Draw.
 
20th TWNIC OPM IPv6 Support by SDN & NFV
20th TWNIC OPM IPv6 Support by SDN & NFV20th TWNIC OPM IPv6 Support by SDN & NFV
20th TWNIC OPM IPv6 Support by SDN & NFV
 
Network Design in Cloud-ready IDC
Network Design in Cloud-ready IDCNetwork Design in Cloud-ready IDC
Network Design in Cloud-ready IDC
 
CDN and ISP Operation
CDN and ISP OperationCDN and ISP Operation
CDN and ISP Operation
 

Ähnlich wie Rawnet Lightning Talk - Web Components

Web components
Web componentsWeb components
Web componentsMohd Saeed
 
Web components
Web componentsWeb components
Web componentsNoam Kfir
 
Web Components: back to the future
Web Components: back to the futureWeb Components: back to the future
Web Components: back to the futureDA-14
 
Web component driven development
Web component driven developmentWeb component driven development
Web component driven developmentGil Fink
 
Milwaukee JS - Live binding with CanJS
Milwaukee JS - Live binding with CanJSMilwaukee JS - Live binding with CanJS
Milwaukee JS - Live binding with CanJSStan Carrico
 
Web Performance Tips
Web Performance TipsWeb Performance Tips
Web Performance TipsRavi Raj
 
The Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has ArrivedThe Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has ArrivedGil Fink
 
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
 
Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013gdgyaounde
 
HTML5 and Search Engine Optimization (SEO)
HTML5 and Search Engine Optimization (SEO)HTML5 and Search Engine Optimization (SEO)
HTML5 and Search Engine Optimization (SEO)Performics.Convonix
 
Rails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSSRails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSSTimo Herttua
 
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009ken.egozi
 
Websites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly WebsitesWebsites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly Websiteswebsiteunlimited
 
High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesStoyan Stefanov
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Componentssonumanoj
 

Ähnlich wie Rawnet Lightning Talk - Web Components (20)

Web components
Web componentsWeb components
Web components
 
Web components
Web componentsWeb components
Web components
 
Web Components: back to the future
Web Components: back to the futureWeb Components: back to the future
Web Components: back to the future
 
Web component driven development
Web component driven developmentWeb component driven development
Web component driven development
 
Milwaukee JS - Live binding with CanJS
Milwaukee JS - Live binding with CanJSMilwaukee JS - Live binding with CanJS
Milwaukee JS - Live binding with CanJS
 
HTML literals, the JSX of the platform
HTML literals, the JSX of the platformHTML literals, the JSX of the platform
HTML literals, the JSX of the platform
 
Web Performance Tips
Web Performance TipsWeb Performance Tips
Web Performance Tips
 
Html 5 - What's new?
Html 5 - What's new?Html 5 - What's new?
Html 5 - What's new?
 
The Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has ArrivedThe Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has Arrived
 
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...
 
Polymer
PolymerPolymer
Polymer
 
Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013
 
HTML5 and Search Engine Optimization (SEO)
HTML5 and Search Engine Optimization (SEO)HTML5 and Search Engine Optimization (SEO)
HTML5 and Search Engine Optimization (SEO)
 
Rails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSSRails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSS
 
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
 
Websites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly WebsitesWebsites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly Websites
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
Html 5
Html 5Html 5
Html 5
 
High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practices
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Components
 

Kürzlich hochgeladen

Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制pxcywzqs
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查ydyuyu
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoilmeghakumariji156
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasDigicorns Technologies
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Balliameghakumariji156
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsMonica Sydney
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理F
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样ayvbos
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...meghakumariji156
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsMonica Sydney
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsPriya Reddy
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查ydyuyu
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.krishnachandrapal52
 

Kürzlich hochgeladen (20)

Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 

Rawnet Lightning Talk - Web Components

  • 1. Web Components What happens next is unbelievable
  • 2.
  • 3.
  • 4.
  • 6. Asset Driven Development Break designs down into a toolkit of components / blocks / modules / layouts Easier to test and fix bugs DRY - Don’t Repeat Yourself Reusable * * ish
  • 7. Problems Components can be influenced by context Responsive Design Documentation Changing HTML Tied to a back end technology or templating language Process
  • 8. Components can be influenced by context Conflicting styles / scripts BEM - .block__element--modifier Data behaviour - <button data-behaviour=”js-awesomeness”> Would be nicer to “seal” components
  • 9. Responsive Design Media queries are limited Based on viewport Step in the right direction Only really useful for page-level layouts Very rarely want a component to be influenced by viewport Brittle
  • 10.
  • 11. Responsive Design Media queries are limited Based on viewport Step in the right direction Only really useful for page-level layouts Very rarely want a component to be influenced by viewport Brittle Element / Container queries
  • 12.
  • 13. Responsive Design Media queries are limited Based on viewport Step in the right direction Only really useful for page-level layouts Very rarely want a component to be influenced by viewport Brittle Element / Container queries No CSS Specification Use Cases & Requirements Document Responsive Images Community Group In draft Main cause for contention is how to handle circularity Long way off
  • 14. Documentation Styleguide More of a design thing Asset Library Front End Frameworks - Bootstrap, Foundation
  • 15.
  • 16. Documentation Styleguide More of a design thing Asset Library Front End Frameworks - Bootstrap, Foundation Copy & pasting HTML What if HTML changes? “Bootstrap for every client” Writing decent documentation is time consuming Dealing with changes / keeping up to date Ideal situation is to automate as much of the process as possible
  • 17. “Bootstrap for every client” Hundreds of tools claim to do this Sturgeon’s Law - 90% are shit 2 we’ve trialled:
  • 18. Tied to a back end or templating language PHP Concrete5 Symfony Rails There is a need for a pure front end - back end agnostic - solution
  • 19. Web Components What happens next is unbelievable
  • 20. HTML Imports 4 new specifications Shadow DOMCustom Elements HTML Templates
  • 21. HTML Imports Include and reuse a HTML Document in a HTML Document Block rendering Better to concatenate multiple import files Vulcanise - npm build tool async attribute Don’t block parsing
  • 22. Accessing the content of an import with the link element’s .import property warnings.html index.html
  • 23. Javascript within an import Behaves just like a script tag with a defer attribute Executes in the context of the importing document JS within an import can access it’s own DOM and/or the DOM of the page that’s importing it Scripts are executed in order index.html component.html
  • 24. Allows you to bundle HTML/CSS/JS together into re-usable packages Code organisation Manage dependencies with automatic de-deduplication Parallel HTML parsing HTML Imports
  • 25. DOM-based, client-side templating Allow you to declare chunks of reusable mark-up Inert until activated Hidden DOM that doesn’t render Scripts don’t run, images don’t load, etc document.getElementById() won’t return child nodes of a template Can be placed anywhere within <head> or <body> HTML Templates
  • 26. Declaring and activating a template Declare using the new <template> tag Activate by copying a template’s .content with document.importNode()
  • 27. Encapsulation Hidden DOM within an element Shadow DOM
  • 29. Adds a new type of node than can be associated with an element This node is called a shadow root An element that has a shadow root is called a shadow host Create Shadow DOM by invoking .createShadowRoot() on a DOM node Shadow DOM
  • 30. Allows developers to extend the DOM and create new elements We can be more expressive and give more meaning to our mark up Bundle functionality together into a single tag Extend the API of existing elements Custom Elements
  • 31.
  • 32. Allows developers to extend the DOM and create new elements Custom Elements We can be more expressive and give more meaning to our mark up Bundle functionality together into a single tag Extend the API of existing elements
  • 33. Elements are created using document.registerElement(tag-name, prototype) Tag names must contain a dash prototype argument is optional; custom elements inherit from HTMLELement by default Calling document.registerElement() tells the browser about your new element and returns a constructor that can be used to create instances of your element Registering a new element
  • 34. To extend a native HTML element create a new element that inherits the prototype of the element you want to extend Extending an existing element
  • 35. GitHub example time is used as base element datetime attribute provides an absolute date/time relative-time is specified as type extension TextContent shows the relative date/time
  • 36. HTML Imports Shadow DOMCustom Elements HTML Templates
  • 38.
  • 39. HTML Imports Shadow DOM Custom Elements HTML Templates Supported In development Under consideration Not interested
  • 40. PolymerX-Tag Bosonic Small library for creating custom elements IE9+ All web components specs Adds features like two-way data binding and property observation Large library of pre-built components IE10+ All web components specs Includes a handful of basic elements like tabs IE9+
  • 41. HTML Imports Shadow DOMCustom Elements HTML Templates