Main Goals of Angular2

Kailash Chandra Behera | Sunday, April 23, 2017

Introduction

We had discussed the overview of Angular2 in my previous blog, In this blog we will discuss the main goals for developing of Angular2.

Getting Started

The main goal of Angular2 is to create a web framework that is super faster , browser independent and mobile oriented. Some important goals of AngularJS2 is discussed below.

  1. Performance
  2. Rendering Performance
  3. Modern Browsers
  4. Modular
  5. Mobile Support

Performance

When AngularJS was first created, almost five years ago, it was not originally intended for developers. It was a tool targeted more at designers who needed to quickly build persistent HTML forms. Over time it has changed to accommodate a variety of scenarios and developers have picked it up and used it to build more and more complex applications.

The Angular 1.x team has worked hard over the years to make incremental changes to the design, allowing it to continue to be relevant as the needs of modern web applications have changed. However, there are hard limits on the improvements that can be made, due to assumptions that were made as part of the original design. A number of these limits relate to performance problems resulting from the current binding and templating infrastructure. In order to fix those problems, new strategies are needed.

Rendering Performance

Rendering performance is improved in Angular 2. Most importantly, the fact that the rendering module is located in separate module allows you to run the computation-heavy code in a working thread.

Keeping the rendering engine in a separate module allows third-party vendors to replace the default DOM renderer with one that targets non-browser-based platforms. For example, this allows reusing the application code across devices, with the UI renderers for mobile devices that use native components. The code of the TypeScript class remains the same, but the content of the @Component annotation will contain XML or another language for rendering native components.

A custom Angular 2 renderer is already implemented in the NativeScript framework, which serves as a bridge between JavaScript and native iOS and Android UI components. With NativeScript you can reuse the component’s code by just replacing the HTML in the template with XML. Another custom UI renderer allows using Angular 2 with React Native, which is an alternative way of creating native (not hybrid) UI’s for iOS and Android.

Modern Browsers

Angular2 is built keeping target in mind for modern browsers and using ECMAScript 6(ES6). The ES6 and “evergreen” modern browsers are automatically updating to the latest version. Building for these browsers means that various hacks and workarounds that make Angular harder to develop can be eliminated allowing developers to focus on the code related to their business domain.

Modular

When AngularJS 1.0 is released, the features were in a take-it-or-leave-it single package. You incur the download price for every piece whether you use it or not. Though the whole of AngularJS is very small by desktop app standards, this can make a big difference on mobile devices.

One interesting thing we noticed was that when split out the $route into a separate library, several innovative replacements popped up.

For performance and to enable innovation, our goal is that almost every piece of AngularJS should be optional, replaceable, and even used in other non-AngularJS frameworks. You’ll be able to pick and choose the parts you like and write or select others that you like better.

Mobile Support

The new Angular version will be focused on the development of mobile apps. The rationale is that it’s easier to handle the desktop aspect of things, once the challenges related to mobile (performance, load time, etc.) have been addressed.

Summary

Angular2 is developed keeping in mind that is better performance, mobile oriented and targeted to modern browsers. Please give a like if this article helped to you, which will encourage to write more and more article.

Thanks