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

Micro frontends: The Good, The Bad and The Ugly

Micro frontends: The Good, The Bad and The Ugly

Now it seems like micro frontends sound like a bad idea. Complicated, complex, over-engineered? What do we gain from them? Freedom. Autonomous teams. Less meetings and E-Mails. An always deployable master branch.

FrontConf

March 21, 2020
Tweet

More Decks by FrontConf

Other Decks in Programming

Transcript

  1. Hello, Code is Colorful. I am Vanessa Böhner. Senior Product

    Engineer @ S2 I like Vue, Svelte, Good Food and Weightlifting You can call me @vannsl :) Nice to meet you!
  2. @vannsl Online Shop Flow Cart Checkout Address Validation Payment Methods

    Confirmation My Account My Orders Shipments Chatbot Flow A lot of stuff Product Categories Manufacturers Combinations/Sets Single Product Colors Sizes Landing Page Explanation
  3. The Frontend & The Backend @vannsl @vannsl | 2019 Team

    Backend and DevOps Frontend Backend The A Team Frontend Backend Team Frontend and Design
  4. Microservices @vannsl @vannsl | 2019 Team Frontend and Design Team

    Backend and DevOps Frontend Backend Frontend Backend Aggregation Layer Service Product Service Cart Service Checkout Service Account Team Frontend and Design The A Team Frontend Backend
  5. @vannsl @vannsl | 2019 Team Inspire Frontend Backend Design Team

    Acquisition Frontend Backend Design Team Purchase Frontend Backend Design Verticals & Crossfunctional Teams
  6. Zalando Project Mosaic, Podium and Other @vannsl @vannsl | 2019

    Project Mosaic Podium Custom Container-App - iFrames - JS Bundles - Web Components
  7. Zalando Project Mosaic, Podium and Other @vannsl @vannsl | 2019

    Project Mosaic Podium Custom Container-App - iFrames - JS Bundles - Web Components
  8. @vannsl @vannsl | 2019 <body> <h1>Hey Code is Colorful!</h1> <iframe

    id="micro-frontend"></iframe> <script type="text/javascript"> const microFrontends = { "/": "https://home", "/product": "https://product", "/checkout": "https://checkout" } const iframe = document.getElementById("micro-frontend"); iframe.src = microFrontends[window.location.pathname]; </script> </body> Runtime Integration via iFrames: One MF per Page Example
  9. @vannsl @vannsl | 2019 <body> <h1>Hey Code is Colorful!</h1> <iframe

    id="micro-frontend"></iframe> <script type="text/javascript"> const microFrontends = { "/": "https://home", "/product": "https://product", "/checkout": "https://checkout" } const iframe = document.getElementById("micro-frontend"); iframe.src = microFrontends[window.location.pathname]; </script> </body> Runtime Integration via iFrames: One MF per Page Example
  10. @vannsl @vannsl | 2019 <body> <h1>Hey Code is Colorful!</h1> <iframe

    id="micro-frontend"></iframe> <script type="text/javascript"> const microFrontends = { "/": "https://home", "/product": "https://product", "/checkout": "https://checkout" } const iframe = document.getElementById("micro-frontend"); iframe.src = microFrontends[window.location.pathname]; </script> </body> Runtime Integration via iFrames: One MF per Page Example
  11. @vannsl @vannsl | 2019 <body> <h1>Hey Code is Colorful!</h1> <iframe

    id="micro-frontend"></iframe> <script type="text/javascript"> const microFrontends = { "/": "https://home", "/product": "https://product", "/checkout": "https://checkout" } const iframe = document.getElementById("micro-frontend"); iframe.src = microFrontends[window.location.pathname]; </script> </body> Runtime Integration via iFrames: One MF per Page Example
  12. Zalando Project Mosaic, Podium and Other @vannsl @vannsl | 2019

    Project Mosaic Podium Custom: Container-App - iFrames - JS Bundles - Web Components
  13. Project Mosaic @vannsl @vannsl | 2019 Team SHIELD Team SWORD

    Microservices and Databases Layout Service Templates with Fragments Router Static Routes
  14. @vannsl @vannsl | 2019 Internet + Cloud Services Tailor (Layout

    Service) UI Component Library Skipper (Router) Fragment Fragment Fragment Fragment Fragment Fragment
  15. Layout and Fragment Service @vannsl @vannsl | 2019 Tailor (Layout

    Service) Fragment 1 Fragment 2 Fragment 3 One Template
  16. Tailor Template Example @vannsl @vannsl | 2019 <head> <fragment src="https://assets"

    /> </head> <body> <fragment src="https://layout/header" /> <fragment src="https://product/daily" /> <fragment src="https://product/overview" /> <fragment src="https://product/visited" /> <fragment src=“https://layout/footer" /> </body>
  17. Tailor Template Example @vannsl @vannsl | 2019 <head> <fragment src="https://assets"

    /> </head> <body> <fragment src="https://layout/header" /> <fragment src="https://product/daily" /> <fragment src="https://product/overview" /> <fragment src="https://product/visited" /> <fragment src=“https://layout/footer" /> </body>
  18. Tailor Template Example @vannsl @vannsl | 2019 <head> <fragment src="https://assets"

    /> </head> <body> <fragment src="https://layout/header" /> <fragment src="https://product/daily" /> <fragment src="https://product/overview" /> <fragment src="https://product/visited" /> <fragment src=“https://layout/footer" /> </body>
  19. Tailor Template Example @vannsl @vannsl | 2019 <head> <fragment src="https://assets"

    /> </head> <body> <fragment src="https://layout/header" /> <fragment src="https://product/daily" /> <fragment src="https://product/overview" /> <fragment src="https://product/visited" /> <fragment src=“https://layout/footer" /> </body>
  20. Rendered Template @vannsl @vannsl | 2019 Fragment LAYOUT HEADER Fragment

    LAYOUT FOOTER Fragment PRODUCT DAILY LOOK Fragment PRODUCTS OVERVIEW Fragment PRODUCTS VISITED
  21. Desktop Layout @vannsl @vannsl | 2019 Fragment LAYOUT HEADER Fragment

    LAYOUT FOOTER Fragment PRODUCTS DAILY DEAL Fragment PRODUCT OVERVIEW Fragment PRODUCTS VISITED
  22. Communication and Event Streaming @vannsl @vannsl | 2019 Team SWORD

    Team SHIELD Microservices and Databases Communication via API or Event Streaming Clientside Eventbus
  23. Communication and Event Streaming @vannsl @vannsl | 2019 Team SWORD

    Team SHIELD Clientside Eventbus Declarative, not imperative Microservices and Databases Communication via API or Event Streaming
  24. @vannsl @vannsl | 2019 Fullstack Dev UX Scrum UI Fullstack

    Dev Fullstack Dev Fullstack Dev PO The Challenge
  25. Code Reuse - DRY @vannsl @vannsl | 2019 Webpack Configuration

    Testing Setup Utils Helpers Vendors Assets Don’t share anything Honestly, don’t.
  26. 3 How can we guarantee an overall good UX? Can

    we switch between different teams? 2 Golden Rules @vannsl @vannsl | 2019 1How and where do we implement new features? Design Systems
  27. Companies using Microfrontends @vannsl @vannsl | 2019 Spotify Klarna Zalando

    Upwork OpenTable Allegro HelloFresh SinnerSchrader