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

Federated Angular – Why and How?

Federated Angular – Why and How?


Manfred Steyer

December 03, 2021


  1. @ManfredSteyer ManfredSteyer Federated Angular – Why and How? Manfred Steyer,

  2. @ManfredSteyer Which one is the best?

  3. @ManfredSteyer It’s all about consequences in your very situation!

  4. @ManfredSteyer Micro Frontends

  5. @ManfredSteyer Contents #1 Why: Real-World Case Studies #2 How: Module

  6. @ManfredSteyer Manfred Steyer

  7. @ManfredSteyer

  8. @ManfredSteyer Deadalus Health Care (formerly AGFA Health Care)

  9. @ManfredSteyer DATEV eG (~8000 Employees, 200 Products)

  10. @ManfredSteyer Huge European Bank Domain A Domain B Domain C

    Domain D Domain E Domain F eBanking
  11. @ManfredSteyer Quality Bytes (No Micro Frontends but Domain Cutting)

  12. @ManfredSteyer Reasons for Micro Frontends Huge Product/ Product Suite Scaling

    Teams & Domains Switching out Technologies Rapitely Changing Requirements
  13. @ManfredSteyer

  14. @ManfredSteyer Implementation iframes: Legacy & Isolation Web Components: Load into

    SPA, Hide Frameworks Hyper Links: Easy – No Meta Framework needed
  15. @ManfredSteyer Consequences Effort for „Meta Framework“ Sharing Code at Runtime

    and Bundle Size Common Look and Feel
  16. @ManfredSteyer

  17. @ManfredSteyer Idea const Component = await import('http://other-app/xyz') Does not work

    with webpack/ Angular CLI Even lazy parts must be known at compile time!
  18. @ManfredSteyer Webpack 5 Module Federation Shell (Host) Microfrontend (Remote) //

    Maps Urls in // webpack config remotes: { mfe1: "mfe1" } // Expose files in // webpack config exposes: { './Cmp': './my.cmp.ts' } import('mfe1/Cmp')
  19. @ManfredSteyer How to Share Libs? Shell (Host) Microfrontend (Remote) shared:

    [ "@angular/core", "…" ] shared: [ "@angular/core", "…" ]
  20. @ManfredSteyer 1) ng add @angular-architects/module-federation 2) Adjust generated configuration 3)

    ng serve
  21. @ManfredSteyer

  22. @ManfredSteyer Conclusion No free Lunch: Consequences Scaling Teams & Domains

    Module Federation
  23. @ManfredSteyer

  24. @ManfredSteyer d Slides & Examples Remote Company Workshops and Consulting