Polymer (library)


Polymer is an open-source JavaScript library for building web applications using Web Components. The library is being developed by Google developers and contributors on GitHub. Modern design principles are implemented as a separate project using Google's Material Design design principles.
Polymer is used by a number of Google services and websites, including the YouTube, , the Google Earth, Google I/O websites, Google Play Music, of Google Sites and Allo .
Other notable users include Netflix, Electronics Arts, Comcast, Nuxeo, ING, Coca-Cola, McDonald's, BBVA, IBM and General Electric.

History

Public development of Polymer began on Nov 14, 2013 with the release of a Promises Polyfill. This steadily expanded into a web design library covering visual styling guidelines, data binding, and a large number of "Core" and "Paper" Web Components. Core components were originally envisioned to encompass generic functionality that would be essential to most websites, while Paper components were intended to provide more specialized components with Material Design concepts forming a key part of their design. A major milestone was reached with the release of Version 0.5, which was considered the first version of the project ready for use by early adopters.
Google continued to revise the design of Polymer after the release of 0.5, with special consideration given to the performance issues a number of developers found. This culminated with the release of Polymer 1.0 in 2015, which was the first "production ready" version of the library. Version 1.0 significantly improved the performance of Polymer, reducing load times by up to 7 times. With version 1.0 Google split the elements from the Polymer project to clearly distinguish the elements catalog from the Polymer polyfill & webcomponents-sugaring library.
On 14–15 September 2015, Google organized a in Amsterdam.
On 17–18 October 2016, Google organized a in London.
On 22–23 August 2017, Google organized a in Copenhagen.
On, the Polymer team announced that any future development in Polymer will shift away from its two-way binding and its template system, and will focus on LitElement and one-way bindings.

Features

Polymer provides a number of features over vanilla Web Components:
Polymer has begun to gain increasing recognition in the market, with spikes in use in 2015 and 2016 as documented by the website BuiltWith. Special attention has been paid to its structured design process, allowing for an interoperable "lego block" structure.

Custom elements

Custom elements can be created using ES modules with classes. Custom element definition comprises CSS style, HTML template of the element's local DOM, element properties, lifecycle callbacks and JavaScript methods:

import from '@polymer/polymer/polymer-element.js'
class HelloElement extends PolymerElement
window.customElements.define;

The element defined above can be used in HTML code: