Slide 1

Slide 1 text

@yourtwitter The State of Angular Minko Gechev twitter.com/mgechev
 github.com/mgechev
 blog.mgechev.com

Slide 2

Slide 2 text

@mgechev 100

Slide 3

Slide 3 text

@mgechev

Slide 4

Slide 4 text

@mgechev 2,000+ Projects at Google

Slide 5

Slide 5 text

@yourtwitter https://unsplash.com/photos/rafblRbne3o

Slide 6

Slide 6 text

@mgechev v10 RC is out

Slide 7

Slide 7 text

@mgechev

Slide 8

Slide 8 text

Predictability vs Flexibility trade-offs Predictable Flexible

Slide 9

Slide 9 text

Static vs Dynamic trade-offs Static Dynamic

Slide 10

Slide 10 text

Static vs Dynamic trade-offs Static Dynamic Rust Haskell Idris C# / Java Go JavaScript TypeScript Ruby

Slide 11

Slide 11 text

Static vs Dynamic trade-offs Static Dynamic

Slide 12

Slide 12 text

• Compile-time optimizations • Excellent IDE/text editor support • Strict type checking • Source code visualization • Lazy component loading • Dynamic UI assembling • Fast (no) builds Static Dynamic

Slide 13

Slide 13 text

twitter.com/mgechev

Slide 14

Slide 14 text

twitter.com/mgechev 15% of bugs detectable at build time

Slide 15

Slide 15 text

twitter.com/mgechev

Slide 16

Slide 16 text

twitter.com/mgechev

Slide 17

Slide 17 text

• Compile-time optimizations • Excellent IDE/text editor support • Strict type checking • Source code visualization • Lazy component loading • Dynamic UI assembling • Fast (no) builds Static Dynamic

Slide 18

Slide 18 text

• Compile-time optimizations • Excellent IDE/text editor support • Strict type checking • Source code visualization • Lazy component loading • Dynamic UI assembling • Fast (no) builds Static Dynamic 2.0 4.0

Slide 19

Slide 19 text

• Compile-time optimizations • Excellent IDE/text editor support • Strict type checking • Source code visualization • Lazy component loading • Dynamic UI assembling • Fast (no) builds Static Dynamic 4.0 9.0

Slide 20

Slide 20 text

• Compile-time optimizations • Excellent IDE/text editor support • Strict type checking • Source code visualization • Lazy component loading • Dynamic UI assembling • Fast (no) builds Static Dynamic 9.0

Slide 21

Slide 21 text

@mgechev What’s in v10?

Slide 22

Slide 22 text

@mgechev v10 focus • Opt-in strict flag • Increase visibility

Slide 23

Slide 23 text

@mgechev v10 focus • Opt-in strict flag • Increase visibility

Slide 24

Slide 24 text

@mgechev Strict Mode " Strict TypeScript type checking strictTemplates in Angular Opt-in ES5 support Opt-in CommonJS support Reduced side-effects

Slide 25

Slide 25 text

@mgechev

Slide 26

Slide 26 text

twitter.com/mgechev >15% of bugs detectable at build time

Slide 27

Slide 27 text

@mgechev Opt-in CommonJS

Slide 28

Slide 28 text

twitter.com/mgechev https://web.dev/commonjs-larger-bundles/

Slide 29

Slide 29 text

@mgechev !// index.js import { add } from './utils'; console.log(add(1, 2)); !// utils.js module.exports.add = (a, b) !=> a + b, module.exports.subtract = (a, b) !=> a - b, module.exports.multiply = (a, b) !=> a * b, module.exports.divide = (a, b) !=> a / b, const { maxBy } = require('lodash-es'); module.exports.max = arr !=> maxBy(arr)

Slide 30

Slide 30 text

@mgechev !// output.js !!... (() !=> { "use strict"; !/* harmony import !*/ var _utils!__WEBPACK_IMPORTED_MODULE_0!__ = !__webpack_require!__(288); const subtract = (a, b) !=> a - b; console.log((0,_utils!__WEBPACK_IMPORTED_MODULE_0!__!/* .add !*/ .IH)(1, 2)); })();

Slide 31

Slide 31 text

@mgechev !// utils.js export const add = (a, b) !=> a + b; export const subtract = (a, b) !=> a - b; export const multiply = (a, b) !=> a * b; export const divide = (a, b) !=> a / b; import { maxBy } from 'lodash-es'; export const max = arr !=> maxBy(arr); !// index.js import { add } from './utils'; console.log(add(1, 2));

Slide 32

Slide 32 text

@mgechev !// output.js (()!=>{"use strict";console.log(1+2)})();

Slide 33

Slide 33 text

@mgechev !// utils.js module.exports.add = (a, b) !=> a + b, module.exports.subtract = (a, b) !=> a - b, module.exports.multiply = (a, b) !=> a * b, module.exports.divide = (a, b) !=> a / b, const { maxBy } = require('lodash-es'); module.exports.max = arr !=> maxBy(arr)

Slide 34

Slide 34 text

@mgechev !// utils.js export const add = (a, b) !=> a + b; export const subtract = (a, b) !=> a - b; export const multiply = (a, b) !=> a * b; export const divide = (a, b) !=> a / b; import { maxBy } from 'lodash-es'; export const max = arr !=> maxBy(arr);

Slide 35

Slide 35 text

@mgechev !// output.js /******/ (() !=> { !// webpackBootstrap /******/ "use strict"; !// CONCATENATED MODULE: ./utils.js!** const add = (a, b) !=> a + b; const subtract = (a, b) !=> a - b; !// CONCATENATED MODULE: ./index.js!** const index_subtract = (a, b) !=> a - b;!** console.log(add(1, 2));!** /******/ })();

Slide 36

Slide 36 text

@mgechev !// example.js module.exports[localStorage.getItem(Math.random())] = () !=> { … };

Slide 37

Slide 37 text

@yourtwitter Examples Automated updates Optimized i18n pipeline Angular Universal Compile-time optimizations Efficient prefetching

Slide 38

Slide 38 text

@mgechev Zero-overhead i18n

Slide 39

Slide 39 text

Angular compile-time i18n (Ivy) src lib Link & optimize l10n repeat ngc

Slide 40

Slide 40 text

twitter.com/mgechev @mgechev

Slide 41

Slide 41 text

@mgechev Thank you! twitter.com/mgechev
 github.com/mgechev
 blog.mgechev.com Survey: mgv.io/talk