present and future of angular with ivy
play

Present and Future of Angular with Ivy Template ViewEngine Ivy - PowerPoint PPT Presentation

Present and Future of Angular with Ivy Template ViewEngine Ivy Compiler Gen Gen Gen @SiddAjmera 3 Ivy is an enabler @SiddAjmera Design Goals OPTIMIZABILITY INCREMENTALITY FLEXIBILITY Only pay for


  1. Present and Future of Angular with Ivy

  2. Template ViewEngine Ivy Compiler Gen Gen Gen 󾠱 ☝ ✌ @SiddAjmera

  3. 3 Ivy is an enabler “ @SiddAjmera

  4. Design Goals OPTIMIZABILITY INCREMENTALITY FLEXIBILITY ◉ Only pay for ◉ Locality ◉ Simple & easier to what you use ◉ Faster pick, understand, ◉ Tree Shaking compilation, & debug ◉ No metadata builds, & test ◉ HoC files execution ◉ Module-less Apps ◉ Smaller ◉ Dynamic bundles Component Loading @SiddAjmera 4

  5. fn createViewNodes(view: ViewDef) { export function ɵɵ elementStart(..) {..} view.nodes.forEach(node => { switch(node.type) { export function ɵɵ text(..) {..} case ELEMENT: createElement(...) case TEXT: createText(...) export function ɵɵ template(..) {..} case DIRECTIVE: createDirectiveInstance(...) ... ... } }); } Rendering Engine @SiddAjmera Courtesy: @vikerman

  6. export function ɵɵ elementStart(..) {..} export function ɵɵ text(..) {..} export function ɵɵ template(..) {..} ... Template Unused Ivy Instructions Tree Shaken Rendering Engine @SiddAjmera Credits: @vikerman

  7. Ivy Instruction Set ◉ DOM Creation ◉ Styling ◉ Data Binding ◉ Containers ◉ Change Detection ◉ Templates ◉ I18N ◉ Content Projection ◉ Queries ◉ Pipes ◉ Dependency Injection ◉ SVG @SiddAjmera 7

  8. @SiddAjmera 8

  9. @SiddAjmera 9

  10. component.js component.ts component.metadata.json component.html component.js component.ngfactory.js component.scss component.ngsummary.json @SiddAjmera Courtesy: @vikerman

  11. 🌴🤞 + 🚬🤙 = ฀ 📧 @SiddAjmera

  12. @SiddAjmera 12

  13. @SiddAjmera

  14. @SiddAjmera 14

  15. ɵɵ defineModule ɵ mod @NgModule ɵɵ defineComponent ɵ cmp @Component ɵɵ defineDirective ɵ dir @Directive ɵɵ defineInjectable ɵ prov @Injectable ɵɵ definePipe @Pipe ɵ pipe @SiddAjmera

  16. @SiddAjmera 16 Ivy FTW - NG SriLanka Conf.

  17. Design Goals OPTIMIZABILITY INCREMENTALITY FLEXIBILITY ◉ Only pay for ◉ Locality ◉ Module-less Apps what you use ◉ Faster ◉ Simple & easier to ◉ No metadata compilation, pick, understand, files builds, & test & debug ◉ Tree Shaking execution ◉ Dynamic ◉ Smaller Component bundles Loading ◉ HoC @SiddAjmera 17

  18. Hello World! 👌 I am Siddharth Ajmera FullStack JS Developer Angular Writer Instructor @SiddAjmera

  19. 🆖 PRESENT A few examples to demonstrate how awesome Ivy is @SiddAjmera 19

  20. Small & Meaningful Stacktraces 1 To get you straight to the source of your error. @SiddAjmera 20 View Engine V/S Ivy

  21. AoT by default 2 So that you can see the error right while developing @SiddAjmera 21 AoT by default with Ivy 🍄

  22. Lazy Loading Components 3 So that you can load components lazily and only when required. @SiddAjmera 22

  23. ng Object for 🚬🐜 4 So that you can debug your code more easily at runtime @SiddAjmera 23 Debugging Angular Ivy Applications from the Devtools Console

  24. 🔯 FUTURE A few examples to demonstrate how Ivy enables the awesome future @SiddAjmera 24

  25. 25 Angular Modules are linchpins in an Angular Application “ @SiddAjmera

  26. Render Components without Angular Modules from Scratch 1 To write Angular Component from Scratch without much dependency on Angular Modules, ZoneJS etc. @SiddAjmera 26 Angular Component with Change Detection from scratch in Ivy

  27. Render Components without Angular Modules via Compiler 2 As you might not want to write the whole boilerplate again and again. @SiddAjmera 27 Angular Component via Compiler with Change Detection in Ivy

  28. Dynamically Loading a Lazy Component with Ivy’s ɵ renderComponent 3 To give you the flexibility to load a Component lazily and dynamically @SiddAjmera 28

  29. DI in a Dynamically Loaded Lazy Component 4 Coz what’s an Angular App without DI? @SiddAjmera 29

  30. @SiddAjmera 30 Angular Ivy - Dutch Angular Group

  31. 🤕 WHERE FROM HERE? Into a world of Angular Apps where things like Angular Modules, ZoneJS, and RxJS is optional @SiddAjmera 31 Code Repo to Demo proposal for Standalone Angular Components

  32. Thanks! 🙐 Any questions ? You can find me at ◉ @SiddAjmera ◉ SiddAjmera.DEV @SiddAjmera 32

  33. Credits Special thanks to all the people who made and released these awesome resources for free: ◉ Presentation template by SlidesCarnival ◉ Photographs by Unsplash 33

Recommend


More recommend