03 10
Angular 2
1
POST BY
Ankit Jain

Angular 2

What is Angular 2?


  • AngularJS  is by far the most popular JavaScript framework available today for creating web applications in HTML and JavaScript. It is a cross platform framework. Also it has been conceived as a mobile first approach. True object oriented web development is being brought to mainstream by Angular 2.

 

  • It is believed that it’s impact on the JavaScript community will rival that of the Spring framework on Java. Even though Angular 2 is written in TypeScript, you don’t have to use it to write Angular 2 applications. The framework also works great with ES5, ES6, and Dart.

 

  • In late 2014, according to google’s announcement, Angular 2 would be a complete rewrite of AngularJS, and they even created a new language “AtScript”(AtScript is a superset of ES6) that was meant to be used for writing Angular 2 applications. Than after Microsoft started supporting annotations to their TypeScript language, and so it emerged as the language for the development of the Angular 2 framework itself.

 

  • Angular has also integrated another Microsoft Product  – the RxJS library of JavaScript extensions, into the Angular 2 framework.

 

  • Angular2 is written in TypeScript. Angular 2 and TypeScript are bringing true object oriented web development to the mainstream, in a syntax that is strikingly close to Java 8.

 

 

Typescript


  • TypeScript is a super set of JavaScript but like Java it allows you to define new types. Declaring variables with types rather than the generic variable is good for new tooling support, which you will enhance productivity.

 

  • Typescript is Microsoft’s extension of JS that comes with powerful type checking abilities and object oriented features.

 

  • Typescript is typed language that compiles to JavaScript.

 

  • Even if your TypeScript application uses a third-party library written in JavaScript, you can install a type definition file (having the extension .d.ts), containing type declarations for this library.

 

  • Type declarations for hundreds of popular JavaScript libraries are freely available, and you can easily install them with Typings, a TypeScript Definition Manager.

 

  •   It provides advanced auto-completion, navigation, and refactoring. Having such tools is almost a requirement for large projects.

 

 

Features and Advantages


  • Angular 2 is faster and easier than Angular 1.

 

  • Angular2 allows for Ahead of time (AOT) compilation means AoT compilation without any changes of the application code. With AOT, the browser downloads a pre-compiled version of the application. The browser loads executable code so it can render the application immediately, without waiting to compile the app first.

 

  • It supports latest the version of browsers and also supports old browsers including IE9+ and Android 4.1+.

 

  • Angular 2 is not an MVC framework, but a component-based framework. In Angular 2 an application is a tree of loosely coupled components.

 

  • Angular 2 is mainly focused on mobile apps. It uses server side rendering for faster mobile views.

 

  • If an application is a heavy load, then Angular 2 keeps it fully UI responsive.

 

  • It works well with ECMAScript and other languages that compile to JavaScript.

 

  • Being worked on component based approach, It uses dependency injection for decreasing code length.

 

  • Angular turns your templates into code that’s highly optimized for today’s JavaScript virtual machines, giving you all the benefits of hand-written code with the productivity of a framework.

 

Disadvantages


Despite being new framework and having less online community support, Angular 2 has no such minus points.

One thought on “Angular 2

Leave a Reply

Your email address will not be published. Required fields are marked *