Angular Team Open-Sources Their Brain

Rogelio Flores Zubillaga
ngconf
Published in
5 min readMay 24, 2019

--

The Angular team has shared what’s on their minds with the Angular community at ng-conf 2019

Misko in zero Gravity — that’s how we felt at ng-conf.

A New Open Era

Stephen Fluin and Misko Hevery took the stage for the keynote on the last day of ng-cong 2019 and shared what is on the Angular team’s mind. Fluinn leads developer relations and Hevery is the creator and benevolent dictator of Angular.

Angular is an open source project. But until now, we didn’t know exactly what the Angular team is thinking of as far as future plans, or what experiments they are pursuing. At least not until their experiments became npm modules or part of an alpha or beta release.

Friday, May 3rd marked a departure from this trend, which I think is for the better. The Angular team has become more transparent. It started by Stephen saying that “not every line of code affects users”. By that, he meant that his team creates Proof-of-Concept (POC) applications and have brainstorming sessions. But those were never shared with the world before.

A Process of Experimentation

After describing how the Angular team experiments continually, Fluin then shared the following process that they follow internally to bring new ideas from incubation to releases:

idea → theory → possible → easy → automatic

This process flows like this; once an idea is conceived, a theory on how it could be implemented is thought up. This is your usual design phase. Next; they determine if the theory is possible and how practical it is to implement. In addition, they evaluate how impactful it is. Here is where an idea could die if it’s determined that it will be too difficult to implement, or it will not be useful or impactful. If it passes this “possibility” test, then it is implemented. Finally, if the implementation was easy or at least the new feature could become an automated task, they attempt to make it so if it makes sense.

Some of the projects that have “graduated” from ideas are CDK and Schematics. Some of the current projects being evaluated are Bazel as the new build tool within Angular (CLI), and material-experimental, which contains new widgets that are considered experimental because they’re still buggy and/or they haven’t been finalized and determined worthy of being part of the official list of material components.

The Angular team has chosen to be more open with these projects and that is great news. They really don’t need to do it if they wanted to be a bit selfish. Keep in mind that internally, Google has a large user base of Angular with more than 1000 projects that use it. They could have chosen to use only internal (to Google) users for these projects.

For example, the material-experimental npm module is currently released in sync with the non-experimental module to npm. So any user can test it today by installing it in their project with this command:

npm i material-components-web @angular/material-experimental
Poster from ng-conf 2019

What Are They Thinking?

Misko then took the stage to ask “what are we thinking?”. His answer; their top priority is having the “fastest possible applications” with Angular.

One way they measure how fast an application is, is using the Time To Interactive (TTI), which is the time it takes for an application to become ready for the user to use. It is measured starting from the time it was requested by the user’s client. Currently, the angular build process gets rid of spaces, newlines, obfuscates code, and does tree shaking, among other optimizations. But what they really want to start doing is to provide more lazy boundaries.

Right now you can load modules or components lazyly through routes in the Angular Router. But what about lazy-loading other parts of the application. Those parts are what Misko called the “might need code”. That is, code that is only executed (and therefore, needed) after a user action. For example, a user clicked on a button. But the user will not always click on that button, so the code might never get used. That’s why it could be loaded lazyly, only on-demand. Angular doesn’t provide lazy boundaries for such cases currently.

The other idea that Misko shared, is to allow Angular apps to be resumable. That is, provide a way to manage state by serializing it and being able to send it to the client from the server. Doing that accomplishes two things; the application can start quicker (what Misko called “partial bootstrap”), and we can rehydrate the DOM or “resume the component”. If there are many components on the page, one would only need to rehydrate the components that the user is using at that very moment.

Ivy is thought to be the enabler for these big ideas and goals. It’s the replacement for the current View Engine or renderer. In fact, in the Q&A session that ended ng-conf, we learned that the angular components subteam is focused on Ivy integration so much, that they’re not working on any new components. It’s their current top priority.

Why?

Who doesn’t want faster and snappier applications?

However, I can’t help but think that there is another reason why these goals are top priority. Angular doesn’t power all web applications at Google. It was made clear by members of the Angular team during the Q&A session. For some Google web applications, Angular is not the best framework or tool. Think Google Maps or Google Drive for example. For these two applications, the number of users are in the millions and the runtime requirements might be very aggressive compared to other applications.

I’m sure Misko wants to keep Angular relevant and for it to continue to be a leading and popular framework. But it’s even more than that. I think he’s ambitious, and wants Angular to become a candidate framework to an even greater type of applications. At least that’s the feeling I got when he said that we shouldn’t think that every idea incubating within the Angular team will happen, but:

“we’re going to bring the world with us”

Conclusion

The Angular team has not really “open sourced” their brain. I don’t think you can make a pull request to change something there, but at least they have made it a read-only repository, where you can see what is being considered. It’s a conscious decision, and I for one welcome it! This is a new era of increased transparency for the Angular family.

Resources

Here is the ng-conf 2019 Keynote video in full if you want to watch it.

Here’s an article by Stephen Fluin about the state of Ivy:

EnterpriseNG is coming

EnterpriseNG is a two-day conference from the ng-conf folks coming on November 19th and 20th. Check it out at ng-conf.org

--

--

Rogelio Flores Zubillaga
ngconf

I create web and mobile apps for a living. Play soccer for fun. Wish it were the other way around. I write about software, life, and the universe.