React, etc. Tech Stack

React, Flux, GraphQL, Hack, HHVM...? All of this and more!

Why is Google working on Angular 2 and Polymer?

At Google I/O in 2016 there were two browser focused technologies from the company. These are the Polymer project and Angular 2. It might be a bit hard to make sense of why the company is investing in these two overlapping and competing projects.

Angular 2 is a compelete web framework that allows developers to build client side applications that run both on the server with Node.js as well as in the browser. It's a major revision to the wildly successful Angular 1.x and while making major changes internally, it's still the same product.

Polymer on the other hand is a project that aims to let developers use the latest native Web Platform features today. It's essentially an interim solution to provide a layer that will enable technologies that only exist today as specifications. In essence Polymer does not create any new features.

Essentially where Angular 2 aims to create a custom framework, Polymer aims to bridge features until they are natively available in browsers. Traditionally JavaScript has been used to bridge functionalities like this, but the goal of Polymer is essentially to use less JavaScript and let native browser features take this over.

There are some overlapping aspects in Polymer and Angular 2 projects such as the use of the component model and the polyfilling of scoped CSS using various techniques (including native Shadow DOM).

We're building meta-platforms on JavaScript

In the latest years JavaScript has done great things to enable experiences that have not been available natively on the browsers. From jQuery to HTML5 polyfills to something like React.js we have today. In fact JavaScript has moved from the browser to the server.

One extreme example is running the same JavaScript application on the server and on the browser. This approach called isomorphic rendering or universal JavaScript is effective to improve the first load time for a user. But it'squite  certain that in the future this will seem like a horrible idea and developers will snicker at the idea.

With JavaScript frameworks and ecosystems like Angular 2 and React.js are essentially building a meta-platform ontop of the native web features. These include rendering techniques, templating languages, routing and data storage models. These are all that should actually be coming from the native layer.

JavaScript performance is already very high and WebAssembly can essentially native code plugins. But the difference with native browser features is still the fact that you don't need to download any additional code.

Imagine if you would still need to download one of many modules to support CSS in the browser. Don't you think it's better to have that base level in the browser by default?

You'll likely feel that way about a lot of features that you get in Angular 2 today.


So the reason why Google continues investing in both Angular and Polymer is that they can play both the long and the very long game. Angular 2 will surely be around for at least five years in it's current iteration, but web platform standards will live on far beyond that.

With Google strongly footed in the browser game, they can steer the web towards adopting native components with their Chrome project. Evergreen browsers that continuously update to provide new features have been the norm for years.

The advantage is that each update automatically gives features that each and every website can use without downloading a JavaScript polyfill or the latest and greatest complete web front end framework.

The browser is the ultimate framework that you're targeting.

Written by Jorgé on Monday June 20, 2016

Permalink -

« A look into Web Components - Riot.js, Polymer and React.js - Opera Platform: The JavaScript Mobile Platform from 2005 »