The State of Angular

Rate this content
Bookmark

In this presentation, we’ll look at the current state of Angular and its tooling infrastructure. We’ll discuss what features enabled the latest version of our rendering engine Ivy and how you can take advantage of them today.


Along the way, we’ll look at the work we did to ensure small bundle size and fast execution! In the second part of the talk, we’ll focus on the tooling that Angular provides to help you deliver apps quickly and efficiently.

This talk has been presented at JSNation Live 2020, check out the latest edition of this JavaScript Conference.

FAQ

The Angular CLI is a command line interface developed by the Angular team to help quickly scaffold Angular applications, optimize assets for production, and enhance the migration experience between Angular versions.

Angular facilitates smooth migration through the ng-update command, which automates updates and source code adjustments to align with the latest Angular version, ensuring compatibility and easing the upgrade process.

The Angular Component Development Kit (CDK) provides a foundational framework for building UI components. It aids developers by offering pre-built behaviors and tools to create custom, reusable components tailored to their specific needs.

Angular supports internationalization through a built-in pipeline that allows developers to produce multiple builds of their application, each tailored to a different language, ensuring efficient performance with zero runtime overhead.

The Angular team at Google focuses on developing a robust framework, providing ergonomic APIs, ensuring smooth migration of applications across versions, optimizing performance, and supporting a wide range of Google's internal applications.

Angular is rigorously battle-tested across over 2,000 web applications within Google, ranging from small internal tools to large enterprise systems like Google Cloud Console. This extensive testing helps ensure reliability and performance optimizations.

Angular version 10 introduces an opt-in strict mode configuration, enabling stricter TypeScript type checking and improved template verification. It also focuses on better handling of ES5 support and reducing dependency on CommonJS modules for more efficient tree shaking.

Angular aims to balance predictability and flexibility by enforcing certain constraints that make the system predictable while offering enough flexibility through its APIs and features to accommodate various development needs.

Minko Gechev
Minko Gechev
36 min
18 Jun, 2021

Comments

Sign in or register to post your comment.

Video Summary and Transcription

The video discusses the current state of Angular, highlighting the Angular CLI, which helps quickly scaffold Angular applications and optimize assets for production. The Component Development Kit (CDK) provides pre-built behaviors and tools for building custom UI components. Angular's internationalization support enables efficient performance with zero runtime overhead. The video also introduces Angular version 10, which includes stricter TypeScript type checking and improved template verification. Angular Universal allows for server-side rendering, improving initial load times and SEO. The talk also covers the use of NX for monorepo setups, offering incremental caching for Angular applications. Lastly, the video mentions the new internalization pipeline that optimizes performance and reduces bundle size.
Available in Español: El estado de Angular

1. Introduction to Angular and its Development Stack

Short description:

Hello, everyone. My name is Mikhail Gechev. I'm an engineer at the Angular team at Google. Today, I want to share the current state of Angular and what our team at Google has been working on. We provide an ergonomic API for developing components and a command line interface for scaffolding Angular applications. We also have the Angular Components team working on the Component Development Kit (CDK) and UI components based on the material specification. Our integrated development stack is battle-tested across thousands of web applications at Google, ensuring that changes and migrations are smooth and predictable.

Hello, everyone. My name is Mikhail Gechev. I'm an engineer at the Angular team at Google.

Today in this presentation, I would want to share with you what is the current state of Angular. I know that this is a general JavaScript event, rather than an Angular-specific conference, so that's why I wanted to share a couple of words with you on what exactly our team at Google has been working on.

Obviously, we are building a framework, right? We're providing an ergonomic API for you to develop components. By composing your components together, you can develop a web user interface. From there on, we have an Angular tooling team that is responsible for building the Angular command line interface. The Angular CLI allows you to very quickly scaffold Angular applications and also production built that can optimize the assets to the maximum so that your users are getting the smallest JavaScript bundles possible, as well as their load time experience, initial startup experience is optimized. The Angular CLI team also works on the migration experience. So from version to version, we would want to make your migration experience as smooth as possible. In general, we are aiming for this evergreen Angular. Or just by running ngupdate, you can get the latest version of Angular and you can even integrate this as part of your CI process, getting automated updates, pull requests, why not? There were some folks from KOM doing it.

On the other side, we also have the Angular Components team. The components team, they're working on the CDK, which is the Component Development Kit. The CDK is providing a foundation for development of UI components. For example, by using this foundation, you can style the minimum amount of components that we're providing there for your own purposes, as well as use the tooling that we're building for accessible Angular applications. The components team is also working on Angular UI components based on the material specification. So if you have an Angular app that is following it, you can directly take these widgets and put them in your app and everything is going to work out of the box.

On top of that, we also have an internalization pipeline. We have a language service, router, animations, and so on and so forth. In general, we're providing this integrated development stack for web user interface. And I believe that the most unique thing about this is that it is really well battle tested across 2,000 and even more web applications across Google. These web applications vary from a small internal dashboard, let's say, to large enterprise applications such as the Google Cloud Console. It has millions of lines of TypeScript and Angular inside of it. We, as engineers at the Angular team, we're not only responsible for implementing bug fixes and new features, like doing fun things, we're also responsible for making sure that all these 2,000 applications are functioning properly with Angular. So if we introduce a change on GitHub that breaks something, we're supposed to go there and fix it. This helps us to make sure that we're aware of all the changes that are happening and making sure that they're not going to have any unpredictable effect on your applications. This way also by making large-scale changes, imagine we change a public API, we need to make sure that it works well in Google Cloud, which has several millions of lines of code. We need to implement an automated migration, which is just a code transformation that we have implemented in a couple of hundreds of lines of code that takes all this Google search code and migrates it to the latest API change.

2. Angular Updates and Motivations

Short description:

We can make the source code available externally through the ng-update command to keep your project up to date. Angular version 10.0 RC is out, marking another milestone. We release new major versions every six months to maintain a predictable schedule. Upgrading may introduce minor backward incompatible changes and typing issues. We strive for a balance between predictability and flexibility, understanding the trade-off between constraints and adaptability.

We can take this source code and make it available externally, and that's what we do as part of the ng-update command that is going to keep your project up to date across different Angular versions. Not only is it going to update your configuration, but also your source code.

Now, since we are all on the same page, I want to talk more about what we have been up to lately. The good news is that Angular version 10.0 RC is out. Depending on when you're watching this video, maybe version 10.0 is not out yet. You might be considering that this is yet another rewrite of Angular. I hope that with the previous explanation I calmed you up and you're aware that we're not rewriting the framework often. That's mostly because it's not necessary and also we'd have to migrate all these 2000 projects inside. So, that's a lot of work.

Version 10.0 just means that we have achieved yet another milestone. We're in general releasing new major versions of Angular every six months. We do that with several different reasons. First, we want to make sure that we have a predictable release schedule and you're all aware of when exactly the next version is going to come. You know that this version may introduce some minor backward incompatible changes. Of course, we're primarily going to take care of them when you run ng-updates, but imagine we also update the version of the TypeScript compiler. This means that you may have some typing issues that you should take care of yourself. Of course, these typing issues are just going to make your application stricter, and from there, you'll be able to get some hints from the TypeScript compiler and catch errors ahead of time, but still this is maybe something that you'd want additional planning around.

Now, let me spend some time talking about some of our motivations for moving Angular forward. I strongly believe that if you understand the theoretical foundation of all of this, you'll be better aligned with our roadmap for Angular in general. I want to talk about predictability versus flexibility. Obviously, we want to have both, right? We want to have a predictable system which is also very flexible, but this often doesn't work great, because predictable systems, they have some constraints. In order for a system to be predictable, it needs to follow some pre-defined constraints that we know that we can rely on. But, at the same time, if we want a system to be flexible, we should ignore some of these constraints. That's why I'm calling this the predictable versus flexible trade-off. Since I'm quite excited about programming languages in general, usually in computer science folks are referring to this trade-off as static versus dynamic. Probably you have heard about static typing versus dynamic typing. Or strong typing versus weak typing. In this particular case, like strong versus static, these are orthogonal concepts. So let us think about static and dynamic for a second. If we try to place different programming languages that are popular right now onto this axis, we are going to see something like this.

QnA