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

Federated Angular – Why and How?

Federated Angular – Why and How?

15934fa2aa7b2ce21f091e9b7cffa856?s=128

Manfred Steyer
PRO

May 21, 2021
Tweet

Transcript

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

    ANGULARarchitects.io
  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

    Federation
  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 Another Huge European Bank Details from Domain A Customer

    Relationship Management Domain A Customer XYZ Domain B Domain C
  12. @ManfredSteyer Quality Bytes (No Micro Frontends but Domain Cutting)

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

    Teams & Domains Switching out Technologies Rapitely Changing Requirements
  14. @ManfredSteyer Consequences Effort for „Meta Framework“ Sharing Code at Runtime

    and Bundle Size Common Look and Feel
  15. @ManfredSteyer

  16. @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!
  17. @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')
  18. @ManfredSteyer How to Get the Microfrontend's URL? Shell (Host) Microfrontend

    (Remote) RemoteEntrypoint.js <script src="…"></script>
  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

    http://angulararchitects.io