Lately I have spent quite a bit of time working in both Angular 2.0 and Aurelia, so I figured I'd share some of my experiences here.

Currently it seems that Angular 2.0, Aurelia and React (with supporting patterns) get most of the attention from the JavaScript community. I really like React, don't get me wrong, but for the purposes of this article I will focus on Angular 2.0 and Aurelia.

Angular 2.0 and Aurelia are both forward thinking frameworks where adopting future versions of JavaScript is both supported and encouraged. However, this means we have to add quite a bit of ceremony to our development environment to convert our code to regular JavaScript. Luckily the often complex setup to support this is already taken care of by various seed projects – maintained by either the creators themselves or people from the communities. I personally really like working in ES6 or TypeScript, so I find the extra complexity to be totally worth it. It's also pretty streamlined at this point, so it feels almost seamless when you hook up automatic transpiling and file watches.

My impression is that neither Angular 2.0 nor Aurelia is going into official release mode anytime soon. Both frameworks are however mature enough for exploring and POC work though. I firmly believe you have to build something of at least moderate complexity in order to evaluate a framework. The things I've built are already publicly available, so you can take a look and judge for yourself. My Angular 2.0 work is well documented on GitHub and there is even a live demo of my code here. As far as Aurelia goes... I have just finished building out a comment component for my blog using Aurelia. After you're done reading this article you can scroll down and test it out by leaving me a comment. I have also done some work with a recursive treeview component. In fact my comment component is in part inspired by my initial treeview work. You can see some of this code here.

My take away after working in both Aurelia and Angular 2.0 is that the two frameworks are largely born out of the same idea. I find it hard to make a compelling argument for why you should pick one over the other. Some might find Aurelia's binding syntax to be more compact and easy to read, but that is pretty subjective and not reason enough to earn a recommendation.

Aurelia might benefit from some sort of “boutique” status since it's the new kid on the block. Angular on the other hand, might be viewed as the “establishment”, and have to live with default criticism from “hispster” developers who may or may not know what they are talking about. In some ways I find this default criticism to be similar to how people, without the necessary knowledge, attack Microsoft and the .Net framework. Basically, everyone wants to gang up on the big guy.

That said, my points is not to avoid criticizing frameworks. I just think it makes sense to give the framework enough of a chance before you voice your discontent. I have personally written a few critical articles about certain features in Angular, but I still try to present a fair and objective opinion. You can read some of my opinions here: Is Angular 2.0 worth it and Experiences with Angular

It's also good to offer alternative solutions with the criticism.

In the end I consider both Aurelia and Angular 2.0 to be safe harbors for complex JavaScript development. It's much more important to consider how you use a framework than which one you use. My view is that you should instead focus more on writing great framework agnostic code, and properly separate the concerns of your code. This is much more important than worrying about trivial syntax differences like bindings with square brackets etc.

Only use a framework where direct and measurable value is added. In all other cases write your code using plain JavaScript. This means you should keep your Angular and Aurelia components as thin as possible and move your heavy logic to plain JavaScript classes or objects. Following this advice will reduce your dependency on a particular framework and greatly simplify things if you later decide to move to a different framework.

Proper separation of code concerns is also great if you are doing unit testing. It seems both Angular and Aurelia are putting a lot of focus on automated testing, which is great!

Based on all this, I am not able to declare a winner, but I will continue to work with both frameworks and learn more.

I've had a lot of fun learning about Angular 2.0 and Aurelia, but I want to give a big shoutout to the teams behind both frameworks. Members of both teams have been incredibly responsive to questions on twitter and other discussion forums.