Angular 5 - Smaller, Faster, Easier To Use
Written by Kay Ewbank   
Monday, 06 November 2017

There's a new major release of Angular that the developers claim is smaller, faster, and easier to use. New features of Angular  5, codenamed pentagonal-donut, include automatic use of the build optimizer.

 

 angular

In this version when you create a production build with the CLI, the build optimizer will be applied by default. The build optimizer is a tool included in the CLI for making your bundles smaller by applying semantic analysis of your Angular application. It works by first marking those parts of your application that are standard as pure. This improves the tree shaking provided by the existing tools, removing additional parts of your application that aren’t needed. The second thing the build optimizer does is to remove Angular decorators from your application’s runtime code. Decorators are used by the compiler, and aren’t needed at runtime and can be removed. Each of these jobs decreases the size of your JavaScript bundles, and increase the boot speed of your application for your users.

The second main improvement in Angular 5 is the ability to more easily share application state between the server-side and client-side versions of your application. This is achieved by two things - an Angular Universal State Transfer API, and DOM Support. 

Angular Universal is designed to let you perform server-side rendering of Angular applications so you you can add support for scrapers and crawlers that don’t support JavaScript and increase the perceived performance of your application.

This new release adds ServerTransferStateModule, together with the corresponding BrowserTransferStateModule which enable you to generate information on the server side as part of your rendering, then transfer it to the client side to avoid having to regenerate it. The developers say this is useful in situations such as when your app needs to fetch data over HTTP. Because the state is transferred from the server, you don't have to make a second HTTP request once the application makes it to the client.

Also designed to improve sharing application state is the addition of Domino, which is a server-side DOM implementation based on Mozilla's dom.js, to the platform-server. This means Angular supports more DOM manipulations within server-side contexts, improving support for third party JS and Component libraries that aren’t server-side aware. 

The compiler has been improved to support incremental compilation for faster rebuilds, and features have been added to the Decorators. The compiler now operates as a TypeScript transform as introduced as part of TypeScript 2.3, meaning Angular can hook into the standard TypeScript compilation pipeline. The developers say using this on an incremental build of Angular saves 95% of the build time.

 angular

 

More Information

Angular Site

Angular Changelog

Related Articles

The Performance Of AngularJS

Angular 4 Arrives On Schedule

Angular Jumps To Version 4

Angular 2.0.0 Launched 

AngularJS 2.0 Is Radically Different

Top 10 From Around The Web: AngularJS Web Development Resources

The Weekly Top 10: AngularJS Web Development Resources

The Weekly Top 10: More AngularJS Web Development Resources

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

 

Banner


JetBrains Improves Kubernetes Support In IDE Upgrades
12/11/2024

JetBrains has improved its IDEs with features to suggest the logical structure of code, to streamline the debugging experience for Kubernetes applications, and provide comprehensive cluster-wide Kuber [ ... ]



pg_parquet - Postgres To Parquet Interoperability
28/11/2024

pg_parquet is a new extension by Crunchy Data that allows a PostgreSQL instance to work with Parquet files. With pg_duckdb, pg_analytics and pg_mooncake all of which can access Parquet files, is  [ ... ]


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 06 November 2017 )