When plans for AngularJS 2.0 were “unveiled” last fall at ng-europe we were excited. I mean, ES6, modules, Web Components (Shadow DOM, custom elements, HTML imports), Dependency Injection, HTML-based templating, directives and testability baked-in? What’s not to love? We build a lot of Angular apps at Appirio and Topcoder and love it. Even our CEO is a huge fan…
Angular 2.0 is drastically different and essentially a complete rewrite of Angular. The new version will eliminate the following 1.x concepts:
- Directive Definition Object
- DOM wrappers
If you’ve been working with Angular for awhile you will be presented with a drastically different looking framework that will require you to learn a new architecture. It has its problems which Google is trying to solve with a radically different approach. For example, here are two snippets of the same code:
When it was revealed that 2.0 would break existing 1.x code, this caused a fair amount of angst within the community. There was gnashing of teeth, pulling of hair and speculation upon the death of Angular. One camp argued that developers and enterprises could not invest in a framework which was constantly in flux while the other asserted that change is good and is the only constant in software development. Browsers change, technologies change and we need to prepare for it. Unfortunately, at this time, there is no migration path from 1.x to 2.0.
Angular 2.0 is not slated for release until late 2015 or early 2016. So the Million Dollar Question is, should you invest time and resources in Angular 1.x or wait till 2.0? This dilemma differs depending upon your situation.
Let’s admit it… we all know that Angular has a steep learning curve. Sure, you can get a fairly simple app up and running in no time, but afterwards things become more complex and you really need to commit to the framework. Ben Nadal’s experience with Angular is probably fairly typical of most developers:
React and Flux have gained traction since last fall’s Angular 2.0 announcement for obvious reasons. Here are some great React resources to get you started and I really like this overview of Angular vs. React.
Stayed tuned to topcoder.com as we’ll be doing a series building apps with React and Flux/Reflux.
Ember is another popular framework that is used by Ghost, Discourse, Groupon and other large companies with a good track record.
Lately I’ve also been watching Aurelia which is a new framework released by Rob Eisenberg, formerly of Angular 2.0 team. It’s waaayy too early to comment but there’s a good overview of the framework and a nifty intro video.
Your existing Angular 1.x applications should be fine for the forseeable future. Angular’s Brad Green stated that 1.x will continue to receive security updates and bugfixes 18–24 months after the release of version 2.0. However, at some point you’ll have to decide if you want to rewrite your app in 2.0 or let it live on in 1.x. This is a hard choice you’ll have to make at some point. Good luck.
If you are an existing Angular shop and are kicking off a new project you have a touch choice to make. Should you stick with 1.x and possibly rewrite it down the road or jump to another technology/library/framework? The problem I see is how do you sell Angular 1.x to your customers? “So… um… I know the contract is for $1M to build your shiny new app but we’ll need to add in an extra $250-$500K in the next couple of years to rebuild it as the current version of the framework will no longer be supported.”
But if you don’t mind rewriting the app for 2.0 or don’t intend to update it, then Angular 1.x may be a great choice given the skills of your existing resources.