Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Angular Ivy: A deep dive into the heart of Ivy

Angular Ivy: A deep dive into the heart of Ivy

This talk will introduce you into the core principles of the new renderer Ivy. You will learn about the component factories and injection, the locality principle, how to develop higher order components and many more. All these will be shown by examples. After the talk you will have a basic understanding of how to use the new renderer and all the new options for developing Angular applications.

Martina Kraus

June 04, 2019
Tweet

More Decks by Martina Kraus

Other Decks in Programming

Transcript

  1. @MartinaKraus11 • Senior Frontend Dev @inovex GmbH • Trainer @Angular.DE

    • ngGirls • Angular Heidelberg Martina Kraus
  2. Agenda • Why do we need a new Engine? •

    How does it work? • How to use? 3 @MartinaKraus11
  3. Costliest Ressource on a webpage? 6 HTML ? CSS ?

    JavaScript ! Not only bundle size as well parsing and execution
  4. How to make things smaller • Don’t pay for framework

    features you don’t use 14 @MartinaKraus11 • View Engine isn’t tree-shakable tree-shaking
  5. 17 @MartinaKraus11 Template Function calls elementStart() text() export function elementStart()

    Ivy Component definition calls Framework export function text()
  6. Faster compilation • Compiling them only requires local information •

    If Component changes, it’s dependencies doesn’t have to recompile 19 @MartinaKraus11 Locality principle
  7. Faster compilation • Ivy provides “stable” API to ship compiled

    through NPM No global compilation needed anymore Modules are already AOT 23 @MartinaKraus11
  8. Easier to Debug • With cleaner API: improvements an Stack

    traces • Setting breakpoints in Templates ◦ Stepping into the instructions for the creation of the template 25 @MartinaKraus11
  9. Angular Ivy in Version 8 • Opt-in • Backwards compatible

    27 @MartinaKraus11 ng new ivy-app --enable-ivy ng build --prod
  10. Summary • Angular’s new renderer reduces bundle size significantly •

    And compiles really fast ◦ Only re-compiles what changed 29 @MartinaKraus11
  11. Want more? Come and join me and more awesome speakers

    at 30 @MartinaKraus11 Angular Conference Berlin • 30 - 31 August, 2019 @BOLLE FESTSÄLE here in Berlin