SlideShare a Scribd company logo
Polymer
Una bella historia de amor
+Israel Blancas
@iblancasa
Israel Blancas
@iblancasa
Software Engineer at Real-Time Innovations
Google Developer Group organizer
Mejor tarde que nunca
Web Components are low-level
primitives that let you define
your own HTML Elements.
Template
Shadow DOM
Custom Elements
HTML Imports
native client-side templating
scoping, composition
define new HTML/DOM
loading web components
Primitives are designed so we can
build libraries on top of them.
So what is Polymer?
Polymer is not
a framework
Existing Frameworks
Applications
Web Platform
Web Components built with Polymer (or not)
Polymer is not
a framework
Sure?
Over 3M pages
Let’s build
an element!
Image by Gloria Viganò for the Noun Project
Hey user! Something awesome happened!
x
Hey user! Something awesome happened!
<alert-banner>
alert-banner.html
<dom-module id=“alert-banner">
<template>
</template>
<script>
Polymer({
is: ‘alert-banner'
});
</script>
</dom-module>
<link rel=“import” href=“../polymer/polymer.html”>
alert-banner.html
<dom-module id=“alert-banner">
<template>
</template>
<script>
Polymer({
is: ‘alert-banner'
});
</script>
</dom-module>
<link rel=“import” href=“../polymer/polymer.html”>
Import all of your
dependencies
alert-banner.html
<dom-module id=“alert-banner">
<template>
</template>
<script>
Polymer({
is: ‘alert-banner'
});
</script>
</dom-module>
<link rel=“import” href=“../polymer/polymer.html”>
A container for your
element definition
alert-banner.html
<dom-module id=“alert-banner">
<template>
</template>
<script>
Polymer({
is: ‘alert-banner'
});
</script>
</dom-module>
Local DOM is the DOM
an elements is in charge of
creating and managing
<link rel=“import” href=“../polymer/polymer.html”>
Shadow DOM
Shadow DOM || “Shady DOM”
Shadow DOM || “Shady DOM” == Local DOM
alert-banner.html
<dom-module id=“alert-banner">
<template>
</template>
<script>
Polymer({
is: ‘alert-banner'
});
</script>
</dom-module>
Local DOM is the DOM
an elements is in charge of
creating and managing
<link rel=“import” href=“../polymer/polymer.html”>
alert-banner.html
<dom-module id=“alert-banner">
<template>
<style>
.alert { background: blue; color: white; }
</style>
<div class=“alert”>
Hey user! Something awesome happened!
</div>
</template>
<script>
Polymer({
is: ‘alert-banner'
});
</script>
</dom-module>
<link rel=“import” href=“../polymer/polymer.html”>
Hey user! Something awesome happHey user! Something awesome happ
alert-banner.html
<dom-module id=“alert-banner">
<template>
<style>
.alert { background: blue; color: white; }
</style>
<div class=“alert”>
Hey user! Something awesome happened!
</div>
</template>
<script>
Polymer({
is: ‘alert-banner'
});
</script>
</dom-module>
<link rel=“import” href=“../polymer/polymer.html”>
Define your
prototype
</ul>
</header>
</nav>
<main>
<h1 class="logo">Polymer!</h1>
<alert-banner></alert-banner>
<section>
<article class="top-story">
<img src="headline.jpg"/>
Hey user! Something awesome happened!
alert-banner.html
<dom-module id=“alert-banner">
<template>
<style>
.alert { background: blue; color: white; }
</style>
<div class=“alert”>
Hey user! Something awesome happened!
</div>
</template>
<script>
Polymer({
is: ‘alert-banner'
});
</script>
</dom-module>
<link rel=“import” href=“../polymer/polymer.html”>
Replace hard-coded data
alert-banner.html
<dom-module id=“alert-banner">
<template>
<style>
.alert { background: blue; color: white; }
</style>
<div class=“alert”>
<content select=“.message”></content>
</div>
</template>
<script>
Polymer({
is: ‘alert-banner'
});
</script>
</dom-module>
<link rel=“import” href=“../polymer/polymer.html”>
With content elements!
Light DOM - The world outside
your component’s Local DOM
alert-banner.html
<dom-module id=“alert-banner">
<template>
<style>
.alert { background: blue; color: white; }
</style>
<div class=“alert”>
<content select=“.message”></content>
</div>
</template>
<script>
Polymer({
is: ‘alert-banner'
});
</script>
<link rel=“import” href=“../polymer/polymer.html”>
Select content with
CSS selectors
</header>
</nav>
<main>
<h1 class="logo">Polymer!</h1>
<alert-banner></alert-banner>
<section>
<article class="top-story">
<img src="headline.jpg"/>
<p>Lorem ipsum dolor sit amet…</p>
</header>
</nav>
<main>
<h1 class="logo">Polymer!</h1>
<alert-banner>
<span class=“message”>
Success! Your first component!
</span>
</alert-banner>
</header>
</nav>
<main>
<h1 class="logo">Polymer!</h1>
<alert-banner>
<span class=“message”>
Success! Your first component!
</span>
</alert-banner>
Matching class
Success! Your first component!
Elements
Building blocks for a better web
There’s an element for that!
https://beta.webcomponents.org
/collection/Polymer/elements
Applications
Combining elements into something great
Create or reuse elements in any app
Production-ising Apps
Build process out of the box
GDG Granada
polymer-project.org
Muchas gracias
¿Preguntas?
+Israel Blancas
@iblancasa

More Related Content

What's hot

Codemotion Rome 2016 - Polymer
Codemotion Rome 2016 - PolymerCodemotion Rome 2016 - Polymer
Codemotion Rome 2016 - Polymer
Maurizio Mangione
 
Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress? Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress?
GGDBologna
 
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Mahbubur Rahman
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66
Ivy Rueb
 

What's hot (20)

HTML5 Overview
HTML5 OverviewHTML5 Overview
HTML5 Overview
 
Html5 Overview
Html5 OverviewHtml5 Overview
Html5 Overview
 
Frontend Crash Course
Frontend Crash CourseFrontend Crash Course
Frontend Crash Course
 
Web Components
Web ComponentsWeb Components
Web Components
 
Enhance your WordPress development with Twig through Clarkson - WordCamp Barc...
Enhance your WordPress development with Twig through Clarkson - WordCamp Barc...Enhance your WordPress development with Twig through Clarkson - WordCamp Barc...
Enhance your WordPress development with Twig through Clarkson - WordCamp Barc...
 
Google Polymer Introduction
Google Polymer IntroductionGoogle Polymer Introduction
Google Polymer Introduction
 
Polymer presentation in Google HQ
Polymer presentation in Google HQPolymer presentation in Google HQ
Polymer presentation in Google HQ
 
Razor into the Razor'verse
Razor into the Razor'verseRazor into the Razor'verse
Razor into the Razor'verse
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
 
Codemotion Rome 2016 - Polymer
Codemotion Rome 2016 - PolymerCodemotion Rome 2016 - Polymer
Codemotion Rome 2016 - Polymer
 
Google’s PRPL Web development pattern
Google’s PRPL Web development patternGoogle’s PRPL Web development pattern
Google’s PRPL Web development pattern
 
Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)
 
Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress? Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress?
 
Goodbye JavaScript Hello Blazor
Goodbye JavaScript Hello BlazorGoodbye JavaScript Hello Blazor
Goodbye JavaScript Hello Blazor
 
INTERNSHIP BASED ON PHP-MY SQL-WORDPRESS-CODE IGNITOR-ANDROID-IOS DEV.-JAVA (...
INTERNSHIP BASED ON PHP-MY SQL-WORDPRESS-CODE IGNITOR-ANDROID-IOS DEV.-JAVA (...INTERNSHIP BASED ON PHP-MY SQL-WORDPRESS-CODE IGNITOR-ANDROID-IOS DEV.-JAVA (...
INTERNSHIP BASED ON PHP-MY SQL-WORDPRESS-CODE IGNITOR-ANDROID-IOS DEV.-JAVA (...
 
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
 
Web Components
Web ComponentsWeb Components
Web Components
 
HTML5 for Rich User Experience
HTML5 for Rich User ExperienceHTML5 for Rich User Experience
HTML5 for Rich User Experience
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66
 

Viewers also liked

Identifying Your Skills Sets
Identifying Your Skills SetsIdentifying Your Skills Sets
Identifying Your Skills Sets
Scott Garrett
 

Viewers also liked (20)

Polymer science: preparation and uses of polymers
Polymer science: preparation and uses of polymersPolymer science: preparation and uses of polymers
Polymer science: preparation and uses of polymers
 
Polymer ppt
Polymer pptPolymer ppt
Polymer ppt
 
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
The rise of Polymer and Web Components (Kostas Karolemeas) - GreeceJS #17
 
Google Polymer Framework
Google Polymer FrameworkGoogle Polymer Framework
Google Polymer Framework
 
Polymers
PolymersPolymers
Polymers
 
Polymers and their properties
Polymers and their propertiesPolymers and their properties
Polymers and their properties
 
Identifying Your Skills Sets
Identifying Your Skills SetsIdentifying Your Skills Sets
Identifying Your Skills Sets
 
Los Colores en español
Los Colores en españolLos Colores en español
Los Colores en español
 
The British and Spanish law about bulliying 2017
The British and Spanish law about bulliying 2017The British and Spanish law about bulliying 2017
The British and Spanish law about bulliying 2017
 
Presentaciones open-office-impress
Presentaciones open-office-impressPresentaciones open-office-impress
Presentaciones open-office-impress
 
2014 Resume
2014 Resume2014 Resume
2014 Resume
 
Food chains
Food chainsFood chains
Food chains
 
Food chain story
Food chain storyFood chain story
Food chain story
 
My food chain story
My food chain storyMy food chain story
My food chain story
 
Polymer Chemistry
Polymer ChemistryPolymer Chemistry
Polymer Chemistry
 
Polymer Elements: Tudo que você precisa saber para criar a web
Polymer Elements: Tudo que você precisa saber para criar a webPolymer Elements: Tudo que você precisa saber para criar a web
Polymer Elements: Tudo que você precisa saber para criar a web
 
Polymer and Firebase: Componentizing the Web in Realtime
Polymer and Firebase: Componentizing the Web in RealtimePolymer and Firebase: Componentizing the Web in Realtime
Polymer and Firebase: Componentizing the Web in Realtime
 
Material design
Material designMaterial design
Material design
 
O futuro do Android
O futuro do AndroidO futuro do Android
O futuro do Android
 
Tech talk polymer
Tech talk polymerTech talk polymer
Tech talk polymer
 

Similar to Polymer - Una bella historia de amor

Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013
gdgyaounde
 

Similar to Polymer - Una bella historia de amor (20)

Polytechnic 1.0 Granada
Polytechnic 1.0 GranadaPolytechnic 1.0 Granada
Polytechnic 1.0 Granada
 
Polymer - Lego for the web!
Polymer - Lego for the web!Polymer - Lego for the web!
Polymer - Lego for the web!
 
Introduction to web components
Introduction to web componentsIntroduction to web components
Introduction to web components
 
Polymer-Powered Design Systems - DevFest Florida
Polymer-Powered Design Systems - DevFest FloridaPolymer-Powered Design Systems - DevFest Florida
Polymer-Powered Design Systems - DevFest Florida
 
Web Components: back to the future
Web Components: back to the futureWeb Components: back to the future
Web Components: back to the future
 
Polymer
PolymerPolymer
Polymer
 
The Structure of Web Code: A Case For Polymer, November 1, 2014
The Structure of Web Code: A Case For Polymer, November 1, 2014The Structure of Web Code: A Case For Polymer, November 1, 2014
The Structure of Web Code: A Case For Polymer, November 1, 2014
 
Polymer Code Lab in Dart - DevFest Kraków 2014
Polymer Code Lab in Dart - DevFest Kraków 2014Polymer Code Lab in Dart - DevFest Kraków 2014
Polymer Code Lab in Dart - DevFest Kraków 2014
 
Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013
 
Polymer 1.0
Polymer 1.0Polymer 1.0
Polymer 1.0
 
BreizhBeans - Web components
BreizhBeans - Web componentsBreizhBeans - Web components
BreizhBeans - Web components
 
Web Components and Modular CSS
Web Components and Modular CSSWeb Components and Modular CSS
Web Components and Modular CSS
 
Web Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xWeb Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.x
 
Web Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xWeb Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.x
 
Web Components: Web back to future.
Web Components: Web back to future.Web Components: Web back to future.
Web Components: Web back to future.
 
Reaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerReaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and Polymer
 
Web components
Web componentsWeb components
Web components
 
HTML5
HTML5HTML5
HTML5
 
HTML5 Essential Training
HTML5 Essential TrainingHTML5 Essential Training
HTML5 Essential Training
 
Ensuring Design Standards with Web Components
Ensuring Design Standards with Web ComponentsEnsuring Design Standards with Web Components
Ensuring Design Standards with Web Components
 

More from Israel Blancas

More from Israel Blancas (10)

What is happening with my microservices?
What is happening with my microservices?What is happening with my microservices?
What is happening with my microservices?
 
GitHubś data is a life-changer
GitHubś data is a life-changerGitHubś data is a life-changer
GitHubś data is a life-changer
 
Progressive Web Apps - Porque nativo no es significa mejor
Progressive Web Apps - Porque nativo no es significa mejorProgressive Web Apps - Porque nativo no es significa mejor
Progressive Web Apps - Porque nativo no es significa mejor
 
TensorFlow - La IA detrás de Google
TensorFlow - La IA detrás de GoogleTensorFlow - La IA detrás de Google
TensorFlow - La IA detrás de Google
 
Jornada de asociaciones ETSIIT 2016
Jornada de asociaciones  ETSIIT 2016Jornada de asociaciones  ETSIIT 2016
Jornada de asociaciones ETSIIT 2016
 
GitHubCity: una biblioteca para conocer tu comunidad
GitHubCity: una biblioteca para conocer tu comunidadGitHubCity: una biblioteca para conocer tu comunidad
GitHubCity: una biblioteca para conocer tu comunidad
 
NodIO: Marco de desarrollo de aplicaciones para computación evolutiva voluntaria
NodIO: Marco de desarrollo de aplicaciones para computación evolutiva voluntariaNodIO: Marco de desarrollo de aplicaciones para computación evolutiva voluntaria
NodIO: Marco de desarrollo de aplicaciones para computación evolutiva voluntaria
 
El valor de lo abierto de software libre y datos
El valor de lo abierto  de software libre y datosEl valor de lo abierto  de software libre y datos
El valor de lo abierto de software libre y datos
 
Google Summer of Code
Google Summer of CodeGoogle Summer of Code
Google Summer of Code
 
Paasalo - Usando plataformas como servicio para publicar tu aplicación
Paasalo - Usando plataformas como servicio para publicar tu aplicaciónPaasalo - Usando plataformas como servicio para publicar tu aplicación
Paasalo - Usando plataformas como servicio para publicar tu aplicación
 

Recently uploaded

Recently uploaded (20)

GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 

Polymer - Una bella historia de amor