Why you need to start using Polymer for your Web development

Today I’ll discuss why people like the Google Polymer JavaScript library. The short answer is that Polymer makes it easier to create and use web components. To understand that, we need to dig a little deeper. HTML has about 100 standard components, such as div. Those don't really cover everything you want to do on Web sites. For example, you can’t change your page appearance over time. There are a variety of JavaScript libraries to enhance the capabilities of HTML, but having a capability in a library is not as good, or as modular, as having it in the browser.As we've learned from long experience, adding a new component to the HTML standard requires the W3C committee to agree on a specification. and all the browser vendors to implement that specification. That can take years.Instead of going through all that pain for every new component, why not have a single specification for custom components?Web Components are a suite of draft specifications for the implementation of custom HTML components. There are 4 parts:Custom elements is an API for registering your own implementations for HTML elements.Shadow DOM encapsulates and hides the interior of a custom element inside a nested document. This is the most important part of Web Components and hardest to polyfill. (Polyfills are libraries that work around missing browser implementations.)Templates enable you to store HTML data inside an HTML document. The content of a element is parsed without interpreting or acting on it.HTML Imports let you import other HTML documents into the current one. That way, HTML documents become bundles of HTML, CSS and JavaScript. You need such bundles to distribute custom elements and all of their dependencies. This overlaps with ES2015 module loading, i.e. require().Using Web components is easy. Finding pre-built Web components requires searching some sites; it's telling that most of the components you'll find there were built with Polymer. Building Web components takes some work and a little JavaScript skill.Writing polyfills for browsers that lack support for, say, shadow DOM, takes some serious JavaScript chops. Fortunately, that work is done.Enter Polymer.Polymer provides polyfills for older browsers and uses them when necessaryPolymer makes it simple to create web components, declaratively.The Polymer Starter Kit helps you to get up to speedPolymer Elements supply a number of useful pre-built capabilities, organized into an Element catalogThe Polymer Designer lets you build a Polymer app by dragging and dropping Polymer elements…The Iron library includes elements for working with layout, user input, selection, and scaffolding apps.The Paper elements implement Google's Material Design. The Google Web Components library is exactly what it says, and includes wrappers for YouTube, Firebase, Google Docs, Hangouts, Google Maps, and Google Charts. The Gold library includes elements for credit card input fields for e-commerce.The Neon elements implement animations. The Platinum library implements push messages and offline caching.Molecules are elements that wrap other JavaScript libraries. The only Molecule currently implemented is for marked, a Markdown library.In general, you should use Polymer elements or other Polymer components as though they were extended HTML tags. Even though Polymer is a library, it creates components that act like they are part of the browser.Many sites can be created using Polymer as the only libraryThink twice before trying to wrap other large JavaScript libraries up as Polymer molecules. Will it really add value to put jQuery inside a Polymer wrapper?It might make sense to use some Polymer elements within a site built primarily with another JavaScript library. For example, you might use a few Polymer elements, such as a google-map with some google-map-marker components, in an app built with a MVC framework such as Ember or a UI framework such as React.