Share
Embed
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
-
How Deep Is Your Micro Frontend? Michael Geers 12. June
2023, Micro Frontends Conference -
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 -
I work at We build tailored e-commerce systems together for
and with traditional companies. -
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. -
verticalization / self-contained systems / micro frontends Todayโs topic and
this Micro Frontend Depth -
Micro Frontend Depth monolith verticalization / self-contained systems / micro
frontends Todayโs topic and this & Width BONUS A Challenging Real World Example -
Frontend only frontend api gateway backend microservices frontend backend monolith
legacy system, headless SaaS, โฆ. frontend multiple backend systems browser stuff -
Frontend + Backend 1* frontend BFF โจ backend for frontend
backend microservices business logic *data gathering (aka BFF) -
Frontend + Backend 2* frontend *including business logic backend business
logic domain #1 domain #2 domain #3 domain #4 operations shared platform -
Frontend + Backend + Ops frontend you build it, you
run it backend business logic domain #1 domain #2 domain #3 domain #4 operations infrastructure -
๐ 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 โฆ โฆ โฆ โฆ -
๐ 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 โ โฆ โฆ โฆ -
๐ 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 โ โ โฆ โฆ -
โ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 ๐ฉ๐ญ ๐ฆ ๐ฌ -
๐ 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 โ โ ๐คฉ โฆ -
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 -
๐ 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 โ โ ๐คฉ ๐คฉ -
๐ฒ 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 -
๐ 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 โฆ โฆ โฆ โฆ โฆ -
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 -
UI Composition Team Inspire Team Decide Team Checkout Page Fragments
Fragment different micro frontends on one screen if required Source: Micro Frontends in Action -
whatโs a system? loosely coupled to others may consist of
multiple stronger coupled services domain #2 domain #1 -
growing & shrinking low change rate focus shift feature demand
โจ high success -
shrinking 1 team n systems team takes responsibility for a
foreign system -
shrinking 1 team merge system - reduce complexity - works
for similar tech-stacks -
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 -
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 -
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 -
natural growth extract subteam and subsystem new team large team
new system large system -
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 -
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 -
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 -
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 -
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 -
Architecture Principals for Decoupling โ Eventual Consistency โ Asynchronous Communication
โ No Central Coordination -
Tradeoffs Consistency Atomic Eventual Communication Synchronous Asynchronous Coordination Orchestration Choreograph
loose coupling monolith mode -
Tradeoffs Consistency Atomic Eventual Communication Synchronous Asynchronous Coordination Orchestration Choreograph
loose coupling monolith mode -
Tradeoffs Consistency Atomic Eventual Communication Synchronous Asynchronous Coordination Orchestration Choreograph
loose coupling monolith mode -
YouTube: Architecture. The Hard Parts by Neal Ford Book: Software
Architecture - The Hard Parts (O'Reilly) Recommendation โจ Making Sensible Architecture Tradeoffs -
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? -
How does UX work ? in a micro frontends architecture
Who designs user fl ows? What are the tradeoffs? -
UX UX UX How does UX fi t in? UX
top down UX as a service part of the team -
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. -
systems x business technical Structuring (existing) business units along domains.
โจ Not only tech teams. ๐ฌ alignment > less coordination ๐ก validate ideas quickly ๐ faster time to market -
๐ 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 โ โ ๐คฉ ๐คฉ ๐ -
get it at manning.com with code ctwmcrfrontend23 ๐คซ The code
also works for all other books there. Iโve written a book 35% off -
๐ 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 -
How Deep Is Your Micro Frontend? Michael Geers 12. June
2023, Micro Frontends Conference lov e ๐ง