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

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

Slide 3

Slide 3 text

@mgechev v9.1 is out

Slide 4

Slide 4 text

@mgechev

Slide 5

Slide 5 text

@mgechev Smaller Faster builds Better debugging Better type checking Improved build errors Simpler Improved i18n Improvements in Universal

Slide 6

Slide 6 text

@mgechev Smaller Faster builds Better debugging Better type checking Improved build errors Simpler Improved i18n Improvements in Universal

Slide 7

Slide 7 text

Predictability vs Flexibility trade-offs Predictable Flexible

Slide 8

Slide 8 text

Static vs Dynamic trade-offs Static Dynamic

Slide 9

Slide 9 text

Static vs Dynamic trade-offs Static Dynamic

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

@mgechev So, Angular is now more dynamic!

Slide 16

Slide 16 text

@mgechev …but not too dynamic

Slide 17

Slide 17 text

@mgechev • Do something • Collect feedback • Adjust direction “Gradient descent” optimization

Slide 18

Slide 18 text

@mgechev • Do something • Collect feedback • Adjust direction “Gradient descent” optimization

Slide 19

Slide 19 text

twitter.com/mgechev @mgechev

Slide 20

Slide 20 text

@mgechev Google Community

Slide 21

Slide 21 text

@mgechev

Slide 22

Slide 22 text

@mgechev Faster builds -40%

Slide 23

Slide 23 text

@mgechev VE @Component({ selector: 'app', template: ' ...' }) class AppComponent { ... } app.ngfactory.js app.ngsummary.json app.metadata.json app.component.js app.component.d.ts

Slide 24

Slide 24 text

@mgechev Ivy @Component({ selector: 'app', template: ' ...' }) class AppComponent { ... } app.component.js app.component.d.ts

Slide 25

Slide 25 text

@mgechev Faster builds • We do less work • No longer generate factories • ngcc does this once* • No longer using metadata.json • Incremental AoT builds

Slide 26

Slide 26 text

@mgechev Faster builds • We do less work • No longer generate factories • ngcc does this once* • No longer using metadata.json • Incremental AoT builds AoT in development

Slide 27

Slide 27 text

@mgechev

Slide 28

Slide 28 text

@mgechev

Slide 29

Slide 29 text

@mgechev

Slide 30

Slide 30 text

@mgechev Smaller bundles • Less generated code • Smaller framework

Slide 31

Slide 31 text

@mgechev Smaller framework • Tree-shakable instructions • No need for ngfactory machinery

Slide 32

Slide 32 text

@mgechev Improved i18n

Slide 33

Slide 33 text

Angular compile-time i18n (v2-v8) src lib Link & optimize ngc ngc l10n l10n l10n l10n

Slide 34

Slide 34 text

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

Slide 35

Slide 35 text

@mgechev Focused on static optimizations • Generate app at compile-time: • No runtime binding overhead • Smaller bundles: • Localizations are hard to tree-shake • No need for binding instructions

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

@mgechev Angular Universal

Slide 38

Slide 38 text

@mgechev Challenges with Universal ● Change-refresh time ● Deployment

Slide 39

Slide 39 text

@yourtwitter $ ng add @nguniversal/express-engine $ ng run [PROJECT_NAME]:serve-ssr New in v9!

Slide 40

Slide 40 text

@yourtwitter $ ng update @nguniversal/express-engine

Slide 41

Slide 41 text

twitter.com/mgechev @ManfredSteyer @AlanAgius4 @mgechev

Slide 42

Slide 42 text

twitter.com/mgechev Deployment

Slide 43

Slide 43 text

twitter.com/ mgechev New in @angular/fire

Slide 44

Slide 44 text

New in @angular/fire

Slide 45

Slide 45 text

twitter.com/ mgechev New in @angular/fire

Slide 46

Slide 46 text

twitter.com/mgechev Request / HTML @mgechev Request scripts JS TTI Run app on server LCP

Slide 47

Slide 47 text

twitter.com/mgechev Request / HTML @mgechev Request scripts JS TTI Run app on server LCP If not cached Return from the cache Cache LCP

Slide 48

Slide 48 text

@mgechev Prerendering

Slide 49

Slide 49 text

@yourtwitter $ ng add @nguniversal/express-engine $ ng run [PROJECT_NAME]:prerender Using Universal at build-time New in v9!

Slide 50

Slide 50 text

@mgechev Building the app Prerendering <2s for 800 pages ng run app:prerender

Slide 51

Slide 51 text

twitter.com/mgechev

Slide 52

Slide 52 text

twitter.com/mgechev @mgechev JAMStack By HeroDevs

Slide 53

Slide 53 text

twitter.com/mgechev @mgechev

Slide 54

Slide 54 text

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