$30 off During Our Annual Pro Sale. View Details »

Camel and Eye of a Needle: Integration of SPA-b...

Camel and Eye of a Needle: Integration of SPA-based Micro Frontends

Manfred Steyer

February 09, 2023
Tweet

More Decks by Manfred Steyer

Other Decks in Programming

Transcript

  1. @ManfredSteyer ManfredSteyer Camel and Eye of a Needle Manfred Steyer,

    ANGULARarchitects.io Integration of SPA-based Micro Frontends
  2. @ManfredSteyer const script = document.createElement('script'); script.src = 'other-spa/bundle.js'; document.body.appendChild(script); const

    myElement = document.createElement('other-spa'); myElement['visible'] = true; document.body.appendChild(myElement);
  3. @ManfredSteyer Shell (Host) Microfrontend (Remote) // Maps Urls in //

    webpack config remotes: { mfe1: "http://..." } // Expose files in // webpack config exposes: { Cmp: './my.cmp.ts' } import('mfe1/Cmp')
  4. @ManfredSteyer Single Framework/ Version Multiple Frameworks/ Versions Like Lazy Loading

    Like bootstrapping several SPAs + Sharing where same version No workarounds Some workarounds
  5. @ManfredSteyer SPAs + MF: Trade-offs Business Apps: Traditional approaches ok

    Conversions: New wave very tempting! Evalulate options against requirements!