Google Polymer – the future of web application development?

Google’s Polymer JavaScript library was first officially released four years ago, but the project has stayed fairly under the radar since then. Based on the W3C engineered Web Components, Polymer elements are reusable, customizable chunks of code which create standardized browser elements across the web. These individual HTML elements are designed to operate together natively, and allow for cleaner, more manageable code bases for web applications.

For those who are less familiar with Web Components, the standards include four key features:

  • HTML Templates - The 'template' element, which allows pages to contain inert areas of DOM inside
  • HTML Imports – Methods for importing HTML documents into other documents
  • Custom Elements - APIs which enable building new HTML elements
  • Shadow DOM – JavaScript, CSS and templates are a single unit, and separate from the DOM

Google’s Polymer project builds upon vanilla Web Components, adding new features such as improved custom element creation and repeatable templates. All of these features are directly built into the browser, and so are supported by (almost) all browsers. In addition to this, Polymer includes a large number of pre-built elements, which can kick start the development process.

Sounds great, right? Well, not everyone is in agreement. Facebook’s React library has exploded in popularity; it performs a similar role to Polymer elements, but supports code-sharing between front and back end environments, and has significant speed advantages over similar technologies. These speed advantages are a prominent argument for Reacts superiority.

So, what should you use when building a web application? React, Polymer, both together or something else altogether? It really depends on your implementation. More importantly, you should take care not to conflate React and Web Components. At a basic level, they are different things – Web Components are designed to allow encapsulation of reusable components, and React is excellent and keeping the DOM up to date in line with changes in your data. Given this, you should choose a tool based on what best meets your app functionality. You could even utilise both together; web Components behave as native HTML elements, and as such can be used in React applications as any other element would be.

The Web Components and Polymer specification is constantly maturing, though. And for a large number of potential use cases, the simplicity and modularity that Polymer affords is too good to pass up on. Developers wouldn’t need to worry about cross-browser interoperability as the library is based on a universal standard, and applications could be rapidly prototyped and developed due to the reusability of elements. As time goes on and in-built browser features become fuller and more developed, Polymer will certainly become more proliferate across the web, and change the way we build modern web applications.

Digital Assistant, your smart assistant for work
Work smarter, not harder Boost your workplace productivity and embrace digital transformation with your own intelligent personal assistant. Try it for free today. Get my free demo
Digital Assistant - the mobile assistant for a mobile workforce
Work smarter, not harder with Digital Assistant, the AI-powered digital assistant. Are you ready to start your digital transformation journey?

If you enjoyed this article, you might also like...

Try Digital Assistant with your team for free

Get started