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

How Deep Is Your Micro Frontend

How Deep Is Your Micro Frontend

talk at Micro Frontends Conference 2023
https://conference.microfrontends.cloud

Recording
https://youtu.be/r8MSfF8xNvc

Michael Geers

June 12, 2023
Tweet

More Decks by Michael Geers

Other Decks in Technology

Transcript

  1. Who am I? Michael Geers 👨💻 Software Engineer 📐 Frontend

    Architect 💚 Web Technology Fanboy Author 📕 Micro Frontends in Action, Manning 📝 micro-frontends.org Passion ☀🚘 open source solar charging 👉 evcc.io #renewableEnergy
  2. Growing Pains Technical Reasons Scaling gets too expensive. Changes often

    introduce errors. Organisational Reasons Too many people in one repo. Rules and processes to avoid chaos.
  3. Micro Frontend Depth monolith verticalization / self-contained systems / micro

    frontends Today’s topic and this & Width BONUS A Challenging Real World Example
  4. Frontend only frontend api gateway backend microservices frontend backend monolith

    legacy system, headless SaaS, …. frontend multiple backend systems browser stuff
  5. Frontend + Backend 1* frontend BFF 
 backend for frontend

    backend microservices business logic *data gathering (aka BFF)
  6. Frontend + Backend 2* frontend *including business logic backend business

    logic domain #1 domain #2 domain #3 domain #4 operations shared platform
  7. Frontend + Backend + Ops frontend you build it, you

    run it backend business logic domain #1 domain #2 domain #3 domain #4 operations infrastructure
  8. 🌟 Bene fi ts for going deeper technology independence parallel

    frontend development continuous delivery autonomy level 
 waiting for others frontend only … … … … frontend + backend 1 
 data gathering … … … … frontend + backend 2 
 business logic … … … … frontend + backend + ops … … … …
  9. 🌟 Bene fi ts for going deeper technology independence parallel

    frontend development continuous delivery autonomy level 
 waiting for others frontend only ✅ … … … frontend + backend 1 
 data gathering ✅ … … … frontend + backend 2 
 business logic ✅ … … … frontend + backend + ops ✅ … … …
  10. 🌟 Bene fi ts for going deeper technology independence parallel

    frontend development continuous delivery autonomy level 
 waiting for others frontend only ✅ ✅ … … frontend + backend 1 
 data gathering ✅ ✅ … … frontend + backend 2 
 business logic ✅ ✅ … … frontend + backend + ops ✅ ✅ … …
  11. „In this approach, the web application is broken down into

    its features, and each feature is owned, frontend to backend, by a different team. This ensures that every feature is developed, tested and deployed independently from other features.“ Micro Frontends De fi nition: Thoughtworks Technology Radar 👩🏭 📦 🔬
  12. 🌟 Bene fi ts for going deeper technology independence parallel

    frontend development continuous delivery autonomy level 
 waiting for others frontend only ✅ ✅ ❌ … frontend + backend 1 
 data gathering ✅ ✅ ❌ … frontend + backend 2 
 business logic ✅ ✅ 😁 … frontend + backend + ops ✅ ✅ 🤩 …
  13. Frontend Payment Service Content Service Operations Platform Business Attributes Service

    Specialist Teams Team Inspire Team Decide Team Checkout Cross Functional Teams grouped around a use case or customer need grouped around a skill or technology developing a new feature inter-team communication ⏳ Autonomy level waiting for others Source: Micro Frontends in Action
  14. 🌟 Bene fi ts for going deeper technology independence parallel

    frontend development continuous delivery autonomy level 
 waiting for others frontend only ✅ ✅ ❌ 😑 frontend + backend 1 
 data gathering ✅ ✅ ❌ 🙂 frontend + backend 2 
 business logic ✅ ✅ 😁 😁 frontend + backend + ops ✅ ✅ 🤩 🤩
  15. 😲 Drawbacks of high depth 🌈 cross-functional isn’t always easy

    🍱 full-stack instead of specialization 🤯 team has a lot of responsibility 👪 greater minimum team size required
  16. 🌟 Bene fi ts for going deeper technology independence parallel

    frontend development continuous delivery autonomy level 
 waiting for others … frontend only ✅ ✅ ❌ 😑 … frontend + backend 1 
 data gathering ✅ ✅ ❌ 🙂 … frontend + backend 2 
 business logic ✅ ✅ 😁 😁 … frontend + backend + ops ✅ ✅ 🤩 🤩 … full-stack + business 
 own ideas, test & learn … … … … …
  17. 2 33 $ 66 $ 99 $ buy 2 1

    66 $ 1 1 list home detail basket payment confirm $ $ %% Team Inspire Team Decide Team Checkout Customer Journey Source: Micro Frontends in Action How do we separate? systems are aligned with user fl ow
  18. UI Composition Team Inspire Team Decide Team Checkout Page Fragments

    Fragment different micro frontends on one screen if required Source: Micro Frontends in Action
  19. what’s a system? loosely coupled to others may consist of

    multiple stronger coupled services domain #2 domain #1
  20. prepare for growth Pattern #1 : start with n systems

    per team n teams 1 team split team if needed works great in a known domain 
 > low risk for wrong cuts higher operational complexity if cuts are not needed
  21. prepare for growth Pattern #2 : design system to be

    divided later n teams 1 team split system if needed modulith modular monolith Sollbruchstelle (German) predetermined breaking point
  22. prepare for growth Pattern #2 : design system to be

    divided later n teams 1 team split system if needed modulith modular monolith Sollbruchstelle (German) predetermined breaking point
  23. Real World Example Customer Chat Building a bike shed █

    ██████ ████████ ██████ ████ ██████████████ ████████ ████ ██████████ send message inquiry system Chat interface for experts to support customers with their DIY projects. Customer Service Back Of fi ce
  24. The Data Picker Pattern Customer Chat Building a bike shed

    █ ██████ ████████ ██████ ████ ██████████████ ████████ ████ ██████████ send message materials for premium bike shed #22 ███ ██ ██ █ + ▼ █ ██ █ ██ █ materials system inquiry system System for composing and managing part lists. Knows all products, individual pricing, discounts, availability, … included materials system acts as an HTML form fi eld containing the id of the selected list inquiry system doesn’t have to know anything about lists and products 😁 perfect decoupling
  25. The Data Picker Pattern Customer Chat Building a bike shed

    █ ██████ ████████ ██████ ████ ██████████████ ████████ ████ ██████████ send message materials for premium bike shed #22 ███ ██ ██ █ + ▼ █ ██ █ ██ █ New Legal Requirement The state of a sent material list must be conserved. 🌟 Quick solution: inquiry system noti fi es materials system when a message is submitted via browser events. 🙂 still decoupled but two-way communication inquiry system materials system message sent event
  26. Customer Chat Building a bike shed █ ██████ ████████ ██████

    ████ ██████████████ ████████ ████ ██████████ send message materials for premium bike shed #22 ███ ██ ██ █ + ▼ █ ██ █ ██ █ inquiry system New Legal Requirement Documents can’t be modi fi ed after sending. 🌟 Solution: inquiry system includes document system. Same pattern as with materials system. materials system document system upload ███ ██ 
 ███ █ ██ █ █ ██ New Feature Instructions and data sheets can be attached. 🌟 🫤 loosely coupled but increasing complexity message sent event
  27. Customer Chat Building a bike shed █ ██████ ████████ ██████

    ████ ██████████████ ████████ ████ ██████████ send message materials for premium bike shed #22 ███ ██ ██ █ + ▼ █ ██ █ ██ █ inquiry system materials system document system upload ███ ██ 
 ███ █ ██ █ █ ██ New Feature Material lists can have a set of initial documents. 🌟 😭 loosely coupled but high complexity Hard to debug and change. Three teams are involved. list selection changed message sent event
  28. YouTube: Architecture. The Hard Parts by Neal Ford Book: Software

    Architecture - The Hard Parts (O'Reilly) Recommendation 
 Making Sensible Architecture Tradeoffs
  29. Customer Chat Building a bike shed █ ██████ ████████ ██████

    ████ ██████████████ ████████ ████ ██████████ send message materials for premium bike shed #22 ███ ██ ██ █ + ▼ █ ██ █ ██ █ upload ███ ██ 
 ███ █ ██ █ █ ██ Are these the best system boundaries? Is this the best user experience?
  30. How does UX work ? in a micro frontends architecture

    Who designs user fl ows? What are the tradeoffs?
  31. UX UX UX How does UX fi t in? UX

    top down UX as a service part of the team
  32. Getting user fl ow and system boundaries aligned will make

    integration easy. Discussing UX decisions and their tradeoffs in an early stage can save you a lot of technical complexity.
  33. systems x business technical Structuring (existing) business units along domains.

    
 Not only tech teams. 💬 alignment > less coordination 💡 validate ideas quickly 🚀 faster time to market
  34. 🌟 Bene fi ts for going deeper technology independence parallel

    frontend development continuous delivery autonomy level 
 waiting for others time to market 
 idea to implementation frontend only ✅ ✅ ❌ 😑 🚶 frontend + backend 1 
 data gathering ✅ ✅ ❌ 🙂 🚴 frontend + backend 2 
 business logic ✅ ✅ 😁 😁 🏍 frontend + backend + ops ✅ ✅ 🤩 🤩 🏎 full-stack + business 
 own ideas, test & learn ✅ ✅ 🤩 🤩 🚀
  35. get it at manning.com with code ctwmcrfrontend23 🤫 The code

    also works for all other books there. I’ve written a book 35% off
  36. 🌈 Thanks for listening! fabricius.isometrics want more of this? Michael

    Geers naltatis geers.tv slides of this talk Woodshop Igor Ovsyannykov 
 https://unsplash.com/photos/ iXV0i4Wo4yc Tocotronic Stefan Müller 
 https:// fl ic.kr/p/JCTQXd Logistik falco 
 https://pixabay.com/de/photos/logistik- lager-transport-versand-852936/ Wooden Counter David Siglin 
 https://www.pexels.com/photo/blur-blurry- bokeh-close-up-347139/ Was zurückblieb Fabricius Seifert https://www.fabriciusseifert.de/ produkt/was-zurueckbleibt/ Credits
  37. How Deep Is Your Micro Frontend? Michael Geers 12. June

    2023, Micro Frontends Conference lov e 🎧