Angular 2: what and why?

Over the past few years, the technology trends on framework development have been changed from full fatty jack of all trades to minimalistic and micro-services approach. Angular 2 is not the exception to this. Being written in Typescript, the new framework helps you get closer to native Html and JavaScript, and allows you to add just the needed feature keeping the application lightweight and responsive.

Problem with Angular 1.x

Angular 1.x has also proven its worth but the fundamentals of nicely looking features got aged with time as the browsers updated themselves according to the newer language specifications. Some of the issues with Angular 1 that came over the surface are: confusing names of services and filters, slow digest cycles, thick wrappers over native scripts and specifications, low performing 2-way model binding, no support for server side rendering, etc. All these issues have been addressed in angular 2 in a nice way by using latest features and specifications like Shadow DOM, observables, ES6 specifications, etc.

Angular 2

Angular 2 is built for speed backed by features like server side pre rendering, offline compilation, better change detection. It has also been kept lightweight by removing the bulky digest cycle, un-necessary directives, confusing set of services and overloaded scopes. Instead, it has been implemented with core native features like direct property binding and event handling of DOM element. Un-necessary wrappers over services has also been removed in Angular 2. Implementation of observables has also been contributed to angular 2 speed by faster change detection and event handling. Furthermore, decision has also been taken to remove the legacy stuffs like controllers, directives definition objects, angular.module, and jqLIte.

Tooling

Angular 2 has also provided the developer the choice to choose the development environment (IDE) and language of their choice, supporting multiple languages that can be transpiled to native JavaScript. The templating and syntax has been re-designed to support tooling and new language specification in a better way.

Features

Angular 2 has been gifted with awesome features like better form handling, powerful routing, support for animation, internationalization, server sider rendering, fast rendering over mobile phones, etc. Moreover, it is also providing upgraded features like Web Components, better change detection, rich Http support, enhanced pipes (filters of Angular 1.x), etc.

Conclusion

The best way to learn any technology is to try it out yourself. While working with Angular 2 over the past few months, I have observed that the change is awesome and each change has been well thought and beautifully designed. Brad Green, engineering director at Google, revealed that Google has already started using Angular 2 for many of their projects like Google Fiber, etc. Enough said, you might want to try it out yourself and feel that how your design and performance magically improves in the real world application when you use Angular 2. Welcome to the future of web.