Around the time I first published this I started assessing this myself. It is never an easy decision because there is so much to consider.
This article was originally written as a summary of Rob’s excellent talk. I still believe it is well worth spending a full hour to watch the whole talk yourself, however as time passes on there will gradually be more things moving on from the point when he gave the talk in June 2016.
I am gradually updating this article and extending this article to contain more information about other libraries and frameworks that I consider to be worthy alternatives to the shortlist that Rob selected. I also welcome you to submit your own suggestions and I will try to accommodate them if I can.
The NDC Oslo Talk
Rob introduces himself and says due to time constraints he’ll be presenting a “hello world” like example of each framework. Each app is a web component which simply shows First Name, Last Name and a computed Full Name.
First he asks you to bare in mind that:
- He’s obviously biased, especially against Angular 2 (also bare in mind that this summary could potentially contain some other bias)
- Don’t be swayed or swept up by hype. Be professional and choose what meets the needs of your business.
As bias is a theme here, it is only fair to discuss any possible biases I might have.
My brother is a React JS developer. I am also a guest blogger on Outlier Developer, which is run by the same guy behind React JS Consultancy. I do not currently use React JS or any of the other featured frameworks professionally.
I currently use only jQuery, Bootstrap, Webpack and a few small libraries, which in my opinion is all you need for small projects. However I am currently working on a big project, so I need to get agreement on a suitable framework quite soon.
I am not paid to write for Outlier Developer or have any financial interests in any particular framework.
Any personal commentary on the talk is (italicized and in round brackets).
Rob believes our tendency to jump to technology choices too quickly is a systemic problem in our industry.
The frameworks under the spotlight are:
Rob says he’s trying to be as unbiased as he can be, and will cover the frameworks in alphabetical order.
He points out that they aren’t all frameworks in the same category, or even all frameworks.
Angular 1.x is an all-in-one framework. Rob says it is
pretty much deprecated, there’s literally a fixed number of months left on the lifetime of that framework
it’s probably fair to say that you shouldn’t start a new project in Angular JS right now, and you should be thinking about how you might migrate any existing code bases.
(I’ve never been a big Angular 1.x fan, but I feel it is only fair to point out that Angular 1.x is currently actively supported, and every framework has a number of months left in its lifetime, whatever that means.
If you are interested in using the Ionic Framework then you need to adopt Angular 1.x as well. To dismiss Angular 1.x is also to dismiss the Ionic Framework. Ionic v2 uses Angular 2. Rob doesn’t mention mobile at all in the talk.)
Rob describes Angular 2, Aurelia, Ember and Polymer as also All-in-one frameworks, but modern ones.
React is not a framework, per se. It’s a view rendering engine or a component model.
Rob says that although the demo is extremely simple, it shows the different approaches that each framework takes.
(For brevity, I’ll be referring to lines of code. Some lines of code can be much longer or shorter or more or less readable than others so to get the full picture you’ll need to watch the video for yourself. Rob has a style of leaving a blank line at the end of each file. I will discount those. The line count stats do not attempt to keep up to date with any newer versions released, only the versions at the time of the recording.)
index.html is 13 lines of code
We see the ng-controller and ng-model directives.
app.js is 8 lines of code. Rob describes this as a throwback to the previous generation of frameworks: Angular specific modules rather than ES2015 modules. He describes the Angular 1 two way data-binding model.
(As of Angular 1.5 we have Angular Components as a superior alternative to using controllers and directives. See Scott Allen’s Building Components with Angular 1.5 for more.)
Rob says Angular 2 really focuses on TypeScript, and
index.html is 32 lines of code
(I could not believe that there isn’t a simpler way to write this in Angular 2. Rob has found some Angular 2 documentation that pulls in a whole load of modules. For the purposes of developing a hello world type app, Rob is pulling in the following modules:
- shims for IE.js
- angular2-polyfills.js (no longer part of the Angular2 RC)
Update: I have found this code is very similar to the Bill Stavroulakis “Hello Component” demo which you can find on Plnkr. Bill describes it as “a very simple Angular 2 setup”. I was very surprised to find that this simple demo won’t work at all without Rx.js. You can create “Angular 2 components” easily, but using the Web Components standard with Angular 2 appears to be a lot harder.
Bill is a fan of Polymer JS and has created several Hello Component demos available at HelloComponent.com
Please let me know if there’s an easier way to achieve this.)
main.ts — 4 lines
app.component.ts — 20 lines
Rob explains the Angular2 decorator. He uses an inline template rather than using a template URL. He also explains two-way data-binding in Angular2, and points out that Google have deviated from the HTML specification by using mixed casing.
index.html — 10 lines. This imports System JS and uses it to import the Aurelia bootstrapper.
app.js — 8 lines
app.html — a template with 5 lines of code. Rob explains the two way data binding mechanism used here.
index.html — 16 lines. Imports jquery, handlebars, ember and app.js
app.js — 23 lines. Rob says Ember is a very strict MVC paradigm and requires a router even for Hello World.
index.html — 10 lines.
my-app.html — 22 lines including template, a script block and 4 blank lines.
Rob says the web components centric philosophy concerns him because
…it doesn’t make sense to do everything in HTML but there it is, that’s my opinion
Rob likens Polymer to the long forgotten Microsoft Acropolis project from 2008 which tried to do everything in XAML.
(Again, some totally unnecessary imports doing nothing except adding ridiculous complexity to a hello world app.)
app.js — 39 lines.
At 28 mins in we’re wrapped up with the hello world examples and go into the slides.
Size (minified, not gzipped)
- React+Redux — 156k or 167k with plugins
- Angular 1 – 158k minimum, 240k with router, HTTP and animation system
- Polymer — 222k minimum, 302k (spec compliant)
- Aurelia — 252k minimum, 302k with standard plugin
- Ember — 435k including router
- Angular 2 — 698k minimum, 919k with RxJS, 1023k with RxJS and router and HTTP client
Rob mentions that the Angular team are using tree shaking to reduce the file size.
This test uses DB Monster Repaint. Numbers are frames per second.
Aurelia — 90–105/130–150 (with optimisation plugins)
Angular 2 — 80–90/110–130 (with optimisation plugins)
Polymer — 50–60
React — 45–50
Ember — ???
Rob says that to be honest all of these frameworks are very fast because 50 frames per second is faster than what we can usually see.
(This tool was popularised by Ryan Florence (from Facebook) in his talk at Conf 2015 showing React was faster than Angular 1 and much faster than Ember at the time it was recorded.
You can see Matthieu Ancelin’s dbmon repaint rate challenge which tests a much wider choice of frameworks, however Aurelia is a “TODO” implementation at the moment. Rob says the Aurelia team are working on an implementation for submission and it will be available soon.
Latest Performance Developments (updated 4th Jan 2017)
There is still nothing available on dbmon to support Aurelia’s performance king claim.
The dbmon test has recently been updated with adjustable mutations percentage. I have set these to 100% for these tests. The top performers may be different at lower percentages.
I ran the optimized tests for Rob’s selected frameworks on my laptop on Chrome 55 for Windows and got these results:
Only naive implementations for Polymer 1.4 and Ember are currently available
Some other selected framework/technology results:
Vanilla JS is only around 28 fps
I also ran these tests on Edge and found Angular 1 outperformed Polymer on there. Ember performance is massively improved with the latest version and there is an optimized version here which is insanely quick!
Many other fast frameworks are tested here as well. Angular Light and Motorcycle score well, although not as fast as Inferno. At the end of the talk Rob recommends Riot as an alternative to React. I found Riot scored about 28 fps at 100% mutations. Also see more benchmarks from auth0
It is interesting that Rob downplays the significance of leading performance here because — giving the Aurelia team the benefit of the doubt — in the past other frameworks have easily generated a lot of interest just by being very vocal about their superior benchmark results. It is a crown which is never held for very long however.)
Aurelia: HTML, ES 2016, Web Components (including the Shadow DOM)
Polymer: HTML, ES 2015, Web Components
Ember: HTML, ES 2015
Angular 2: ES 2016 (TypeScript). Non Compliant: NG2 Markup and Dart
Angular 1: HTML, ES5. Non Compliant: Modules, Dependency Injection
React: ES 2015. Non Compliant: JSX
TypeScript is not a standard, and ES 2016 is a standard.)
Excellent: Aurelia and Ember
Moderate: Angular 1
Poor: Angular 2 and Polymer
Rob says Separated Presentation is less of a technical issue than a people issue.
Obtrusive: Angular 1, Angular 2, React
Rob provides some commentary for the purpose of justifying these claims.
(These are opinions not measurements)
Very Interoperable: Aurelia, Ember, Polymer
Average: Angular 2
High Friction: Angular 1, React
That concludes the technical comparison. At 43 minutes in Rob moves on to discussing the project and the team.
Project and Team
The table is very useful but has too much information to recreate here, so see the video at (43:30) for that.
Rob says although Angular 2 is claimed to be at Release Candidate Status, there are still breaking changes being made and
it’s not really a release candidate if you look at what’s really happening there.
Rob says there is a patent clause in the React license, which prohibits you from using it to compete with Facebook, or if you have an intellectual property dispute with another company using React.
He says this is why Google and Microsoft employees don’t use React.
Latest Version Information (updated 4th Jan 2017)
You can find React’s Patent clause here.
It’s now been 6 months since Aurelia reached v1.0 and there have been a few minor updates since then. Several great new Aurelia features are coming this year:
- New Chrome Debugger
- Webpack v2 support
- CLI enhancements
- Hot module reload
- VS Code plugin enhancements
- HTML Template Validation
For more details see the Aurelia blog.
Angular 2 reached RTM on 15th September and is up to v2.4.
Since v2 was released, the Google team has mostly met its own proposed schedule on releasing new minor versions
Angular 2.1 — Route Preloading
Angular 2.2 — AOT + ngUpgrade
Angular 2.3 — Language Service
Angular 2.4 — “Stability Interjection”
The Google Team have agreed to release new patch versions every week, a new minor version every month and a major version every 6 months.
So this is the plan for new major versions
Angular 4 — expected March 2017
Angular 5 — Sept/Oct 2017
Angular 6 — March 2018
Angular 7 — Sept/Oct 2018
There will be no Angular 3 but don’t worry about that. Angular 4 is already in Beta, see the changelog for the latest details https://github.com/angular/angular/blob/master/CHANGELOG.md
By new major version we mean new features and potential breaking changes since the last release. So we should not necessarily get overexcited about new major versions, or conflate higher with much higher quality.
For full details see Igor Minar’s blog post and opening keynote. Igor makes many interesting points in the keynote.
Google always use the latest version of AngularJS for their own applications. He also mentions TypeScript and the desire to support v2.1.
Some of the new Angular features we can expect by March are:
- Better Compiler Errors
It will also be backwards compatible with Angular 2 (but not Angular 1) so Angular 2 looks to be a better bet for new applications that you will need to maintain and improve over a long lifetime.
For applications that you expect to be one-off releases and need to release very soon, it might still make more sense to use Angular 1.x if your experience is with Angular 1.x and you want to take advantage of the more mature ecosystem that surrounds it, however the case for Angular v2+ over v1 will only grow stronger as time goes on.
The Google team recommends we use the latest version.
Asked about using Angular with a module loader Igor said
“This will probably change in 6 months…it seems that webpack is a better option from the developer ergonomics.”
he goes on to explain where Rollup or SystemJS may be better.
Google’s Green Tea app was rewritten big-bang for Angular 2.
Angular 2 on Pluralsight
The Pluralsight Angular 2 Fundamentals course isn’t yet out but there is a recent course by John Papa and Dan Wahlin.
I’ve also written reviews of first look and getting started. Deborah Kurata’s getting started course has been updated for the RTM version of Angular 2 and contains more than an hour of additional content than her original course: I am currently updating my review to include that.
There are a few new Angular 2 courses released by Pluralsight: Mark Zamoya’s Angular 2 Forms, John Papa and Ward Bell’s Play by Play: Angular 2 Quick Start, and Deploying an Angular 2 to Azure with Git by John Papa and Shayne Bower.
To learn about the upgrade path to Polymer 2.0 watch Polymer 2.0 in 2.0 seconds. To understand how it works see Polymer 2.0: Under the Hood. Rob Dodson describes Polymer as an opinionated usage of Web Components.
Another good watch is What’s New in Polymer Tools.
Another detailed table at 48 mins in. Rob claims that the Angular teams don’t use their own frameworks, and that only the Aurelia and Ember teams are available to provide training.
(If you need React JS Training it is provided by Ryan Florence and Michael Jackson from Facebook)
Community and Communication
Another table of information and commentary on how strong each community is and how well the teams communicate with those communities.
All frameworks score well on this.
Another table of information at 54 mins giving details on:
- Corporate Buy-in
- Commercial Support
- Customer Relations
- Official Relations
- Official Partners
- Brand Recognition
Rob says Angular 1, Angular 2 and Polymer are not Google products. They are open source side projects from teams inside of Google.
(For detail’s on Google’s CRM system greentea, and it’s relationship with Angular, see How Google Uses Angular 2 with Dart. Google has also rewritten Google Adwords using Angular 2, and this is millions of lines of code.)
Yes: Aurelia and Ember
Maybe: Polymer (or web components JS) and React (or Riot to avoid the patent problem and smaller size)
Rob says React is much better for read only apps and a lot more work for input intensive apps.
No: Angular 1 and Angular 2
Rob finishes the talk by re-iterating that he is biased, but hoping that the talk included useful information.
(I definitely feel that this talk has been useful to me and there were a number of good points that I will bare in mind during my assessment. When doing your own assessment don’t forget there’s also Meteor, Cycle, Marionette, Sails, Vue and many others worth considering.
Thanks for voting in these Twitter polls:
Agree with Rob’s opinions? Disagree? Please leave your comments to discuss.
Fun Fun Function: Too many tools and frameworks! (how to deal with it)
Tessa Thronton: How to learn web frameworks
Review of Brian Noyes’ Aurelia Fundamentals course