One year ago, I started a large Single Page Application (SPA) project. I spent a few weeks Googling and biting my nails, trying to choose between the various options for SPA development. I considered four leading players:
A year ago this felt like anyone’s race. I ended up selecting Knockout with Durandal for the project since the combination offered clear support for older versions of IE. I currently develop apps for automotive dealerships and they’re notoriously slow to upgrade browsers. I enjoyed the development process with Durandal and Knockout and don’t regret my decision. There’s certainly no way I could’ve pulled off such a rich, interactive UI with solely jQuery.
Yet in the last year I’ve watched the tide shift heavily toward AngularJS.
Angular’s momentum has become clear at various conferences across the country. Perhaps the most obvious recent example was at FluentConf in San Francisco:
Fluent Conf front end library session counts:
For what it's worth.
— Cory House (@housecor) March 12, 2014
That’s a pretty striking contrast. Now given, one could argue high conference session counts are merely a sign that Angular is a lot more complicated! But there’s no denying Angular has massive momentum. Enough to settle into a long-term #1 spot on Pluralsight’s top 100 courses. Angular even recently spawned it’s own its own conference: ng-conf.
Today marked another huge landmark for the Angular project: Rob Eisenberg, Durandal’s creator and director, announced that Durandal is being merged with Angular. He quietly joined the Angular team a few months ago. And, going forward, there will be only maintenance releases for Durandal 2. So, Durandal’s upcoming convergence with Angular makes this basically a three horse race.
Angular has become the de facto standard for SPA development.
Why Has Angular Become so Popular?
I see three simple reasons:
1. Google Support – Sure, Google has a long history of killing promising projects. Remember Wave and Reader? But they’re a corporate powerhouse which lends a great deal of credibility to the project. Tell your boss you want to use a free framework from Google. That’s an easy sell.
2. Integrated and Opinionated – I enjoy working with Durandal, but ultimately you must rely upon multiple technologies to create a complex SPA using Durandal including Knockout for binding, RequireJS for dependency management, and a promise library (I went with Q.js). Backbone takes a similar approach – it’s not very opinionated so developers are free to make many architectural decisions on their own or to pull in libraries like Marionnette.
In contrast, Angular is highly opinionated and offers a single integrated solution. It’s analogous to the Unix and Windows model. In Unix you perform complex tasks by piping commands. The composition of many small targeted applications provides great power and flexibility. But the masses gravitate toward opinionated and integrated solutions like Windows. Why? A simple psychological principal called the tyranny of choice. In short, abundant choice often leads to misery. It’s easier to accept a few things you dislike in Angular than to be overwhelmed with decisions in other less opinionated libraries and frameworks.
The Future is Evergreen
I still have concerns about Angular. One must ask why Google is making this play at all. I believe it’s the same reason they built Chrome: Angular is Google’s new lever to push the web forward. That said, I worry that Google will push too aggressively on browser standards, thereby making the framework a non-starter for unlucky developers who must support older browsers. It’s clear Google prefers to err on the side of forcing the web forward. I admire this mission, but hate to see the developers supporting legacy browsers left with few viable alternatives.
Framework developers are starting to embrace a new ideal: Soon only Evergreen browsers will be supported by modern frameworks like Angular. This term, coined by Paul Irish has a simple premise: Evergreen browsers auto update. Most of today’s current browsers are Evergreen including Chrome, Firefox, Safari, and IE10+. This trend is great news for web developers who will soon be able to enjoy the power of ECMAScript 6 and the shadow DOM with Web Components. But it means customers should be warned now. Select an auto-updating browser ASAP – The web is surging ahead and Google will use AngularJS to lead the charge.
Chime in on Hacker News, Reddit or in the comments below.
Nice post. We were in a similar situation about a year ago and looked at mostly the same frameworks you did. We chose Angular and have not looked back since. I have enjoyd using Angular although there have been some pain points also.
Cory, nice post and I agree with your assessment. The one thing I don’t like, and it’s really just terminology, is pigeon-holing the use of frameworks such as AngularJS into SPA’s. I find AngularJS to be exceptionally powerful and useful on all applications for client-side development, even legacy apps with many different pages. In fact I design many sites this way now, creating an MVC framework for multiple site pages that handles security, and then plugging in AngularJS to make each page it’s own mini-SPA. To me the benefits of an AngularJS comes with the mindset of managing a scope rather than manipulating the DOM directly. It’s just a better way to do things and leads to clean, testable code and a much more rich and dynamic UI if done properly.
Two way binding is very nice. I really like the angularjs declarative markup and use pretty much all of the built in directives, as well as filters for how I present data. $http and $resource work nicely with REST API’s, which I use for all CRUD operations. I’m coming from the perspective of not using knockout or other frameworks and only having done some heavy jquery based apps. AngularJS is a breathe of fresh air.
Is it wrong to be wary of Angular gaining “de facto” status so quickly? I think there needs to be at least three strong competitors in this space; is Google the the only reason that Ember gets as little attention as it does? I know BackboneJS is out there too… I’m not willing to commit to All Things Google for the future of development.
Thanks for an interesting article and for your blog in general. I also just watched your video “Becoming an Outlier: Reprogramming the Developer Mind” on PluralSight. Great stuff.
Thanks in advance,
Thanks for the comment and the link Anders. I look forward to giving the article a read!
Cory, great article and exactly what I have been thinking. I too went down the evaluation route and chose durandal and knockout…have spent a couple of months rebuilding a silverlight app into that framework, but had a niggling doubt about durandal’s traction and it’s unfortunate failed kickstarter bid. Hearing that Rob Eisenberg was joining the Angular team and the many more job adverts asking for Angular and like you say the plethora of courses/SO, I think Angular 2.0 will be massive. Google supports Angular but it’s open source and isn’t a google product, sure it will have influence of course. My only decision now is whether to jump ship to angular now, or wait for 2.0 (no release dates as yet)….They say 2.0 will have quite a few breaking changes so I’m still on the fence! Also doing your outlier course on Pluralsight right now and enjoying it, thanks.
That’s interesting we’re in the same spot. I’ve already moved new development to Angular but am holding off on transitioning a major project in Durandal to Angular until 2.0 ships.
Great to hear you’re enjoying the outlier course! Thanks for the feedback.
I am also in the same boat. I have a product developed using Durandal & Knockout. We spent over 6 months into this. With Durandal merging with Angular, I was expecting Microsoft to make some announcement on their plan to replace Durandal, but haven’t seen (may be I missed it). Knockout still wants to be a library and not a framework. So this leave me to move to Angular for my SPA needs. Now I am waiting for Angular 2.0 & Durandal migration guide to Angular.
As Angular 2.0 beta dates are not out there, I am not sure whether to migrate (rewrite) now or wait. But definitely, I am moving out of Knockout. I liked Knockout very much.
Google is redefining web development with Object.observe – Backbone.js and Ember are getting obsolete!
Without Object.observe we currently rely on:
wrapper objects (Backbone.Model, Ember.Object)
dirty checking (Angular)
getters and setters
On the other hand dirty checking can be expensive to perform.
Getters and setters will only notify us of changes on the property level and not of the deletion and addition of properties on the parent object.
Once Object.observe lands on all browsers, I think most people will be more than happy to go back to using plain old JS objects and AngularJS.
Wow, excellent insight. I totally agree with your forward looking assessment. Thanks for the comment!
I have one question. If angular is better than others then why I have not seen any great application (If I left google products.) like linkedin, Groupon, Foursquare, wordpress……….. developed by backbone. Since angular is older than backbone so it should have more real life examples.
This blog post is misleading.
Consider that search terms alone don’t indicate popularity.
Consider that Angular is mind bogglingly complicated.
What if people search for angular because they are so damn confused about it?
Thanks for the comment. I totally agree that search terms aren’t the only way to gauge popularity. Downloads, conference sessions, and public usage stats are of course relevant as well. If you have statistics that contradict please post them here.
Do you still feel its the De Facto Standard now that it is totally changed?
It hasn’t “totally changed” yet. That said, I agree that 2.0 looks like a radical shift. By the time it launches, it’s really hard to guess where the market will be. De Facto standards certainly come and go and at the moment it’s hard to say if 2.0’s evergreen browser requirements will be too far too soon.
Comments are closed.