Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.

15 St Margarets, NY 10033
(+381) 11 123 4567



Google rewrites its Angular JavaScript framework

Angular 2, a re-architected, rewritten version of the popular JavaScript framework also known as AngularJS, goes to a beta release stage today, with general availability planned for early 2016.

The upgrade features enhancements for speed in rendering and updating pages, near-initial rendering, and support for building cross-platform native mobile apps for Google Android and Apple iOS. “It’s eight times faster than Angular 1,” said Brad Green, Google director of engineering in charge of Angular.

“We built the change detection algorithm so that all of its commands are generated so that they can be inlined by the JavaScript virtual machine,” leading to faster change detection, said Green. Version 2 also takes advantage of processor registers instead of relying on a virtual table lookup; the upgrade ensures the virtual machine always knows what type, such as int, string, or float, is coming in.

For mobile application developers, Angular has worked with Telerik on NativeScript for building apps via Angular and JavaScript but using native components. “In Angular 2, we change the architecture dramatically, where we can decouple the rendering from the DOM so that we can actually have other renderers,” Green said. Developers can adopt a single framework for developing across the desktop, mobile Web, and mobile installed app realms. With version 1, mobile development was done by using the Ionic framework on top of Angular, using Web views to deploy installed mobile apps. Developers have the option of still using Ionic with a new version configured for Angular 2.

To make interfaces fast and run well on mobile, Angular 2 enables an application to run inside a Web worker, thus making the UI responsive regardless of what the application is doing, Green explained. The Angular Universal feature, meanwhile, provides for performance by allowing for an application to be first rendered in just HTML and CSS, with the first page of an app running inside of Node.js on a server.

Written in TypeScript, Angular 2 already has been use at Google, which deployed it at properties like Adwords and Google Fiber. “What we’re saying is that we’re confident that other teams can now build on top of Angular 2,” Green said. While version 2 constitutes a “rewrite and a breaking change,” Google is offering a library called ng Upgrade, for mixing Angular 1 and 2 inside of an application. Developers can start writing Angular 2 components inside of their Angular 1 application, and previous features including as dependency injection and data binding remain.

Copyright © 2015 IDG Communications, Inc.

Credit: Source link

Previous Next
Test Caption
Test Description goes like this