Close

WHAT’S NEW IN ANGULAR 5: EASIER PROGRESSIVE WEB APPS

Angular, Google’s popular JavaScript framework for building mobile and desktop applications, has had a whirlwind year, with two major upgrades in the past 11 months. It will reach the next milestone in its six-month release schedule in September, when Angular 5 is due to debut with major accommodations for Google-driven progressive web apps.

Despite the “5” designation, the upgrade will actually be just the fourth release for the framework, which already has undergone a rewrite since the 1.0 version, initially called AngularJS, debuted in 2012. Angular 5 is now in beta release and is scheduled for production release on September 18.

Its features include:

  • An emphasis on making it easier to build progressive web apps, so apps can be cached in the browser.
  • A build optimizer that makes the application smaller by eliminating unnecessary code.
  • Making Material Design components compatible with server-side rendering.

The progressive web apps concept, the product of a joint effort between Google and Mozilla, is about enabling development of browser-based apps that offer a superior, native-like experience.

Supporting progressive web apps in Angular today requires a lot of expertise on the developers’ part; version 5 is intended to make usage easier. “We’re shooting to try and make progressive web apps something that everyone would use,” said Brad Green, a Google engineering director. “We’re trying to find the right set of defaults so that it just would be the default option for most developers, for both desktop and mobile web.”

Angular 6 on the horizon

Following Angular 5, Google will offer Angular 6 in March or April 2018, if the current release pace golds. Google has not yet decided what features might show up in that release but says it will repeat themes of Angular 5: “Easier, smaller, faster is the theme for version 5. We’ll continue that theme for version 6, just making [developers’] lives easier, making it possible to deliver apps better for their users,” Green said.

Angular’s busy release schedule

Angular 5 follows closely the releases of versions 2 and 4, which arrived in September 2016 and March 2017, respectively, skipping over a version 3 designation. (Because the router for Angular already had reached version 4 by the time Angular 3 was due, Google just went right to calling the upgrade itself Angular 4.)

Although the original AngularJS JavaScript development framework already was a hit with developers, Google undertook a rewrite for the second generation, focused on better performance. “We couldn’t get more performance out of the old architecture,” Green said. Angular 2 was rewritten in TypeScript, Microsoft’s typed superset of JavaScript. “TypeScript let us do static analysis of source code. This is something we can’t do in JavaScript, so it becomes much more predictable,” Green said. TypeScript also lets Angular show developers errors in HTML templates.

Another feature added in Angular 2 was a compiler that sits in between written code and output shipped to a production application. This compiler optimizes the generation of template-rendering; code then can run at maximum speed in JavaScript virtual machines.

Angular 2 also offered a much cleaner component model. Interoperation with technologies such as web components was also a focus in Angular 2.

Angular 4, meanwhile, offered view-engine improvements and code-generation reductions. The latest version of Angular was the 4.3 upgrade, released in July and featuring HttpClient, which provided a smaller, easier-to-use library for making HTTP requests.

Angular 4.3 also has an attribute, @.disabled, for conditionally disabling animations as well as new router life cycle events. Since the 4.0 version, Angular also enhanced animations so parent and child elements can be coordinated across page transitions.

Dependency injection, HTML template remain core advantages

AngularJS’s selling points at the outset included dependency injection, particularly useful for assembling data services for applications, along with use of an HTML template to compose components. Over all the subsequent vesions, these have remained key features. Developers still compose components with an HTML component that connects to TypeScript code for imperative parts of the program.

Google says Angular has succeeded because it offers a “batteries included” approach to development, with developers not burdened with figuring out which internationalization library or animation to to use, or how to do HTTP or forms.