Last active
November 29, 2019 07:49
-
-
Save sainture/ad1c0dfea72ed7a7827a4755850bc08c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BAZEL | |
| Bazel is Google’s open-source part of its internal build tool called Blaze. | |
| The biggest selling point for this tool is that it is capable of doing incremental builds and tests! | |
| Incremental build means that it will only build what has changed since the last build. | |
| The same tool can be used to build frontends and backends. | |
| https://angular.io/guide/bazel | |
| IVY | |
| Angular Ivy is a next-generation compilation and rendering pipeline, which reduces the bundle size, loads faster in slower networks and is simple to use. | |
| Today’s angular compiler takes angular templates, parses and would generate optimized JavaScript code that represents data structure of template. | |
| At runtime, this template data structure is interpreted by angular interpreter and generates DOM. | |
| During the process, Angular compiler has to pass through conditional code paths, which may or may not be used during runtime. | |
| Tree shaking tools only recognize reference code and bundles all the code. | |
| The new angular pipeline (Ivy) skips template data structures and angular interpreter. | |
| Angular template pass through new compiler and generates template instructions, which does not need runtime interpreter to process at runtime. | |
| These instructions are JavaScript code that would directly create DOM. | |
| In Angular, when your write a component, you write the component in TypeScript and its template in HTML, augmented by Angular template syntax (ngIf, ngFor, etc.). | |
| The thing a lot of developers don’t really know is that this HTML will never touch the browser. | |
| It will be compiled by Angular into JavaScript instructions, to create the appropriate DOM when the component appears on the page, | |
| and to update the component when its state changes. | |
| That’s why a big part of Angular is its compiler: it takes all your HTML and generates the necessary JS code. | |
| This compiler (and the runtime) has been completely rewritten over the last year, and this is what Ivy is about. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment