Angular 2 RC is here

On May 3th 2016, angular team finally released angular2 release candidate. As of writing this, latest version is rc.1. Not only did it change many things from betas, but also gave more incentive to consider developing your next web app with angular2.

Release candidate introduced lots of package refactorings and seems to be missing animations. Packages became much easier to understand, after changing everything from angular2/xxx syntax to @angular/common syntax and separating each module.

What benefits angular2 brings?

Angular2 is complete rewrite from angular1, but it addresses many of angular 1.x shortcomings. One very important feature especially for larger and enterprise oriented apps, is that it is written in typescript. Typescript allows you to use static typing in javascript, and with IDE or proper editor, this helps to catch errors before they happen. It is also extremely useful when updating versions.

Angular2 also promises more javascript friendly way of doing things, faster dom manipulation, better and more flexible animations (still missing from RC). It also removes many of the angular’s core directives, since they are unnecessary with new syntax.

Why use angular2 instead of angular 1.x?

The biggest difference between angular1 and angular2 is that angular1 uses lots of custom DSL and hacks such as depency injection, two way bindings, digest loops, interceptors, directives.

Angular2 however aims to be “just javascript” as much as possible. This will eventually allow better reusability, testability and encourages you to write good code.

Also a big benefit, if you are using typescript, is that it’s more difficult to write breaking code and easier to update.

Why angular2 instead of react?

React is another “just javascript” framework, and arguably even more so than angular2. Both use magic mostly just for templates, react having jsx and angular having plain html with custom syntax for bindings. However, what makes biggest difference between angular and react, is that react is basically just rendering engine, while angular2 is whole package including http request libraries, services, and other “difficult to implement yourself” features. This makes angular much bigger size than react, but with react you will eventually need to find other libraries to do ajax requests and other stuff.

This is the biggest drawback or benefit of both. Without a doubt, react gives you more flexibility since you can choose what to use where. Angular2 will be more complete package working out-of-box and save you for evaluating different things for many core features.

Still, since for example http request features are modularly included, it is easy to bring your own one instead of using the angular2 version.

Conclusion

Angular2 release candidate is out. If you still haven’t done so, it’s good time to get your hands dirty and play with it for day or two. Answer for question, “will this be the next framework everyone will be using?”, things will remain to be seen. Speed of development, core team skills, organization backing, modularity and direction all point to good direction.

As for everything, it’s best to play with it and see if it works for your application.

Leave a Reply