SlideShare a Scribd company logo
1 of 21
Web Components
Introduction
Eugenio Romano
2016
ENGINEER @
https://uk.linkedin.com/in/eugenio-romano-a28a4948
https://twitter.com/RomanoEugenio
http://eromano.github.io/
EUGENIO ROMANO
ALFRESCO
AGENDA
PART 1
INFO
PART 2
EXAMPLE
CREATE
WEB COMPONENTS IN 4 STEPS
PART 1 INFO
Web Components enable the creation of UI atoms as HTML
elements, atoms that you can include into your components
templates, powered by Angular, Ember, React or whatever.
Web Components is the next big thing.
WHAT INTERNET SAY
You can think of Web Components as reusable user
interface widgets that are created using open Web
technology.
Components Are Ready For Production.
Components Are NOT Ready For Production.
This is an experimental technology.
The browser you use it in must
support Web Components.
Web Components: A chance to create the future.
1INFO
Web Components consist of several separate technologies. You can think of Web
Components as reusable user interface widgets that are created using open Web technology
2
WHAT ARE WEB COMPONETS
INFO
WHAT ARE NOT WEB COMPONETS
Web Components are not a library or framework nor a set of components
made by a determinate company.
Web Components are a new browser feature standardized by W3C
Web Components are part of the browser, and so they do not need
external libraries.
REUSE
3
WHAT IS THE WEB COMPONENTS GOAL?
INFO
FAST
EASY TO TEST
INTEROPERABILITY
When you create a web component, essentially you create a new tag <web-component>
this tag is reusable everywhere and could be also extended by another web component.
Web components are fast to learn in the end is just JAVASCRIPT and
HTML.
Any framework is compatible with DOM so you can reuse your component in
any framework. Web components are a choice for the future.
Web components are self contained and by their
nature, promote the separation of concern. So they
are easy to test it.
HTML IMPORT
Let’s you import other HTML documents into the current one.
TEMPLATES
Is a mechanism for holding client-side content that is not to be rendered when a page
is loaded but may subsequently be instantiated during runtime using JavaScript.
CUSTOM ELEMENTS
Offer the capability to create your own custom HTML tags and elements. They can have
their own scripted behaviour and CSS styling.
SHADOW ELEMENTS
Provide encapsulation for JavaScript, CSS, and templating in a Web Component. Shadow
DOM allows these things to remain separate from the DOM of the main document.
4
WEB COMPONENT TECHNOLOGIES :
INFO
5
WHO SUPPORT WEB COMPONENTS
INFO
6
WHAT CAN WE DO WITH OLD BROWSERS?
INFO
WEBCOMPONENTS.JS IS A SET OF POLYFILLS BUILT
ON TOP OF THE WEB COMPONENTS
SPECIFICATIONS. IT MAKES IT POSSIBLE TO USE
THESE STANDARDS TODAY.
7
Polymer is a new type of library for the web,
built on top of Web Components and designed
to leverage the evolving web platform on
modern browsers.
X-Tag is a small JavaScript library, created and
supported by Mozilla, that brings Web
Components Custom Element capabilities to all
modern browsers.
Brick is a collection of UI components designed
for the easy and quick building of web
application UIs.
Skate is a web component library that is focused
on being a tiny, performant, syntactic-sugar for
binding behaviour to custom and existing
elements without ever having to worry about
when your element is inserted into the DOM.
AVAILABLE LIBRARIES
INFO
WEB COMPONENT PROJECT STACK
INFO 8
NEW BROWSER
WEB COMPONENT SUPPORT
OLD BROWSER
WEBCOMPONENTS.JS
POLYMER , X-TAG , MOZILLA BRICK , BOSONIC , VANILLAJS
PART 2 EXAMPLE
CREATE A WEB COMPONENTS IN 4 STEP
9
YEOMAN GENERATOR
EXAMPLE STEP 1
OLD
BROWSER
1. $ npm install -g generator-wbelement
2. $ mkdir awesome-element
3. $ cd awesome-element
4. $ yo wbelement
1. What do you want to use? You can choose which library use but for this example we will pick Polymer
2. Which version? If the library has different versions in this case we get the version 1.4.0
3. What's the GitHub repository?
4. What's your GitHub username?
5. What's the name of your element? awesome-element
6. How would you describe the element? awesome example project
7. Do you want to include lifecycle callbacks?
8. Do you want to include some useful Grunt tasks?
First step we are going to use a yeoman generator generator-element
10
ANALYZE THE AWESOME-EXAMPLE GENERATED
EXAMPLE STEP 2
OLD
BROWSER
Open the Awesome-element directory
you’ll find the structure above:
10
STRUCTURE OPEN SOURCE
Open the source file src/awesome-element .html
ADD SOME CODE
EXAMPLE STEP 2
<template>
<h1>[[title]]</h1>
<p>
<a href="http://thecatapi.com">
<img src="http://thecatapi.com/api/images/get?format=src&type=gif">
</a>
</p>
</template>
ready: function() {
this.title = 'CAT';
},
TEMPLATE READY JAVASCRIPT
You can find the entire code here : https://github.com/eromano/example-web-componet
AWESOME-ELEMENT IN ACTION
EXAMPLE STEP 3
In order to use the new tag created you need only to
import the tag in the header section:
<link rel="import" href="../src/awesome-element.html">
Use the tag in the body section:
<body>
<awesome-element></awesome-element>
</body>
HOW TO DISTRIBUTE YOUR NEW TAG
EXAMPLE STEP 3
1. Pushing your element to GitHub
$grunt deploy (or Push in some way your project on gitHub)
2. Version of your element
A) git tag -a v0.0.1 -m '0.0.1'
B) git push --tags
3. Register on bower:
bower register example-web-component https://github.com/(yourusername)/example-web-component.git
4. You should now be able to install your new component with bower in any project:
bower install <username>/awesome-element
CONCLUSIONS
END
Join the revolution
Web Components are about reusability and scalability.
Rewriting components is a waste of money
Create your own tag!
We were waiting for this since HTML5
• http://webcomponents.org/
• https://developer.mozilla.org/en-US/docs/Web/Web_Components
• http://www.2ality.com/2015/08/web-component-status.html
• https://www.youtube.com/watch?v=JUzjr1bIRUg
BIBLIOGRAPHY
END
THANK YOU

More Related Content

What's hot

Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupalsparkfabrik
 
Word press Plugins by WordPress Experts
Word press Plugins by WordPress ExpertsWord press Plugins by WordPress Experts
Word press Plugins by WordPress ExpertsYameen Khan
 
Introduction To Ant1
Introduction To  Ant1Introduction To  Ant1
Introduction To Ant1Rajesh Kumar
 
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying ConfigurationIBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying ConfigurationDevelopment Seed
 
Build website in_django
Build website in_django Build website in_django
Build website in_django swee meng ng
 
Session on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaSession on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaAgile Testing Alliance
 
Django app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh AgarwalDjango app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh Agarwalratneshsinghparihar
 
Getting started with spfx
Getting started with spfxGetting started with spfx
Getting started with spfxJenkins NS
 
10 Laravel packages everyone should know
10 Laravel packages everyone should know10 Laravel packages everyone should know
10 Laravel packages everyone should knowPovilas Korop
 
Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...Agile Testing Alliance
 
Play Framework on Google App Engine - Productivity Stack
Play Framework on Google App Engine - Productivity StackPlay Framework on Google App Engine - Productivity Stack
Play Framework on Google App Engine - Productivity StackMarcin Stepien
 
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobileJavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobileLoiane Groner
 
Mastering Maven 2.0 In 1 Hour V1.3
Mastering Maven 2.0 In 1 Hour V1.3Mastering Maven 2.0 In 1 Hour V1.3
Mastering Maven 2.0 In 1 Hour V1.3Matthew McCullough
 

What's hot (20)

Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
WordPress Plugins
WordPress PluginsWordPress Plugins
WordPress Plugins
 
Word press Plugins by WordPress Experts
Word press Plugins by WordPress ExpertsWord press Plugins by WordPress Experts
Word press Plugins by WordPress Experts
 
Introduction To Ant1
Introduction To  Ant1Introduction To  Ant1
Introduction To Ant1
 
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying ConfigurationIBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
 
Installing AtoM with Ansible
Installing AtoM with AnsibleInstalling AtoM with Ansible
Installing AtoM with Ansible
 
Apache ant
Apache antApache ant
Apache ant
 
Build website in_django
Build website in_django Build website in_django
Build website in_django
 
Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
 
Session on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaSession on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh Gundecha
 
Django app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh AgarwalDjango app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh Agarwal
 
Getting started with spfx
Getting started with spfxGetting started with spfx
Getting started with spfx
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
10 Laravel packages everyone should know
10 Laravel packages everyone should know10 Laravel packages everyone should know
10 Laravel packages everyone should know
 
Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...Session on Launching Selenium Grid and Running tests using docker compose and...
Session on Launching Selenium Grid and Running tests using docker compose and...
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
 
Play Framework on Google App Engine - Productivity Stack
Play Framework on Google App Engine - Productivity StackPlay Framework on Google App Engine - Productivity Stack
Play Framework on Google App Engine - Productivity Stack
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobileJavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
 
Mastering Maven 2.0 In 1 Hour V1.3
Mastering Maven 2.0 In 1 Hour V1.3Mastering Maven 2.0 In 1 Hour V1.3
Mastering Maven 2.0 In 1 Hour V1.3
 

Similar to Web components Introduction

IRJET- Polymer Javascript
IRJET- Polymer JavascriptIRJET- Polymer Javascript
IRJET- Polymer JavascriptIRJET Journal
 
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
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Componentssonumanoj
 
Implementing auto complete using JQuery
Implementing auto complete using JQueryImplementing auto complete using JQuery
Implementing auto complete using JQueryBhushan Mulmule
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshellLennart Schoors
 
Integrate Shindig with Joomla
Integrate Shindig with JoomlaIntegrate Shindig with Joomla
Integrate Shindig with JoomlaAnand Sharma
 
Joomla @ Barcamp4(Feb 08 Pune)
Joomla @ Barcamp4(Feb 08 Pune)Joomla @ Barcamp4(Feb 08 Pune)
Joomla @ Barcamp4(Feb 08 Pune)Amit Kumar Singh
 
Introduction to Apache Roller
Introduction to Apache RollerIntroduction to Apache Roller
Introduction to Apache RollerMatt Raible
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 
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 ElementsManuel Carrasco Moñino
 
CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMANAND PRAKASH
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkitPaul Jensen
 
Enyo Hackathon Presentation
Enyo Hackathon PresentationEnyo Hackathon Presentation
Enyo Hackathon PresentationBen Combee
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docxfantabulous2024
 
JS digest. Decemebr 2017
JS digest. Decemebr 2017JS digest. Decemebr 2017
JS digest. Decemebr 2017ElifTech
 

Similar to Web components Introduction (20)

IRJET- Polymer Javascript
IRJET- Polymer JavascriptIRJET- Polymer Javascript
IRJET- Polymer Javascript
 
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...
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Components
 
Implementing auto complete using JQuery
Implementing auto complete using JQueryImplementing auto complete using JQuery
Implementing auto complete using JQuery
 
Polymer Web Framework - Swecha Boot Camp
Polymer Web Framework - Swecha Boot CampPolymer Web Framework - Swecha Boot Camp
Polymer Web Framework - Swecha Boot Camp
 
Jquery
JqueryJquery
Jquery
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshell
 
Integrate Shindig with Joomla
Integrate Shindig with JoomlaIntegrate Shindig with Joomla
Integrate Shindig with Joomla
 
Lightning Web Component - LWC
Lightning Web Component - LWCLightning Web Component - LWC
Lightning Web Component - LWC
 
Joomla @ Barcamp4(Feb 08 Pune)
Joomla @ Barcamp4(Feb 08 Pune)Joomla @ Barcamp4(Feb 08 Pune)
Joomla @ Barcamp4(Feb 08 Pune)
 
Introduction to Apache Roller
Introduction to Apache RollerIntroduction to Apache Roller
Introduction to Apache Roller
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Introduction to Lightning Web Components
Introduction to Lightning Web ComponentsIntroduction to Lightning Web Components
Introduction to Lightning Web Components
 
Web component
Web componentWeb component
Web component
 
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
 
CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEM
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
Enyo Hackathon Presentation
Enyo Hackathon PresentationEnyo Hackathon Presentation
Enyo Hackathon Presentation
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docx
 
JS digest. Decemebr 2017
JS digest. Decemebr 2017JS digest. Decemebr 2017
JS digest. Decemebr 2017
 

Recently uploaded

Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 

Recently uploaded (20)

Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 

Web components Introduction

  • 5. Web Components enable the creation of UI atoms as HTML elements, atoms that you can include into your components templates, powered by Angular, Ember, React or whatever. Web Components is the next big thing. WHAT INTERNET SAY You can think of Web Components as reusable user interface widgets that are created using open Web technology. Components Are Ready For Production. Components Are NOT Ready For Production. This is an experimental technology. The browser you use it in must support Web Components. Web Components: A chance to create the future. 1INFO
  • 6. Web Components consist of several separate technologies. You can think of Web Components as reusable user interface widgets that are created using open Web technology 2 WHAT ARE WEB COMPONETS INFO WHAT ARE NOT WEB COMPONETS Web Components are not a library or framework nor a set of components made by a determinate company. Web Components are a new browser feature standardized by W3C Web Components are part of the browser, and so they do not need external libraries.
  • 7. REUSE 3 WHAT IS THE WEB COMPONENTS GOAL? INFO FAST EASY TO TEST INTEROPERABILITY When you create a web component, essentially you create a new tag <web-component> this tag is reusable everywhere and could be also extended by another web component. Web components are fast to learn in the end is just JAVASCRIPT and HTML. Any framework is compatible with DOM so you can reuse your component in any framework. Web components are a choice for the future. Web components are self contained and by their nature, promote the separation of concern. So they are easy to test it.
  • 8. HTML IMPORT Let’s you import other HTML documents into the current one. TEMPLATES Is a mechanism for holding client-side content that is not to be rendered when a page is loaded but may subsequently be instantiated during runtime using JavaScript. CUSTOM ELEMENTS Offer the capability to create your own custom HTML tags and elements. They can have their own scripted behaviour and CSS styling. SHADOW ELEMENTS Provide encapsulation for JavaScript, CSS, and templating in a Web Component. Shadow DOM allows these things to remain separate from the DOM of the main document. 4 WEB COMPONENT TECHNOLOGIES : INFO
  • 9. 5 WHO SUPPORT WEB COMPONENTS INFO
  • 10. 6 WHAT CAN WE DO WITH OLD BROWSERS? INFO WEBCOMPONENTS.JS IS A SET OF POLYFILLS BUILT ON TOP OF THE WEB COMPONENTS SPECIFICATIONS. IT MAKES IT POSSIBLE TO USE THESE STANDARDS TODAY.
  • 11. 7 Polymer is a new type of library for the web, built on top of Web Components and designed to leverage the evolving web platform on modern browsers. X-Tag is a small JavaScript library, created and supported by Mozilla, that brings Web Components Custom Element capabilities to all modern browsers. Brick is a collection of UI components designed for the easy and quick building of web application UIs. Skate is a web component library that is focused on being a tiny, performant, syntactic-sugar for binding behaviour to custom and existing elements without ever having to worry about when your element is inserted into the DOM. AVAILABLE LIBRARIES INFO
  • 12. WEB COMPONENT PROJECT STACK INFO 8 NEW BROWSER WEB COMPONENT SUPPORT OLD BROWSER WEBCOMPONENTS.JS POLYMER , X-TAG , MOZILLA BRICK , BOSONIC , VANILLAJS
  • 13. PART 2 EXAMPLE CREATE A WEB COMPONENTS IN 4 STEP 9
  • 14. YEOMAN GENERATOR EXAMPLE STEP 1 OLD BROWSER 1. $ npm install -g generator-wbelement 2. $ mkdir awesome-element 3. $ cd awesome-element 4. $ yo wbelement 1. What do you want to use? You can choose which library use but for this example we will pick Polymer 2. Which version? If the library has different versions in this case we get the version 1.4.0 3. What's the GitHub repository? 4. What's your GitHub username? 5. What's the name of your element? awesome-element 6. How would you describe the element? awesome example project 7. Do you want to include lifecycle callbacks? 8. Do you want to include some useful Grunt tasks? First step we are going to use a yeoman generator generator-element 10
  • 15. ANALYZE THE AWESOME-EXAMPLE GENERATED EXAMPLE STEP 2 OLD BROWSER Open the Awesome-element directory you’ll find the structure above: 10 STRUCTURE OPEN SOURCE Open the source file src/awesome-element .html
  • 16. ADD SOME CODE EXAMPLE STEP 2 <template> <h1>[[title]]</h1> <p> <a href="http://thecatapi.com"> <img src="http://thecatapi.com/api/images/get?format=src&type=gif"> </a> </p> </template> ready: function() { this.title = 'CAT'; }, TEMPLATE READY JAVASCRIPT You can find the entire code here : https://github.com/eromano/example-web-componet
  • 17. AWESOME-ELEMENT IN ACTION EXAMPLE STEP 3 In order to use the new tag created you need only to import the tag in the header section: <link rel="import" href="../src/awesome-element.html"> Use the tag in the body section: <body> <awesome-element></awesome-element> </body>
  • 18. HOW TO DISTRIBUTE YOUR NEW TAG EXAMPLE STEP 3 1. Pushing your element to GitHub $grunt deploy (or Push in some way your project on gitHub) 2. Version of your element A) git tag -a v0.0.1 -m '0.0.1' B) git push --tags 3. Register on bower: bower register example-web-component https://github.com/(yourusername)/example-web-component.git 4. You should now be able to install your new component with bower in any project: bower install <username>/awesome-element
  • 19. CONCLUSIONS END Join the revolution Web Components are about reusability and scalability. Rewriting components is a waste of money Create your own tag! We were waiting for this since HTML5
  • 20. • http://webcomponents.org/ • https://developer.mozilla.org/en-US/docs/Web/Web_Components • http://www.2ality.com/2015/08/web-component-status.html • https://www.youtube.com/watch?v=JUzjr1bIRUg BIBLIOGRAPHY END