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

Transcript

62 slides
  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 con๏ฌrm $ $ %% 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 ๐ŸŽง

More Decks by Michael Geers

Other Decks in Technology