SlideShare a Scribd company logo
Polymer or not Polymer
that is the question
Alexander KasheverovDataArt Summer School 2015
Who am I
Plan
• Intro
• Web Components
• Polymer
• Live Example
• Conclusion
• Homework
It all starts with elements
It all starts with elements
addyosmani.github.io/x-instagram/
<x-instagram tag="javascript" count="10"></x-instagram>
It all starts with elements
Web components
First draft in 2012
- Custom elements
- Templates
- Shadow DOM
- Html imports
- It brings native component-based solutions in browsers
Web components -> Custom elements
var XFoo = document.registerElement('x-foo', {
prototype: Object.create(HTMLElement.prototype, {
bar: { get: function() { return 5; } },
foo: { value: function() { alert('foo() called'); } }
})
});
var xfoo = document.createElement('x-foo');
document.body.appendChild(xfoo);
<x-foo></x-foo>
Web components -> Custom elements
var MegaButton = document.registerElement(‘mega-button', {
prototype: Object.create(HTMLButtonElement.prototype),
extends: 'button'
});
<button is="mega-button"> var btn = document.createElement( 'button', 'mega-button‘ );
Web components -> Templates
• Template is totally hidden until is used
• There's no way to "prerender" a template, meaning you cannot
preload assets, process JS, download initial CSS, etc
• Nested templates require that their children also be manually
activated
<template id="mytemplate">
<img src="" alt="great image">
<div class="comment"></div>
</template>
// Populate the src at runtime.
var t = document.querySelector('#mytemplate');
t.content.querySelector('img').src = 'logo.png';
var clone = document.importNode(t.content, true);
document.body.appendChild(clone);
Web components -> Shadow DOM
Hide Presentation Details
Web components -> Shadow DOM
<script>
var shadow = document.querySelector('#nameTag').createShadowRoot();
var template = document.querySelector('#nameTagTemplate');
var clone = document.importNode(template.content, true);
shadow.appendChild(clone);
</script>
Web components -> Shadow DOM
Separate Content from Presentation
Web components -> Shadow DOM
Document
Shadow root
Web components -> Html imports
How to load different types of resources?
• <script src>
• <link rel="stylesheet">
• <img>
• <video>
• <audio>
• <iframe>
• AJAX
• ???
Web components -> Html imports
A new one:
• <link rel="import" href="/path/to/imports/stuff.html">
Instead of loading each html/css/js for Bootstrap separately you
could import just an html file
Web components support by browser
• Works in evergreen browsers (which have auto-update)
• And what about others?
Polymer
- It’s not a framework
- Adds shims for browsers that don’t support web components
- Adds sugar
- A slogan `we have an element for that`
- Updated this year to version 1.0
- Less code 35% overall
- Speed increased 3x (chrome), 4x (mobile safari)
Polymer
Elements
Elements -> iron elements
<iron-ajax
auto url="http://gdata.youtube.com/feeds/api/videos/"
params='{"alt":"json", "q":"chrome"}'
handle-as="json"
on-response="handleResponse"
debounce-duration="300">
</iron-ajax>
<iron-icon src="star.png"></iron-icon>
<iron-media-query query="(min-width: 600px)" query-matches="{{queryMatches}}">
</iron-media-query>
Elements -> paper elements
<paper-button>flat button</paper-button>
<paper-button raised>raised button</paper-button>
<paper-button noink>No ripple effect</paper-button>
<paper-input error-message="Invalid input!" label="Input label">
</paper-input>
<paper-checkbox checked> label</paper-checkbox>
Elements -> paper elements
https://polymerthemes.com/
Elements -> google web components
<google-chart
type='pie'
options='{"title": "Distribution of days in 2001H1"}'
cols='[{"label":"Month", "type":"string"}, {"label":"Days", "type":"number"}]'
rows='[["Jan", 31],["Feb", 28],["Mar", 31]]'>
</google-chart>
<google-youtube
video-id="..."
height="270px"
width="480px"
rel="0"
start="5"
autoplay="1">
</google-youtube>
Alternatives
- http://x-tags.org/
- http://bosonic.github.io/
Example
Installation
• Install node + npm
• npm install –save bower
• bower init
• bower install --save Polymer/polymer#^1.0.0
• Installed in a `bower_components` folder
OR
• Manually download/unpack from here polymer-project.org
Structure
index.html
components/cic-main.html
components/cic-main.html
components/cic-contributors.html
components/cic-contributor.html
components/cic-result.html
Angular vs Polymer
Questions
?
Useful links
Web components & Polymer
• webcomponents.org
• jonrimmer.github.io/are-we-componentized-yet/
• www.html5rocks.com/en/
• polymer-project.org
Chip-in calculator
• chip-in.me
• code: github.com/kashesandr/CIC
Homework -> weather-yahoo
1. Basic
Create a custom-element which shows weather in a city
provided via element’s property
2. Advanced
Create a custom-element which uses the custom element
above to show weather in list of cities
3. Expert
Create an editable list of cities (add, edit, remove),
selecting on one of them the weather should be shown
WeatherAPI https://developer.yahoo.com/weather/
Might be helpful http://todomvc.com/examples/polymer/index.html

More Related Content

What's hot

High Performance Web Design
High Performance Web DesignHigh Performance Web Design
High Performance Web Design
Koji Ishimoto
 
Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Polymer - Welcome to the Future @ PyGrunn 08/07/2014Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Spyros Ioakeimidis
 
Apex & jQuery Mobile
Apex & jQuery MobileApex & jQuery Mobile
Apex & jQuery Mobile
Christian Rokitta
 
Introduction to polymer project
Introduction to polymer projectIntroduction to polymer project
Introduction to polymer project
Christoforus Surjoputro
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Gill Cleeren
 
Polymer and web component
Polymer and web componentPolymer and web component
Polymer and web component
Imam Raza
 
Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)
Hendrik Ebbers
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
Timothy Fisher
 
Polymer
Polymer Polymer
Polymer jskvara
 
How to build a web application with Polymer
How to build a web application with PolymerHow to build a web application with Polymer
How to build a web application with Polymer
Sami Suo-Heikki
 
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一
okyawa
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1
Robert Nyman
 
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
GreeceJS
 
Challenges going mobile
Challenges going mobileChallenges going mobile
Challenges going mobile
Christian Rokitta
 
Unlock the next era of UI design with Polymer
Unlock the next era of UI design with PolymerUnlock the next era of UI design with Polymer
Unlock the next era of UI design with Polymer
Rob Dodson
 
HTML5 Web Workers-unleashed
HTML5 Web Workers-unleashedHTML5 Web Workers-unleashed
HTML5 Web Workers-unleashedPeter Lubbers
 
Html5
Html5Html5
Extreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NYExtreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NY
Maximiliano Firtman
 
Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)Polymer vs other libraries (Devfest Ukraine 2015)
Polymer vs other libraries (Devfest Ukraine 2015)
jskvara
 
Brownbag on basics of web components
Brownbag on basics of web componentsBrownbag on basics of web components
Brownbag on basics of web components
Jason Park
 

What's hot (20)

High Performance Web Design
High Performance Web DesignHigh Performance Web Design
High Performance Web Design
 
Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Polymer - Welcome to the Future @ PyGrunn 08/07/2014Polymer - Welcome to the Future @ PyGrunn 08/07/2014
Polymer - Welcome to the Future @ PyGrunn 08/07/2014
 
Apex & jQuery Mobile
Apex & jQuery MobileApex & jQuery Mobile
Apex & jQuery Mobile
 
Introduction to polymer project
Introduction to polymer projectIntroduction to polymer project
Introduction to polymer project
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!
 
Polymer and web component
Polymer and web componentPolymer and web component
Polymer and web component
 
Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 
Polymer
Polymer Polymer
Polymer
 
How to build a web application with Polymer
How to build a web application with PolymerHow to build a web application with Polymer
How to build a web application with Polymer
 
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1
 
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
 
Challenges going mobile
Challenges going mobileChallenges going mobile
Challenges going mobile
 
Unlock the next era of UI design with Polymer
Unlock the next era of UI design with PolymerUnlock the next era of UI design with Polymer
Unlock the next era of UI design with Polymer
 
HTML5 Web Workers-unleashed
HTML5 Web Workers-unleashedHTML5 Web Workers-unleashed
HTML5 Web Workers-unleashed
 
Html5
Html5Html5
Html5
 
Extreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NYExtreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NY
 
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)
 
Brownbag on basics of web components
Brownbag on basics of web componentsBrownbag on basics of web components
Brownbag on basics of web components
 

Viewers also liked

Николай Грачев (AllBiz) "Продукт и пользователь: дружба начинается с UX"
Николай Грачев (AllBiz) "Продукт и пользователь: дружба начинается с UX"Николай Грачев (AllBiz) "Продукт и пользователь: дружба начинается с UX"
Николай Грачев (AllBiz) "Продукт и пользователь: дружба начинается с UX"
DataArt
 
Ксения Кобрин "Сферы применения различных типов менеджмента"
Ксения Кобрин "Сферы применения различных типов менеджмента"Ксения Кобрин "Сферы применения различных типов менеджмента"
Ксения Кобрин "Сферы применения различных типов менеджмента"
DataArt
 
Benefits for Millennials
Benefits for MillennialsBenefits for Millennials
Benefits for Millennials
UrbanBound
 
Арсений Жижелев «Наблюдение за игровым миром Аллодов (Play+Scala+Slick+Postgr...
Арсений Жижелев «Наблюдение за игровым миром Аллодов (Play+Scala+Slick+Postgr...Арсений Жижелев «Наблюдение за игровым миром Аллодов (Play+Scala+Slick+Postgr...
Арсений Жижелев «Наблюдение за игровым миром Аллодов (Play+Scala+Slick+Postgr...DataArt
 
sistema de gestión de contenidos
sistema de gestión de contenidossistema de gestión de contenidos
sistema de gestión de contenidos
Diego Rojas
 
Сергей Зиновьев — Разработка веб-приложений на Rails.
Сергей Зиновьев — Разработка веб-приложений на Rails.Сергей Зиновьев — Разработка веб-приложений на Rails.
Сергей Зиновьев — Разработка веб-приложений на Rails.
DataArt
 
Jkd indoor & outdoor signage catalog
Jkd indoor & outdoor signage catalogJkd indoor & outdoor signage catalog
Jkd indoor & outdoor signage catalog
Satyendra Gupta
 
«Документы, которые хочется прочитать: форматы и содержание, увлекающие коман...
«Документы, которые хочется прочитать: форматы и содержание, увлекающие коман...«Документы, которые хочется прочитать: форматы и содержание, увлекающие коман...
«Документы, которые хочется прочитать: форматы и содержание, увлекающие коман...
DataArt
 
Application form
Application formApplication form
Application formsksknba5015
 
Дмтрий Андрусенко (DataArt) "Мир IT вчера, сегодня и завтра"
Дмтрий Андрусенко (DataArt) "Мир IT вчера, сегодня и завтра"Дмтрий Андрусенко (DataArt) "Мир IT вчера, сегодня и завтра"
Дмтрий Андрусенко (DataArt) "Мир IT вчера, сегодня и завтра"
DataArt
 
Миша Постольный «Контрформа». Харьков.
Миша Постольный «Контрформа». Харьков. Миша Постольный «Контрформа». Харьков.
Миша Постольный «Контрформа». Харьков.
DataArt
 
«Чем занимается Google Life Sciences, и почему биотехнологии ожидает прорыв» ...
«Чем занимается Google Life Sciences, и почему биотехнологии ожидает прорыв» ...«Чем занимается Google Life Sciences, и почему биотехнологии ожидает прорыв» ...
«Чем занимается Google Life Sciences, и почему биотехнологии ожидает прорыв» ...
DataArt
 
Pertumbuhan dan Perkembangan Manusia
Pertumbuhan dan Perkembangan ManusiaPertumbuhan dan Perkembangan Manusia
Pertumbuhan dan Perkembangan Manusia
azyaNS
 
Riley slides (2)
Riley slides (2)Riley slides (2)
Riley slides (2)
Carisma Dunbar
 
Андрей Беляев "Мыслить как заказчик"
Андрей Беляев "Мыслить как заказчик"Андрей Беляев "Мыслить как заказчик"
Андрей Беляев "Мыслить как заказчик"
DataArt
 
Лилия Зданевич "Automation testing save time and money"
Лилия Зданевич "Automation testing save time and money"Лилия Зданевич "Automation testing save time and money"
Лилия Зданевич "Automation testing save time and money"
DataArt
 

Viewers also liked (20)

Николай Грачев (AllBiz) "Продукт и пользователь: дружба начинается с UX"
Николай Грачев (AllBiz) "Продукт и пользователь: дружба начинается с UX"Николай Грачев (AllBiz) "Продукт и пользователь: дружба начинается с UX"
Николай Грачев (AllBiz) "Продукт и пользователь: дружба начинается с UX"
 
Ксения Кобрин "Сферы применения различных типов менеджмента"
Ксения Кобрин "Сферы применения различных типов менеджмента"Ксения Кобрин "Сферы применения различных типов менеджмента"
Ксения Кобрин "Сферы применения различных типов менеджмента"
 
Benefits for Millennials
Benefits for MillennialsBenefits for Millennials
Benefits for Millennials
 
Арсений Жижелев «Наблюдение за игровым миром Аллодов (Play+Scala+Slick+Postgr...
Арсений Жижелев «Наблюдение за игровым миром Аллодов (Play+Scala+Slick+Postgr...Арсений Жижелев «Наблюдение за игровым миром Аллодов (Play+Scala+Slick+Postgr...
Арсений Жижелев «Наблюдение за игровым миром Аллодов (Play+Scala+Slick+Postgr...
 
sistema de gestión de contenidos
sistema de gestión de contenidossistema de gestión de contenidos
sistema de gestión de contenidos
 
Сергей Зиновьев — Разработка веб-приложений на Rails.
Сергей Зиновьев — Разработка веб-приложений на Rails.Сергей Зиновьев — Разработка веб-приложений на Rails.
Сергей Зиновьев — Разработка веб-приложений на Rails.
 
Jkd indoor & outdoor signage catalog
Jkd indoor & outdoor signage catalogJkd indoor & outdoor signage catalog
Jkd indoor & outdoor signage catalog
 
«Документы, которые хочется прочитать: форматы и содержание, увлекающие коман...
«Документы, которые хочется прочитать: форматы и содержание, увлекающие коман...«Документы, которые хочется прочитать: форматы и содержание, увлекающие коман...
«Документы, которые хочется прочитать: форматы и содержание, увлекающие коман...
 
Application form
Application formApplication form
Application form
 
Дмтрий Андрусенко (DataArt) "Мир IT вчера, сегодня и завтра"
Дмтрий Андрусенко (DataArt) "Мир IT вчера, сегодня и завтра"Дмтрий Андрусенко (DataArt) "Мир IT вчера, сегодня и завтра"
Дмтрий Андрусенко (DataArt) "Мир IT вчера, сегодня и завтра"
 
Pen pc
Pen pcPen pc
Pen pc
 
Sam mendes
Sam mendesSam mendes
Sam mendes
 
Миша Постольный «Контрформа». Харьков.
Миша Постольный «Контрформа». Харьков. Миша Постольный «Контрформа». Харьков.
Миша Постольный «Контрформа». Харьков.
 
«Чем занимается Google Life Sciences, и почему биотехнологии ожидает прорыв» ...
«Чем занимается Google Life Sciences, и почему биотехнологии ожидает прорыв» ...«Чем занимается Google Life Sciences, и почему биотехнологии ожидает прорыв» ...
«Чем занимается Google Life Sciences, и почему биотехнологии ожидает прорыв» ...
 
Pertumbuhan dan Perkembangan Manusia
Pertumbuhan dan Perkembangan ManusiaPertumbuhan dan Perkembangan Manusia
Pertumbuhan dan Perkembangan Manusia
 
Riley slides (2)
Riley slides (2)Riley slides (2)
Riley slides (2)
 
Андрей Беляев "Мыслить как заказчик"
Андрей Беляев "Мыслить как заказчик"Андрей Беляев "Мыслить как заказчик"
Андрей Беляев "Мыслить как заказчик"
 
Kudzu and Palmer Amaranth Weed Pests
Kudzu and Palmer Amaranth Weed PestsKudzu and Palmer Amaranth Weed Pests
Kudzu and Palmer Amaranth Weed Pests
 
Лилия Зданевич "Automation testing save time and money"
Лилия Зданевич "Automation testing save time and money"Лилия Зданевич "Automation testing save time and money"
Лилия Зданевич "Automation testing save time and money"
 
Christmas eve
Christmas eveChristmas eve
Christmas eve
 

Similar to Александр Кашеверов - Polymer

Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013gdgyaounde
 
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
jskvara
 
Web Components: back to the future
Web Components: back to the futureWeb Components: back to the future
Web Components: back to the future
DA-14
 
Polymer - Lego for the web!
Polymer - Lego for the web!Polymer - Lego for the web!
Polymer - Lego for the web!
Codemotion
 
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
Tommie Gannert
 
Academy PRO: HTML5 API Introduction
Academy PRO: HTML5 API IntroductionAcademy PRO: HTML5 API Introduction
Academy PRO: HTML5 API Introduction
Binary Studio
 
Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...
Marios Fakiolas
 
Introduction to Webcomponents
Introduction to WebcomponentsIntroduction to Webcomponents
Introduction to Webcomponents
Neha Sharma
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
Anup Hariharan Nair
 
Introduction to Polymer
Introduction to PolymerIntroduction to Polymer
Introduction to Polymer
Egor Miasnikov
 
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Google I/O 2012 - Protecting your user experience while integrating 3rd party...Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Patrick Meenan
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
Mike Wilcox
 
Desbravando Web Components
Desbravando Web ComponentsDesbravando Web Components
Desbravando Web Components
Mateus Ortiz
 
Orchard Harvest 2014 - The Future of Widgets?
Orchard Harvest 2014 - The Future of Widgets?Orchard Harvest 2014 - The Future of Widgets?
Orchard Harvest 2014 - The Future of Widgets?
Steve Taylor
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
Sadaaki HIRAI
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)
Mandakini Kumari
 
Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015
Phil Leggetter
 
Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
Marcus Hellberg
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
cherukumilli2
 

Similar to Александр Кашеверов - Polymer (20)

Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013
 
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
 
Web Components: back to the future
Web Components: back to the futureWeb Components: back to the future
Web Components: back to the future
 
Polymer - Lego for the web!
Polymer - Lego for the web!Polymer - Lego for the web!
Polymer - Lego for the web!
 
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
 
Academy PRO: HTML5 API Introduction
Academy PRO: HTML5 API IntroductionAcademy PRO: HTML5 API Introduction
Academy PRO: HTML5 API Introduction
 
Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...
 
Introduction to Webcomponents
Introduction to WebcomponentsIntroduction to Webcomponents
Introduction to Webcomponents
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 
Html5
Html5Html5
Html5
 
Introduction to Polymer
Introduction to PolymerIntroduction to Polymer
Introduction to Polymer
 
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Google I/O 2012 - Protecting your user experience while integrating 3rd party...Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
Desbravando Web Components
Desbravando Web ComponentsDesbravando Web Components
Desbravando Web Components
 
Orchard Harvest 2014 - The Future of Widgets?
Orchard Harvest 2014 - The Future of Widgets?Orchard Harvest 2014 - The Future of Widgets?
Orchard Harvest 2014 - The Future of Widgets?
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)
 
Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015
 
Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
 

More from DataArt

DataArt Custom Software Engineering with a Human Approach
DataArt Custom Software Engineering with a Human ApproachDataArt Custom Software Engineering with a Human Approach
DataArt Custom Software Engineering with a Human Approach
DataArt
 
DataArt Healthcare & Life Sciences
DataArt Healthcare & Life SciencesDataArt Healthcare & Life Sciences
DataArt Healthcare & Life Sciences
DataArt
 
DataArt Financial Services and Capital Markets
DataArt Financial Services and Capital MarketsDataArt Financial Services and Capital Markets
DataArt Financial Services and Capital Markets
DataArt
 
About DataArt HR Partners
About DataArt HR PartnersAbout DataArt HR Partners
About DataArt HR Partners
DataArt
 
Event management в IT
Event management в ITEvent management в IT
Event management в IT
DataArt
 
Digital Marketing from inside
Digital Marketing from insideDigital Marketing from inside
Digital Marketing from inside
DataArt
 
What's new in Android, Igor Malytsky ( Google Post I|O Tour)
What's new in Android, Igor Malytsky ( Google Post I|O Tour)What's new in Android, Igor Malytsky ( Google Post I|O Tour)
What's new in Android, Igor Malytsky ( Google Post I|O Tour)
DataArt
 
DevOps Workshop:Что бывает, когда DevOps приходит на проект
DevOps Workshop:Что бывает, когда DevOps приходит на проектDevOps Workshop:Что бывает, когда DevOps приходит на проект
DevOps Workshop:Что бывает, когда DevOps приходит на проект
DataArt
 
IT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArt
IT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArtIT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArt
IT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArt
DataArt
 
«Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han...
 «Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han... «Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han...
«Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han...
DataArt
 
Communication in QA's life
Communication in QA's lifeCommunication in QA's life
Communication in QA's life
DataArt
 
Нельзя просто так взять и договориться, или как мы работали со сложными людьми
Нельзя просто так взять и договориться, или как мы работали со сложными людьмиНельзя просто так взять и договориться, или как мы работали со сложными людьми
Нельзя просто так взять и договориться, или как мы работали со сложными людьми
DataArt
 
Знакомьтесь, DevOps
Знакомьтесь, DevOpsЗнакомьтесь, DevOps
Знакомьтесь, DevOps
DataArt
 
DevOps in real life
DevOps in real lifeDevOps in real life
DevOps in real life
DataArt
 
Codeless: автоматизация тестирования
Codeless: автоматизация тестированияCodeless: автоматизация тестирования
Codeless: автоматизация тестирования
DataArt
 
Selenoid
SelenoidSelenoid
Selenoid
DataArt
 
Selenide
SelenideSelenide
Selenide
DataArt
 
A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"
DataArt
 
Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...
Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...
Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...
DataArt
 
IT talk: Как я перестал бояться и полюбил TestNG
IT talk: Как я перестал бояться и полюбил TestNGIT talk: Как я перестал бояться и полюбил TestNG
IT talk: Как я перестал бояться и полюбил TestNG
DataArt
 

More from DataArt (20)

DataArt Custom Software Engineering with a Human Approach
DataArt Custom Software Engineering with a Human ApproachDataArt Custom Software Engineering with a Human Approach
DataArt Custom Software Engineering with a Human Approach
 
DataArt Healthcare & Life Sciences
DataArt Healthcare & Life SciencesDataArt Healthcare & Life Sciences
DataArt Healthcare & Life Sciences
 
DataArt Financial Services and Capital Markets
DataArt Financial Services and Capital MarketsDataArt Financial Services and Capital Markets
DataArt Financial Services and Capital Markets
 
About DataArt HR Partners
About DataArt HR PartnersAbout DataArt HR Partners
About DataArt HR Partners
 
Event management в IT
Event management в ITEvent management в IT
Event management в IT
 
Digital Marketing from inside
Digital Marketing from insideDigital Marketing from inside
Digital Marketing from inside
 
What's new in Android, Igor Malytsky ( Google Post I|O Tour)
What's new in Android, Igor Malytsky ( Google Post I|O Tour)What's new in Android, Igor Malytsky ( Google Post I|O Tour)
What's new in Android, Igor Malytsky ( Google Post I|O Tour)
 
DevOps Workshop:Что бывает, когда DevOps приходит на проект
DevOps Workshop:Что бывает, когда DevOps приходит на проектDevOps Workshop:Что бывает, когда DevOps приходит на проект
DevOps Workshop:Что бывает, когда DevOps приходит на проект
 
IT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArt
IT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArtIT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArt
IT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArt
 
«Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han...
 «Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han... «Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han...
«Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han...
 
Communication in QA's life
Communication in QA's lifeCommunication in QA's life
Communication in QA's life
 
Нельзя просто так взять и договориться, или как мы работали со сложными людьми
Нельзя просто так взять и договориться, или как мы работали со сложными людьмиНельзя просто так взять и договориться, или как мы работали со сложными людьми
Нельзя просто так взять и договориться, или как мы работали со сложными людьми
 
Знакомьтесь, DevOps
Знакомьтесь, DevOpsЗнакомьтесь, DevOps
Знакомьтесь, DevOps
 
DevOps in real life
DevOps in real lifeDevOps in real life
DevOps in real life
 
Codeless: автоматизация тестирования
Codeless: автоматизация тестированияCodeless: автоматизация тестирования
Codeless: автоматизация тестирования
 
Selenoid
SelenoidSelenoid
Selenoid
 
Selenide
SelenideSelenide
Selenide
 
A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"
 
Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...
Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...
Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...
 
IT talk: Как я перестал бояться и полюбил TestNG
IT talk: Как я перестал бояться и полюбил TestNGIT talk: Как я перестал бояться и полюбил TestNG
IT talk: Как я перестал бояться и полюбил TestNG
 

Recently uploaded

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
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
 
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
 
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
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
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
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 

Recently uploaded (20)

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
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
 
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...
 
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?
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
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
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 

Александр Кашеверов - Polymer

  • 1. Polymer or not Polymer that is the question Alexander KasheverovDataArt Summer School 2015
  • 3. Plan • Intro • Web Components • Polymer • Live Example • Conclusion • Homework
  • 4. It all starts with elements
  • 5. It all starts with elements addyosmani.github.io/x-instagram/ <x-instagram tag="javascript" count="10"></x-instagram>
  • 6. It all starts with elements
  • 7. Web components First draft in 2012 - Custom elements - Templates - Shadow DOM - Html imports - It brings native component-based solutions in browsers
  • 8. Web components -> Custom elements var XFoo = document.registerElement('x-foo', { prototype: Object.create(HTMLElement.prototype, { bar: { get: function() { return 5; } }, foo: { value: function() { alert('foo() called'); } } }) }); var xfoo = document.createElement('x-foo'); document.body.appendChild(xfoo); <x-foo></x-foo>
  • 9. Web components -> Custom elements var MegaButton = document.registerElement(‘mega-button', { prototype: Object.create(HTMLButtonElement.prototype), extends: 'button' }); <button is="mega-button"> var btn = document.createElement( 'button', 'mega-button‘ );
  • 10. Web components -> Templates • Template is totally hidden until is used • There's no way to "prerender" a template, meaning you cannot preload assets, process JS, download initial CSS, etc • Nested templates require that their children also be manually activated <template id="mytemplate"> <img src="" alt="great image"> <div class="comment"></div> </template> // Populate the src at runtime. var t = document.querySelector('#mytemplate'); t.content.querySelector('img').src = 'logo.png'; var clone = document.importNode(t.content, true); document.body.appendChild(clone);
  • 11. Web components -> Shadow DOM Hide Presentation Details
  • 12. Web components -> Shadow DOM <script> var shadow = document.querySelector('#nameTag').createShadowRoot(); var template = document.querySelector('#nameTagTemplate'); var clone = document.importNode(template.content, true); shadow.appendChild(clone); </script>
  • 13. Web components -> Shadow DOM Separate Content from Presentation
  • 14. Web components -> Shadow DOM Document Shadow root
  • 15. Web components -> Html imports How to load different types of resources? • <script src> • <link rel="stylesheet"> • <img> • <video> • <audio> • <iframe> • AJAX • ???
  • 16. Web components -> Html imports A new one: • <link rel="import" href="/path/to/imports/stuff.html"> Instead of loading each html/css/js for Bootstrap separately you could import just an html file
  • 17. Web components support by browser • Works in evergreen browsers (which have auto-update) • And what about others?
  • 18. Polymer - It’s not a framework - Adds shims for browsers that don’t support web components - Adds sugar - A slogan `we have an element for that` - Updated this year to version 1.0 - Less code 35% overall - Speed increased 3x (chrome), 4x (mobile safari)
  • 21. Elements -> iron elements <iron-ajax auto url="http://gdata.youtube.com/feeds/api/videos/" params='{"alt":"json", "q":"chrome"}' handle-as="json" on-response="handleResponse" debounce-duration="300"> </iron-ajax> <iron-icon src="star.png"></iron-icon> <iron-media-query query="(min-width: 600px)" query-matches="{{queryMatches}}"> </iron-media-query>
  • 22. Elements -> paper elements <paper-button>flat button</paper-button> <paper-button raised>raised button</paper-button> <paper-button noink>No ripple effect</paper-button> <paper-input error-message="Invalid input!" label="Input label"> </paper-input> <paper-checkbox checked> label</paper-checkbox>
  • 23. Elements -> paper elements https://polymerthemes.com/
  • 24. Elements -> google web components <google-chart type='pie' options='{"title": "Distribution of days in 2001H1"}' cols='[{"label":"Month", "type":"string"}, {"label":"Days", "type":"number"}]' rows='[["Jan", 31],["Feb", 28],["Mar", 31]]'> </google-chart> <google-youtube video-id="..." height="270px" width="480px" rel="0" start="5" autoplay="1"> </google-youtube>
  • 27. Installation • Install node + npm • npm install –save bower • bower init • bower install --save Polymer/polymer#^1.0.0 • Installed in a `bower_components` folder OR • Manually download/unpack from here polymer-project.org
  • 37. Useful links Web components & Polymer • webcomponents.org • jonrimmer.github.io/are-we-componentized-yet/ • www.html5rocks.com/en/ • polymer-project.org Chip-in calculator • chip-in.me • code: github.com/kashesandr/CIC
  • 38. Homework -> weather-yahoo 1. Basic Create a custom-element which shows weather in a city provided via element’s property 2. Advanced Create a custom-element which uses the custom element above to show weather in list of cities 3. Expert Create an editable list of cities (add, edit, remove), selecting on one of them the weather should be shown WeatherAPI https://developer.yahoo.com/weather/ Might be helpful http://todomvc.com/examples/polymer/index.html