Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

The Status of Micro Frontends

The Status of Micro Frontends

Manfred Steyer

March 23, 2022
Tweet

More Decks by Manfred Steyer

Other Decks in Programming

Transcript

  1. @ManfredSteyer • Autarkic teams, so that … • it's possible

    to do changes w/o coordinating with other teams • own architectural decisions • Migrating step by step to new tech stacks : • Fully consistent design • Bundle size
  2. @ManfredSteyer Should mirror a real-world business domain Large enough: Most

    use cases don't overlap domains Small enough: One team can handle it
  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 How to Get the Microfrontend's URL? Shell (Host) Microfrontend

    (Remote) RemoteEntry.js <script src="…"></script>
  5. @ManfredSteyer Booking Booking Boarding Boarding Shared Shared Feature Feature Feature

    Feature Feature Feature Feature Feature Feature Feature … … … … … … … … … … … … … … … … … … Booking App Booking App Boarding App Boarding App Publish shared libs seperately via npm Repository n Repository 2 Repository 1 Version Mismatches? Strict Borders
  6. @ManfredSteyer Booking Booking Boarding Boarding Shared Shared Feature Feature Feature

    Feature Feature Feature Feature Feature Feature Feature … … … … … … … … … … … … … … … … … … Booking App Booking App Boarding App Boarding App
  7. @ManfredSteyer const main = await import('other-app/main'); main.bootstrap(); const rootElm =

    document.createElement('app-root') document.body.appendChild(rootElm);
  8. @ManfredSteyer Conclusion Know your architecture goals + Evaluate! Know your

    architecture goals + Evaluate! Moduliths vs. Micro Frontends Moduliths vs. Micro Frontends Monorepo vs. multiple repos Monorepo vs. multiple repos Module Federation: Tempting Module Federation: Tempting