The State of Angular

82bafb0432ce4ccc9dcc26f94d5fe5bc?s=47 Minko Gechev
July 08, 2020
130

The State of Angular

82bafb0432ce4ccc9dcc26f94d5fe5bc?s=128

Minko Gechev

July 08, 2020
Tweet

Transcript

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

  2. @mgechev 100

  3. @mgechev

  4. @mgechev 2,000+ Projects at Google

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

  6. @mgechev v10 RC is out

  7. @mgechev

  8. Predictability vs Flexibility trade-offs Predictable Flexible

  9. Static vs Dynamic trade-offs Static Dynamic

  10. Static vs Dynamic trade-offs Static Dynamic Rust Haskell Idris C#

    / Java Go JavaScript TypeScript Ruby
  11. Static vs Dynamic trade-offs Static Dynamic

  12. • 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
  13. twitter.com/mgechev

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

  15. twitter.com/mgechev

  16. twitter.com/mgechev

  17. • 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
  18. • 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
  19. • 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
  20. • 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
  21. @mgechev What’s in v10?

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

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

  24. @mgechev Strict Mode " Strict TypeScript type checking strictTemplates in

    Angular Opt-in ES5 support Opt-in CommonJS support Reduced side-effects
  25. @mgechev

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

  27. @mgechev Opt-in CommonJS

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

  29. @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)
  30. @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)); })();
  31. @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));
  32. @mgechev !// output.js (()!=>{"use strict";console.log(1+2)})();

  33. @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)
  34. @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);
  35. @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));!** /******/ })();
  36. @mgechev !// example.js module.exports[localStorage.getItem(Math.random())] = () !=> { … };

  37. @yourtwitter Examples Automated updates Optimized i18n pipeline Angular Universal Compile-time

    optimizations Efficient prefetching
  38. @mgechev Zero-overhead i18n

  39. Angular compile-time i18n (Ivy) src lib Link & optimize l10n

    repeat ngc
  40. twitter.com/mgechev @mgechev

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