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
Developer(s)Google[1] and contributors[2]
Initial releaseMay 29, 2015 (2015-05-29)[3]
Stable release
1.x 1.12.0 / 21 May 2019 (2019-05-21)[4]
2.x2.8.0 / 24 June 2019 (2019-06-24)[4]
3.x0.2.2[5] Edit this on Wikidata / 1 April 2014; 18 April 2014; 12 May 2014; 28 May 2014; 30 May 2014; 9 June 2014; 20 June 2014; 11 July 2014; 8 August 2014; 28 August 2014; 19 September 2014; 7 October 2014; 11 November 2014; 12 November 2014; 15 December 2014; 21 January 2015; 24 January 2015; 23 February 2015; 17 May 2015; 2 June 2015; 2 June 2015; 2 June 2015; 26 June 2015; 9 July 2015; 20 August 2015; 20 August 2015; 20 August 2015; 17 August 2015; 20 August 2015; 28 August 2015; 8 October 2015; 8 October 2015; 8 October 2015; 23 October 2015; 29 October 2015; 17 November 2015; 17 November 2015; 27 January 2016; 22 February 2016; 2 March 2016; 18 March 2016; 31 May 2016; 29 June 2016; 1 August 2016; 28 September 2016; 14 December 2016; 7 February 2017; 27 February 2017; 14 April 2017; 17 April 2017; 15 June 2017; 20 July 2017; 19 September 2017; 28 September 2017; 18 October 2017; 5 December 2017; 15 December 2017; 13 February 2018; 20 May 2019; 15 May 2017; 25 May 2017; 15 July 2017; 19 September 2017; 28 September 2017; 18 October 2017; 5 December 2017; 7 December 2017; 2 February 2018; 22 March 2018; 23 August 2018; 3 December 2018; 22 March 2019; 16 April 2019; 24 June 2019; 9 May 2018; 9 May 2018; 30 July 2018; 30 July 2018; 30 July 2018; 26 October 2018; 22 March 2019; 24 June 2019; 9 May 2018; 8 November 2019; 27 April 2020; 30 April 2020; 2 February 2016; 2 February 2016; 6 January 2017; 6 January 2017; 12 May 2017; 22 August 2017; 5 December 2017; 12 January 2018; 12 January 2018; 16 January 2018; 23 January 2018; 23 January 2018; 26 January 2018; 30 January 2018; 7 February 2018; 8 February 2018; 22 February 2018; 9 March 2018; 22 March 2018; 30 April 2018; 18 May 2022; 3 June 2022 (1 April 2014; 18 April 2014; 12 May 2014; 28 May 2014; 30 May 2014; 9 June 2014; 20 June 2014; 11 July 2014; 8 August 2014; 28 August 2014; 19 September 2014; 7 October 2014; 11 November 2014; 12 November 2014; 15 December 2014; 21 January 2015; 24 January 2015; 23 February 2015; 17 May 2015; 2 June 2015; 2 June 2015; 2 June 2015; 26 June 2015; 9 July 2015; 20 August 2015; 20 August 2015; 20 August 2015; 17 August 2015; 20 August 2015; 28 August 2015; 8 October 2015; 8 October 2015; 8 October 2015; 23 October 2015; 29 October 2015; 17 November 2015; 17 November 2015; 27 January 2016; 22 February 2016; 2 March 2016; 18 March 2016; 31 May 2016; 29 June 2016; 1 August 2016; 28 September 2016; 14 December 2016; 7 February 2017; 27 February 2017; 14 April 2017; 17 April 2017; 15 June 2017; 20 July 2017; 19 September 2017; 28 September 2017; 18 October 2017; 5 December 2017; 15 December 2017; 13 February 2018; 20 May 2019; 15 May 2017; 25 May 2017; 15 July 2017; 19 September 2017; 28 September 2017; 18 October 2017; 5 December 2017; 7 December 2017; 2 February 2018; 22 March 2018; 23 August 2018; 3 December 2018; 22 March 2019; 16 April 2019; 24 June 2019; 9 May 2018; 9 May 2018; 30 July 2018; 30 July 2018; 30 July 2018; 26 October 2018; 22 March 2019; 24 June 2019; 9 May 2018; 8 November 2019; 27 April 2020; 30 April 2020; 2 February 2016; 2 February 2016; 6 January 2017; 6 January 2017; 12 May 2017; 22 August 2017; 5 December 2017; 12 January 2018; 12 January 2018; 16 January 2018; 23 January 2018; 23 January 2018; 26 January 2018; 30 January 2018; 7 February 2018; 8 February 2018; 22 February 2018; 9 March 2018; 22 March 2018; 30 April 2018; 18 May 2022; 3 June 2022)
Repositorypolymer
Written inJavaScript, HTML
TypeJavaScript library
License3-Clause BSD[6]
Websitewww.polymer-project.org

Polymer is used by a number of Google services and websites, including YouTube, YouTube Gaming, the redesigned Google Earth (since 2017),[7] Google I/O 2015 and 2016 websites, Google Play Music, redesign of Google Sites[8] and Allo for web (until its shutdown in 2019).[9]

Other notable users include Netflix, Electronics Arts, Comcast, Nuxeo, Coca-Cola, McDonald's, BBVA, IBM and General Electric.

History

Public development of Polymer began in November 2013 with the release of a Promises Polyfill. This steadily expanded into a web design library covering visual styling guidelines (via Material Design), 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.[10]

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.[11] Version 1.0 significantly improved the performance of Polymer, reducing load times by up to 7 times.[12] 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 Polymer Summit in Amsterdam.

On 17–18 October 2016, Google organized a Polymer Summit in London.

On 22–23 August 2017, Google organized a Polymer Summit in Copenhagen.

On 2 May 2018, 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[13] (still part of Polymer[14]) and one-way bindings.[15]

Features

Polymer provides a number of features over vanilla Web Components:

  • Simplified way of creating custom elements
  • Both One-way and Two-way data binding
  • Computed properties
  • Conditional and repeat templates
  • Gesture events

Usage

Polymer has begun to gain increasing recognition in the market, with spikes in use in 2015 and 2016 as documented by the website BuiltWith.[16] Special attention has been paid to its structured design process, allowing for an interoperable "Lego Block" structure.[17]

Custom elements

Custom elements can be created using ES (ECMAScript, most commonly JavaScript) 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 {PolymerElement, html} from '@polymer/polymer'

class HelloElement extends PolymerElement {
    // Define the element's template
    static get template() { 
        return html`
        <style>
        /* Local DOM CSS style */
        </style>
        <!-- Local DOM -->
        Hello {{name}}!
        `; 
    }
    static get is() { return 'hello-element'; }
    // Define public API properties
    static get properties() {
        return {
            name: {
                type: String
            }
        };
    }
}
window.customElements.define(HelloElement.is, HelloElement);

The element defined above can be used in HTML code:

    <hello-element name="World"></hello-element>

See also

References

  1. "AUTHORS.txt". Retrieved 18 August 2017.
  2. "CONTRIBUTORS.txt". Retrieved 18 August 2017.
  3. "1.0". Polymer Project. Retrieved 18 August 2017.
  4. "Releases · Polymer/polymer". GitHub. Retrieved 4 September 2019.
  5. "Release 0.2.2". 1 April 2014. Retrieved 5 August 2019.
  6. "polymer/LICENSE.txt at master". GitHub. Retrieved 24 April 2017.
  7. Bidelman, Eric (2017-04-18). "Mission accomplished: has been componentized. New @googleearth is built w/ #WebComponents using @polymer.pic.twitter.com/h76ztfynYy". @ebidel. Retrieved 2017-07-08.
  8. "Meet Google Drive – One place for all your files". accounts.google.com. Retrieved 2021-06-21.
  9. "Who's using Polymer?". GitHub. Retrieved 4 June 2016.
  10. "Polymer gives us a closer look at Google's Material Design UI". Android Authority.
  11. Steven Max Patterson (29 May 2015). "Google's Polymer 1.0 brings reuse and better branding to Web development". CIO.
  12. "Welcome - Polymer 1.0". Archived from the original on 2015-08-14.
  13. "Roadmap update, part 1: 3.0 and beyond".
  14. "Justin Fagnani on Twitter". Twitter. Retrieved 2018-05-14.
  15. "Roadmap update, part 2: FAQ - Polymer Project". www.polymer-project.org. Retrieved 2018-05-14.
  16. "Polymer Usage Statistics". BuiltWith. March 2019. Retrieved 30 May 2019.
  17. Allie Coyne (13 August 2015). "Inside ING Direct's new lego block app architecture". iTnews.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.