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

Sustainable SPA-Architectures with Micro Apps (Microfrontends)

Sustainable SPA-Architectures with Micro Apps (Microfrontends)

Manfred Steyer

June 26, 2019
Tweet

More Decks by Manfred Steyer

Other Decks in Programming

Transcript

  1. @ManfredSteyer About me… • Manfred Steyer • SOFTWAREarchitekt.at • Angular

    Trainings and Consultancy • Google Developer Expert (GDE) • Trusted Collaborator in the Angular Team Page ▪ 7 Manfred Steyer Public: Selected Cities In-House: everywhere http://softwarearchitekt.at/workshops
  2. @ManfredSteyer Idea µService µService µService Client Fragment Client Fragment Client

    Fragment ✓ Easy (Tooling) ✓ One optimized bundle set ✓ Consistent  No separate deployment  Mixing Technologies: Difficult  Coupling npm Packages ?
  3. @ManfredSteyer Disadvantages Distribution • Annoying within project Versioning • Old

    versions • Conflicts • How to force devs to use latest version?
  4. @ManfredSteyer Advantages Everyone uses the latest versions No version conflicts

    No burden with distributing libs Creating new libs: Adding folder Experience: Successfully used at Google, Facebook, …
  5. @ManfredSteyer Advantages Sub Project Sub Project Sub Project Sub Project

    Sub Project Sub Project Sub Project Sub Project
  6. @ManfredSteyer Disadvantages Sub Project Sub Project Sub Project Sub Project

    Sub Project Sub Project Sub Project Sub Project Team A Team B Contract
  7. @ManfredSteyer UI Composition w/ Hyperlinks µApp SPA µApp SPA µApp

    SPA <a href="…">…</a> <a href="…">…</a>
  8. @ManfredSteyer µService Providing a (SPA based) Shell µApp µApp µApp

    Shell ▪ iframes ▪ Bootstrapping several SPAs ▪ + Lazy Loading ▪ Meta-Frameworks?
  9. @ManfredSteyer In general: Eventing As little as possible Send out

    information Don't expect an answer 0 to n other micro apps can consume it Don't expect specific notifications Loosely coupling
  10. @ManfredSteyer Disadvantages • Several small and decoupled Projects ;-) •

    More Bundles • Less optimized Bundles/ duplicate Code? • UI Consistency?
  11. @ManfredSteyer Some General Advice Shared state, navigation b/w apps Hyperlinks

    Legacy Apps or *very very* strong isolation? iframes Separate Deployment/ mix Technologies? Bootstrap several SPAs Deployment Monolith little much yes no yes no Not a good fit for public web sites
  12. @ManfredSteyer Blog > SOFTWAREarchitekt.at • A Software Architect's Approach Towards

    Using Angular (And SPAs In General) For Microservices Aka Microfrontends • A Lightweight And Solid Approach Towards Micro Frontends (Micro Service Clients) With Angular And/Or Other Frameworks • Micro Apps With Web Components Using Angular Elements