SlideShare a Scribd company logo
Workshop:
Introduction to Web Components & Polymer
Node+JS Interactive
Wednesday, October 10, 2018 • 11:00am - 12:50pm
John Riviello
@JohnRiv
Chris Lorenzo
@Chiefcll
Workshop materials are available at:
http://tinyurl.com/
nodejsint-polymer
-workshop
WEB COMPONENTS
What Are Web Components?
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop4
… a set of web platform APIs that allow
you to create new custom, reusable,
encapsulated HTML tags to use in web
pages and web apps...
Source: https://www.webcomponents.org/introduction
What Are Web Components?
5
… [built] on the Web Component standards,
will work across modern browsers, and
can be used with any JavaScript library or
framework that works with HTML.
Source: https://www.webcomponents.org/introduction
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What Are Web Components?
6
4 Specs
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What Are Web Components?
7
Custom Elements
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What Are Web Components?
8 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What Are Web Components?
9
Custom Elements
•Provides a way for authors to build their own
fully-featured DOM elements.
<paper-tabs selected="0" scrollable>
<paper-tab>The first tab</paper-tab>
<paper-tab>Tab two</paper-tab>
<paper-tab>The third tab</paper-tab>
<paper-tab>Fourth tab</paper-tab>
</paper-tabs>
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What Are Web Components?
10
HTML Imports
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What Are Web Components?
11 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
• Means to import custom elements
- <link rel="import" href="paper-tabs.html">
• Componetize the HTML, CSS & JavaScript
• Built-in deduplication
What Are Web Components?
12
HTML Imports
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What Are Web Components?
13
Templates
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What Are Web Components?
14 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What Are Web Components?
15
• Used to declare fragments of HTML
- <template id="tab">
<div class="tab-content"></div>
</template>
• The element itself renders nothing
• Can be cloned and inserted in the document via
JavaScript, which will quickly render the content
Templates
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What Are Web Components?
16
Shadow DOM
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What Are Web Components?
17 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What Are Web Components?
18
•Allows you to take a DOM subtree and
hide it from the document scope
•Hides CSS styles as well
•Common examples from HTML5 include:
<select>, <video>, & <input type="date">
Shadow DOM
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
Can we even use
these things?
20
Source: https://www.webcomponents.org/
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
21
Source: https://www.webcomponents.org/
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
22
Source: https://www.webcomponents.org/
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
23 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
24 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
25 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
What’s
Google Polymer?
Google Polymer Project
Polymer 3.0
https://www.polymer-project.org/3.0/
docs/devguide/feature-overview
Let’s code!
Codelab:
Build Google Maps using
Web Components & No Code!
tinyurl.com/comcast-polymer-map
Codelab: Build Google Maps using Web Components & No Code!
34
Codelab URL: tinyurl.com/comcast-polymer-map
Relevant Map Data:
•latitude="49.2892"
•longitude="-123.1169"
•start-address="1055 Canada Place"
•end-address="TELUS Garden"
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
Takeaways!
Intro to Web Components & Polymer
Framework/Library Sizes (with GZIP compression)
36
Source: http://minime.stephan-brumme.com
React’s size is react + react-dom & gzipped via http://cnvyr.io/online
Polymer’s size is polymer-element.js bundled, minified & gzipped.
113.7kb 59.0kb 29.2kb30.4kb35.0kb
v3.0.0 v1.7.4 v3.3.1v2.5.17 v3.0.5v16.5.2
19.8kb
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
Break
Codelab: Build Google Maps using Web Components & No Code!
38
Back early? Try these BONUS challenges!
1. Select “DRIVING” by default
- Hint: check out the Properties listed at
www.webcomponents.org/element/PolymerElements/
paper-tabs/elements/paper-tabs#properties
2. Improve the styles for the search box
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
Codelab Part 2:
Build a Toast
Web Components & With Code!
tinyurl.com/comcast-toast
Let’s code!
Takeaways!
© Comcast
Source: https://github.com/Comcast/polaris
<script href="https://polaris.xfinity.com/polaris.js"></script>
<xc-header
tab="myaccount"
is-authed="[[isAuthed]]"
login-url="/login"
sign-out-url="/logout"
first-name="[[openidData.given_name]]"
user-name="[[openidData.preferred_username]]">
</xc-header>
<xc-footer></xc-footer>
45 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/comcast-polymer-workshop
Angular ElementsVueJS Elements
Framework Components as Custom Elements
46 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/comcast-polymer-workshop
Other Frameworks for building Web Components
Skate JS
X-Tag
< >XX-Tag
Source: https://elix.org/
“Assemblers First, Craftspeople
Second”
- Ben Issa, 2016 Polymer Summit
Intro to Web Components & Polymer
48
"Puzzle Pieces Jigsaw Piece Concept" is licensed under CC0 1.0 / Color adjusted from original
"Blacksmith Forging Smith Forger" is licensed under CC0 1.0 / Color adjusted from original
Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/comcast-polymer-workshop
Useful Links
• WebComponents.org - webcomponents.org
• Polymer Website - polymer-project.org
• Polymer Slack - polymer-slack.herokuapp.com
• Polymer 2.x Cheat Sheet - https://meowni.ca/posts/polymer-2-cheatsheet/
• How to use Polymer with Webpack - http://robdodson.me/how-to-use-polymer-with-webpack/
• PWAs with Polymer: a checklist - https://meowni.ca/posts/polymer-pwa-checklist/
• Custom Elements Everywhere - https://custom-elements-everywhere.com/
• Polycasts on YouTube -
https://www.youtube.com/playlist?list=PLOU2XLYxmsII5c3Mgw6fNYCzaWrsM3sMN
• 2018 Google I/O Polymer videos - https://www.polymer-project.org/blog/2018-05-09-polymer-at-io-2018
• 2017 Polymer Summit videos on YouTube -
https://www.youtube.com/playlist?list=PLNYkxOF6rcIDP0PqVaJxqNWwIgvoEPzJi
• End-to-End Polymer Apps - 2017 Chrome Dev Summit video - https://youtu.be/Wu2GCRkDecI
• 2017 Google I/O Polymer videos on YouTube -
https://www.youtube.com/playlist?list=PL_c6rbXV248du6m1VJABo32mP7sXWVb4m
49 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
Thank you!
John Riviello
@JohnRiv
Chris Lorenzo
@Chiefcll

More Related Content

What's hot

How NOT to build a pipeline
How NOT to build a pipelineHow NOT to build a pipeline
How NOT to build a pipeline
Josh Hill
 
Web components - The Future is Here
Web components - The Future is HereWeb components - The Future is Here
Web components - The Future is Here
Gil Fink
 
One language to rule them all type script
One language to rule them all type scriptOne language to rule them all type script
One language to rule them all type script
Gil Fink
 
Web Components at Scale, HTML5DevConf 2014-10-21
Web Components at Scale, HTML5DevConf 2014-10-21Web Components at Scale, HTML5DevConf 2014-10-21
Web Components at Scale, HTML5DevConf 2014-10-21
Chris Danford
 
GlobalLogic Test Automation Online TechTalk “Playwright — A New Hope”
GlobalLogic Test Automation Online TechTalk “Playwright — A New Hope”GlobalLogic Test Automation Online TechTalk “Playwright — A New Hope”
GlobalLogic Test Automation Online TechTalk “Playwright — A New Hope”
GlobalLogic Ukraine
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1
Derek Jacoby
 
HTML5: A brave new world of markup
HTML5: A brave new world of markupHTML5: A brave new world of markup
HTML5: A brave new world of markup
Chris Mills
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
Randy Connolly
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
Adam Culp
 
FuelPHP - a PHP HMVC Framework by silicongulf.com
FuelPHP - a PHP HMVC Framework by silicongulf.comFuelPHP - a PHP HMVC Framework by silicongulf.com
FuelPHP - a PHP HMVC Framework by silicongulf.com
Christopher Cubos
 
Untangling4
Untangling4Untangling4
Untangling4
Derek Jacoby
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Jumping Bean
 
HTML5: what's new?
HTML5: what's new?HTML5: what's new?
HTML5: what's new?
Chris Mills
 
FuelPHP
FuelPHPFuelPHP
FuelPHP presentation - PeoplePerHour workshop
FuelPHP presentation - PeoplePerHour workshopFuelPHP presentation - PeoplePerHour workshop
FuelPHP presentation - PeoplePerHour workshop
Fotis Alexandrou
 
Why Your Site is Slow: Performance Answers for Your Clients
Why Your Site is Slow: Performance Answers for Your ClientsWhy Your Site is Slow: Performance Answers for Your Clients
Why Your Site is Slow: Performance Answers for Your Clients
Pantheon
 
Web components: A simpler and faster react
Web components:  A simpler and faster reactWeb components:  A simpler and faster react
Web components: A simpler and faster react
Chris Lorenzo
 
Write Once, Run Everywhere
Write Once, Run EverywhereWrite Once, Run Everywhere
Write Once, Run Everywhere
Mike North
 
Should you use HTML5 to build your product? The pros & cons of using current ...
Should you use HTML5 to build your product? The pros & cons of using current ...Should you use HTML5 to build your product? The pros & cons of using current ...
Should you use HTML5 to build your product? The pros & cons of using current ...boxuno
 
Untangling the web11
Untangling the web11Untangling the web11
Untangling the web11
Derek Jacoby
 

What's hot (20)

How NOT to build a pipeline
How NOT to build a pipelineHow NOT to build a pipeline
How NOT to build a pipeline
 
Web components - The Future is Here
Web components - The Future is HereWeb components - The Future is Here
Web components - The Future is Here
 
One language to rule them all type script
One language to rule them all type scriptOne language to rule them all type script
One language to rule them all type script
 
Web Components at Scale, HTML5DevConf 2014-10-21
Web Components at Scale, HTML5DevConf 2014-10-21Web Components at Scale, HTML5DevConf 2014-10-21
Web Components at Scale, HTML5DevConf 2014-10-21
 
GlobalLogic Test Automation Online TechTalk “Playwright — A New Hope”
GlobalLogic Test Automation Online TechTalk “Playwright — A New Hope”GlobalLogic Test Automation Online TechTalk “Playwright — A New Hope”
GlobalLogic Test Automation Online TechTalk “Playwright — A New Hope”
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1
 
HTML5: A brave new world of markup
HTML5: A brave new world of markupHTML5: A brave new world of markup
HTML5: A brave new world of markup
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
 
FuelPHP - a PHP HMVC Framework by silicongulf.com
FuelPHP - a PHP HMVC Framework by silicongulf.comFuelPHP - a PHP HMVC Framework by silicongulf.com
FuelPHP - a PHP HMVC Framework by silicongulf.com
 
Untangling4
Untangling4Untangling4
Untangling4
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
HTML5: what's new?
HTML5: what's new?HTML5: what's new?
HTML5: what's new?
 
FuelPHP
FuelPHPFuelPHP
FuelPHP
 
FuelPHP presentation - PeoplePerHour workshop
FuelPHP presentation - PeoplePerHour workshopFuelPHP presentation - PeoplePerHour workshop
FuelPHP presentation - PeoplePerHour workshop
 
Why Your Site is Slow: Performance Answers for Your Clients
Why Your Site is Slow: Performance Answers for Your ClientsWhy Your Site is Slow: Performance Answers for Your Clients
Why Your Site is Slow: Performance Answers for Your Clients
 
Web components: A simpler and faster react
Web components:  A simpler and faster reactWeb components:  A simpler and faster react
Web components: A simpler and faster react
 
Write Once, Run Everywhere
Write Once, Run EverywhereWrite Once, Run Everywhere
Write Once, Run Everywhere
 
Should you use HTML5 to build your product? The pros & cons of using current ...
Should you use HTML5 to build your product? The pros & cons of using current ...Should you use HTML5 to build your product? The pros & cons of using current ...
Should you use HTML5 to build your product? The pros & cons of using current ...
 
Untangling the web11
Untangling the web11Untangling the web11
Untangling the web11
 

Similar to Introduction to Web Components & Polymer Workshop - JS Interactive

Web Components: The Future of Web Development is Here
Web Components: The Future of Web Development is HereWeb Components: The Future of Web Development is Here
Web Components: The Future of Web Development is Here
John Riviello
 
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
John Riviello
 
Web Components
Web ComponentsWeb Components
Web Components
FITC
 
Polymer 101
Polymer 101Polymer 101
Polymer
PolymerPolymer
Polymer
Josef Ježek
 
Ensuring Design Standards with Web Components
Ensuring Design Standards with Web ComponentsEnsuring Design Standards with Web Components
Ensuring Design Standards with Web Components
John Riviello
 
Open Apereo - Web components workshop
Open Apereo - Web components workshopOpen Apereo - Web components workshop
Open Apereo - Web components workshop
btopro
 
Web Components
Web ComponentsWeb Components
Web Components
FITC
 
Intro to Web Components, Polymer & Vaadin Elements
Intro to Web Components, Polymer & Vaadin ElementsIntro to Web Components, Polymer & Vaadin Elements
Intro to Web Components, Polymer & Vaadin Elements
Manuel Carrasco Moñino
 
Web components api + Vuejs
Web components api + VuejsWeb components api + Vuejs
Web components api + Vuejs
Mikhail Kuznetcov
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Components
sonumanoj
 
IRJET- Polymer Javascript
IRJET- Polymer JavascriptIRJET- Polymer Javascript
IRJET- Polymer Javascript
IRJET Journal
 
Testing with Codeception
Testing with CodeceptionTesting with Codeception
Testing with Codeception
Jeremy Coates
 
Web components Introduction
Web components IntroductionWeb components Introduction
Web components Introduction
Eugenio Romano
 
Lecture 11 - Web components
Lecture 11 - Web componentsLecture 11 - Web components
Lecture 11 - Web components
Bryan Ollendyke
 
Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)
Roy Gilad
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
LINAGORA
 
Lightning Web Component - LWC
Lightning Web Component - LWCLightning Web Component - LWC
Lightning Web Component - LWC
Thierry TROUIN ☁
 
WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016
jancbeck
 

Similar to Introduction to Web Components & Polymer Workshop - JS Interactive (20)

Web Components: The Future of Web Development is Here
Web Components: The Future of Web Development is HereWeb Components: The Future of Web Development is Here
Web Components: The Future of Web Development is Here
 
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
 
Web Components
Web ComponentsWeb Components
Web Components
 
Polymer 101
Polymer 101Polymer 101
Polymer 101
 
Polymer
PolymerPolymer
Polymer
 
Ensuring Design Standards with Web Components
Ensuring Design Standards with Web ComponentsEnsuring Design Standards with Web Components
Ensuring Design Standards with Web Components
 
Open Apereo - Web components workshop
Open Apereo - Web components workshopOpen Apereo - Web components workshop
Open Apereo - Web components workshop
 
Web Components
Web ComponentsWeb Components
Web Components
 
Intro to Web Components, Polymer & Vaadin Elements
Intro to Web Components, Polymer & Vaadin ElementsIntro to Web Components, Polymer & Vaadin Elements
Intro to Web Components, Polymer & Vaadin Elements
 
Web components api + Vuejs
Web components api + VuejsWeb components api + Vuejs
Web components api + Vuejs
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Components
 
IRJET- Polymer Javascript
IRJET- Polymer JavascriptIRJET- Polymer Javascript
IRJET- Polymer Javascript
 
Testing with Codeception
Testing with CodeceptionTesting with Codeception
Testing with Codeception
 
Web components Introduction
Web components IntroductionWeb components Introduction
Web components Introduction
 
Lecture 11 - Web components
Lecture 11 - Web componentsLecture 11 - Web components
Lecture 11 - Web components
 
Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
 
WebGL Awesomeness
WebGL AwesomenessWebGL Awesomeness
WebGL Awesomeness
 
Lightning Web Component - LWC
Lightning Web Component - LWCLightning Web Component - LWC
Lightning Web Component - LWC
 
WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016
 

Recently uploaded

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 

Recently uploaded (20)

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 

Introduction to Web Components & Polymer Workshop - JS Interactive

  • 1. Workshop: Introduction to Web Components & Polymer Node+JS Interactive Wednesday, October 10, 2018 • 11:00am - 12:50pm John Riviello @JohnRiv Chris Lorenzo @Chiefcll
  • 2. Workshop materials are available at: http://tinyurl.com/ nodejsint-polymer -workshop
  • 4. What Are Web Components? Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop4 … a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps... Source: https://www.webcomponents.org/introduction
  • 5. What Are Web Components? 5 … [built] on the Web Component standards, will work across modern browsers, and can be used with any JavaScript library or framework that works with HTML. Source: https://www.webcomponents.org/introduction Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 6. What Are Web Components? 6 4 Specs Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 7. What Are Web Components? 7 Custom Elements Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 8. What Are Web Components? 8 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 9. What Are Web Components? 9 Custom Elements •Provides a way for authors to build their own fully-featured DOM elements. <paper-tabs selected="0" scrollable> <paper-tab>The first tab</paper-tab> <paper-tab>Tab two</paper-tab> <paper-tab>The third tab</paper-tab> <paper-tab>Fourth tab</paper-tab> </paper-tabs> Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 10. What Are Web Components? 10 HTML Imports Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 11. What Are Web Components? 11 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 12. • Means to import custom elements - <link rel="import" href="paper-tabs.html"> • Componetize the HTML, CSS & JavaScript • Built-in deduplication What Are Web Components? 12 HTML Imports Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 13. What Are Web Components? 13 Templates Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 14. What Are Web Components? 14 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 15. What Are Web Components? 15 • Used to declare fragments of HTML - <template id="tab"> <div class="tab-content"></div> </template> • The element itself renders nothing • Can be cloned and inserted in the document via JavaScript, which will quickly render the content Templates Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 16. What Are Web Components? 16 Shadow DOM Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 17. What Are Web Components? 17 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 18. What Are Web Components? 18 •Allows you to take a DOM subtree and hide it from the document scope •Hides CSS styles as well •Common examples from HTML5 include: <select>, <video>, & <input type="date"> Shadow DOM Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 19. Can we even use these things?
  • 20. 20 Source: https://www.webcomponents.org/ Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 21. 21 Source: https://www.webcomponents.org/ Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 22. 22 Source: https://www.webcomponents.org/ Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 23. 23 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 24. 24 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 25. 25 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 28.
  • 29.
  • 30.
  • 33. Codelab: Build Google Maps using Web Components & No Code! tinyurl.com/comcast-polymer-map
  • 34. Codelab: Build Google Maps using Web Components & No Code! 34 Codelab URL: tinyurl.com/comcast-polymer-map Relevant Map Data: •latitude="49.2892" •longitude="-123.1169" •start-address="1055 Canada Place" •end-address="TELUS Garden" Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 36. Intro to Web Components & Polymer Framework/Library Sizes (with GZIP compression) 36 Source: http://minime.stephan-brumme.com React’s size is react + react-dom & gzipped via http://cnvyr.io/online Polymer’s size is polymer-element.js bundled, minified & gzipped. 113.7kb 59.0kb 29.2kb30.4kb35.0kb v3.0.0 v1.7.4 v3.3.1v2.5.17 v3.0.5v16.5.2 19.8kb Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 37. Break
  • 38. Codelab: Build Google Maps using Web Components & No Code! 38 Back early? Try these BONUS challenges! 1. Select “DRIVING” by default - Hint: check out the Properties listed at www.webcomponents.org/element/PolymerElements/ paper-tabs/elements/paper-tabs#properties 2. Improve the styles for the search box Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop
  • 39. Codelab Part 2: Build a Toast Web Components & With Code! tinyurl.com/comcast-toast
  • 44.
  • 45. 45 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/comcast-polymer-workshop Angular ElementsVueJS Elements Framework Components as Custom Elements
  • 46. 46 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/comcast-polymer-workshop Other Frameworks for building Web Components Skate JS X-Tag < >XX-Tag
  • 48. “Assemblers First, Craftspeople Second” - Ben Issa, 2016 Polymer Summit Intro to Web Components & Polymer 48 "Puzzle Pieces Jigsaw Piece Concept" is licensed under CC0 1.0 / Color adjusted from original "Blacksmith Forging Smith Forger" is licensed under CC0 1.0 / Color adjusted from original Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/comcast-polymer-workshop
  • 49. Useful Links • WebComponents.org - webcomponents.org • Polymer Website - polymer-project.org • Polymer Slack - polymer-slack.herokuapp.com • Polymer 2.x Cheat Sheet - https://meowni.ca/posts/polymer-2-cheatsheet/ • How to use Polymer with Webpack - http://robdodson.me/how-to-use-polymer-with-webpack/ • PWAs with Polymer: a checklist - https://meowni.ca/posts/polymer-pwa-checklist/ • Custom Elements Everywhere - https://custom-elements-everywhere.com/ • Polycasts on YouTube - https://www.youtube.com/playlist?list=PLOU2XLYxmsII5c3Mgw6fNYCzaWrsM3sMN • 2018 Google I/O Polymer videos - https://www.polymer-project.org/blog/2018-05-09-polymer-at-io-2018 • 2017 Polymer Summit videos on YouTube - https://www.youtube.com/playlist?list=PLNYkxOF6rcIDP0PqVaJxqNWwIgvoEPzJi • End-to-End Polymer Apps - 2017 Chrome Dev Summit video - https://youtu.be/Wu2GCRkDecI • 2017 Google I/O Polymer videos on YouTube - https://www.youtube.com/playlist?list=PL_c6rbXV248du6m1VJABo32mP7sXWVb4m 49 Workshop: Introduction to Web Components & Polymer - @JohnRiv @chiefcll - tinyurl.com/nodejsint-polymer-workshop