At Google I/O 2014, Polymer was introduced in deep by Eric Bidelman. Polymer is a very interesting move by Google</meta> </meta> promoting in some way a W3C work: Web components. I try to sum up here all I learned from the Polymer tutorial.

What is the relationship between Web components (as a W3C recommendation) and the Polymer project (as lead by Google) ? In a few words, Polymer bridges the gap between the work pending in the frame of the recommendation working group and the features implemented by browsers. This is done via a simple Javascript, platform.js. The Polymer project also provides a set of initial web components to simplify the development of web-component-based applications.

Web components are custom HTML tags. How is the behavior and rendering of such elements defined ?

The components definition relies by convenience on another W3C recommendation, HTML imports. Introduced as a new link type (import) the principle is simple. This allows to include an external resource into an HTML resource. The practice for Web components is to use an included resource defining the behavior of each custom element in order to allow reuse of that definition. Web components could of course be defined without imports but this would be of limited interest. A singularity about HTML imports is detailed in a blog post by defining multiple imports using a same library (e.g. jQuery) can be challenging to load for browsers. Strategies have to be found to reduce loadings.

One important point is in the naming of custom element. As explained in that article by each name should contain a dash in order to avoid conflicts with standard HTML elements (which are still important because needed in the definition of custom elements).

In the introduction, Bidelman</meta> states that every framework is compatible with DOM . Indeed, as a result of the document structure simplification induced by Web components, this is a huge change in the way information is provided on the Web. This won't change so much for end users in the first place.

On a software engineering point of view, the step could be a real revolution: information provided by the Web server could have a same structure for a Web browser and for any software client. HTML would really look like an XML document, except for the head imports.

What will make the real success of Web components is the behavior of software giants. And with Polymer, Google seems to be seriously involved. Could it be a serious move to use Web standards in replacement of any Android API challenged by the Oracle lawsuit ? Perhaps the end of the mobile native / Web apps dichotomy ? Is it a dream ? Still a long way to go for involved engineers, but so many promises...

Edit (2014-12-26): the platform.js script has become webcomponents.js.