“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You Think It Means

Shem Magnezi
Shem MagneziStaff Full Stack Engineer at WeWrok
Micro Frontends
You Keep Using That Word, I
Don’t Think It Means What You
Think It Means.
Shem Magnezi | @shemag8
@shemag8
Once upon a time in
WeWork, community managers
needed a managing tool
@shemag8
@shemag8
@shemag8
Things started to get bigger
@shemag8
@shemag8
2017
1 Team
~5 Eng
1 PM
2019
~10 Teams
~50 Eng
>5 PMs
@shemag8
At this point we have
2 options
@shemag8
Plan
ahead
Business
as usual
@shemag8
@shemag8
Shem Magnezi
Staff Engineer
@shemag8
@shemag8
This is a common pattern
@shemag8
Let’s frame the problem
@shemag8
#1: High cohesion
@shemag8
#2: Loose coupling
@shemag8
#3: Limited blast radius
@shemag8
#4: Data segregation
@shemag8
#5: Presenting an API
@shemag8
Isn’t it familiar?
@shemag8
Why microservices for front-
end isn’t that simple?
@shemag8
#1: User should feel it’s a single app
@shemag8
#2: Keep bundle size small
@shemag8
#3: Responsive as fast as possible
@shemag8
#4: No standard API
@shemag8
But the concept is somehow
similar
@shemag8
Framework (AKA stiching layer)
Module 1 Module 2 Module 3 Module 4
Core library
Communication
between
modules
Update
modules
Notifications
User’s
session
Shared
components
@shemag8
Your mileage may vary
@shemag8
Questions you want to ask
● Do all teams work on same framework (and
version)?
● Single deploy or independent deploy for each
module?
● Modules should be shared between apps?
● Modules should be loaded dynamically?
● Do we need to support SSR?
● ...
@shemag8
@shemag8
Here we go:
Same framework:
1. NPM Modules
2. Lerna
Multiple frameworks:
3. Web Components
4. App per route
5. IFrames
6. Single SPA
@shemag8
NPM
module1
NPM
module2
App
NPM Modules
● Develop each module
in its own separate
independent repo
● The main app is just
wiring NPM modules
packaged together
@shemag8
Package 1 Package 2
Main Package
Lerna
● Managing versioning
● Managing
dependencies
● Used by Babel, React,
Angular, Jest
@shemag8
<Module 1>
● Technology Agnostic
● The DOM is the API
● Native support by
most browsers
● No shared state
<Module 2>
Plain old HTML (and JS)
Web Components
@shemag8
/package1
● Support SSR
● Each package has its
own dedicated page
● Can be divided into
fragments and not
full pages /package2
API Proxy
App per route
@shemag8
Frame 1
● No heavy lifting or
dependency
complexity
● Complete separation
● Very nostalgic
● Used by Spotify Frame 2
Main app
IFrames
@shemag8
App 1
● Use multiple
frameworks on the
same page
● No refresh
● Lazy load
App 2
single-spa-config
Single SPA
@shemag8
Wait, what about
communication?
@shemag8
Option #1:
State management
@shemag8
Option #2:
Event based communication
dispatchEvent EventEmitter
@shemag8
@shemag8
@shemag8
What's in it for me?
@shemag8
Breaking the monolith is inevitable
@shemag8
You have to plan ahead to scale fast
@shemag8
There isn't one solution
@shemag8
It’s all about your team and
product
@shemag8
@shemag8
Thanks
You can find me at
blog.shem.dev
@shemag8
Resources
● Lerna- http://bit.ly/2VAelIc
● Web Components- http://bit.ly/2PyN5V1
● Single SPA- http://bit.ly/2DB1f3a
● Project Mosaic- http://bit.ly/2ZEdzcu
● IFrames- http://bit.ly/2vse4IE
● Exploring micro-frontends- http://bit.ly/2ZIc8cX
● Micro Frontends - Think Smaller, Avoid the
Monolith Love the Backend- http://bit.ly/2DzB39e
1 of 50

Recommended

Hundreds of Microservices without Breaking Your APIs by
Hundreds of Microservices without Breaking Your APIsHundreds of Microservices without Breaking Your APIs
Hundreds of Microservices without Breaking Your APIsPronovix
212 views26 slides
Magento 2 Integrations: ERPs, APIs, Webhooks & Rabbits! - MageTitansUSA 2016 by
Magento 2 Integrations: ERPs, APIs, Webhooks & Rabbits! - MageTitansUSA 2016Magento 2 Integrations: ERPs, APIs, Webhooks & Rabbits! - MageTitansUSA 2016
Magento 2 Integrations: ERPs, APIs, Webhooks & Rabbits! - MageTitansUSA 2016Joshua Warren
1.2K views53 slides
Integrating react in django while staying sane and happy by
Integrating react in django while staying sane and happyIntegrating react in django while staying sane and happy
Integrating react in django while staying sane and happyFröjd Interactive
1.8K views26 slides
Ups and Downs of Real Projects Based on Magento 2 by
Ups and Downs of Real Projects Based on Magento 2Ups and Downs of Real Projects Based on Magento 2
Ups and Downs of Real Projects Based on Magento 2Max Pronko
957 views22 slides
Laravel ile hızlı ve modern web programlama by
Laravel ile hızlı ve modern web programlamaLaravel ile hızlı ve modern web programlama
Laravel ile hızlı ve modern web programlamaÖmer Çıtak
915 views28 slides
Progressive Web Apps by
Progressive Web AppsProgressive Web Apps
Progressive Web AppsGbolahan Alli
157 views20 slides

More Related Content

What's hot

How to write bad code using C# by
How to write bad code using C#How to write bad code using C#
How to write bad code using C#Wekoslav Stefanovski
1.2K views16 slides
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ... by
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...Shem Magnezi
173 views62 slides
Simple Web Services with PHP by
Simple Web Services with PHPSimple Web Services with PHP
Simple Web Services with PHPJohn Paul Ada
308 views22 slides
MJML API @ Paris API by
MJML API  @ Paris APIMJML API  @ Paris API
MJML API @ Paris APIJulien Ernewein
260 views28 slides
GraphQL - Missing Link In REST by
GraphQL -  Missing Link In RESTGraphQL -  Missing Link In REST
GraphQL - Missing Link In RESTAnubolu Sreekanth
83 views24 slides
Modularizing your android app by
Modularizing your android appModularizing your android app
Modularizing your android appKurt Renzo Acosta
123 views16 slides

What's hot(13)

“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ... by Shem Magnezi
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...
Shem Magnezi173 views
Simple Web Services with PHP by John Paul Ada
Simple Web Services with PHPSimple Web Services with PHP
Simple Web Services with PHP
John Paul Ada308 views
Go Programming Language - Learning The Go Lang way by IndicThreads
Go Programming Language - Learning The Go Lang wayGo Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang way
IndicThreads848 views
Introduction to Lagom Framework by Knoldus Inc.
Introduction to Lagom FrameworkIntroduction to Lagom Framework
Introduction to Lagom Framework
Knoldus Inc.136 views
Going to library with angular by Knoldus Inc.
Going to library with angularGoing to library with angular
Going to library with angular
Knoldus Inc.222 views
Webinar: Draw a line between HTTP/2 client and HTTP Client by Knoldus Inc.
Webinar: Draw a line between HTTP/2 client and HTTP ClientWebinar: Draw a line between HTTP/2 client and HTTP Client
Webinar: Draw a line between HTTP/2 client and HTTP Client
Knoldus Inc.176 views

Similar to “Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You Think It Means

Scmp P & F by
Scmp P & FScmp P & F
Scmp P & FSinarShebl
341 views11 slides
Front end microservices: architectures and solution by
Front end microservices: architectures and solutionFront end microservices: architectures and solution
Front end microservices: architectures and solutionMikhail Kuznetcov
702 views37 slides
Cypress workshop for JSFoo 2019 by
Cypress  workshop for JSFoo 2019Cypress  workshop for JSFoo 2019
Cypress workshop for JSFoo 2019Biswajit Pattanayak
117 views7 slides
Open Source Integration Engines by
Open Source Integration Engines Open Source Integration Engines
Open Source Integration Engines gregorlenz
2.1K views9 slides
Building zing me news feed system by
Building zing me news feed systemBuilding zing me news feed system
Building zing me news feed systemAiTi Education
1.5K views31 slides
Angular 2 by
Angular 2Angular 2
Angular 2Travis van der Font
1K views43 slides

Similar to “Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You Think It Means(20)

Front end microservices: architectures and solution by Mikhail Kuznetcov
Front end microservices: architectures and solutionFront end microservices: architectures and solution
Front end microservices: architectures and solution
Mikhail Kuznetcov702 views
Open Source Integration Engines by gregorlenz
Open Source Integration Engines Open Source Integration Engines
Open Source Integration Engines
gregorlenz2.1K views
Building zing me news feed system by AiTi Education
Building zing me news feed systemBuilding zing me news feed system
Building zing me news feed system
AiTi Education1.5K views
React - The JavaScript Library for User Interfaces by Jumping Bean
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User Interfaces
Jumping Bean628 views
Logi Hacks: Tips & Tricks for Using Info by Logi Analytics
Logi Hacks: Tips & Tricks for Using InfoLogi Hacks: Tips & Tricks for Using Info
Logi Hacks: Tips & Tricks for Using Info
Logi Analytics767 views
Creando microservicios con Java y Microprofile - Nicaragua JUG by César Hernández
Creando microservicios con Java y Microprofile - Nicaragua JUGCreando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUG
César Hernández242 views
Building ZingMe News Feed System by Chau Thanh
Building ZingMe News Feed SystemBuilding ZingMe News Feed System
Building ZingMe News Feed System
Chau Thanh4K views
Headless Magento - Meet Magento Poland 2017 by Sander Mangel
Headless Magento - Meet Magento Poland 2017Headless Magento - Meet Magento Poland 2017
Headless Magento - Meet Magento Poland 2017
Sander Mangel874 views
Madison PHP - Getting Started with Magento 2 by Mathew Beane
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2
Mathew Beane4.7K views
Introduction to Flink Streaming by datamantra
Introduction to Flink StreamingIntroduction to Flink Streaming
Introduction to Flink Streaming
datamantra1.3K views
LKGtoPG - Basics of C Language by lkgtopg jobs
LKGtoPG - Basics of  C LanguageLKGtoPG - Basics of  C Language
LKGtoPG - Basics of C Language
lkgtopg jobs226 views
Automating with operators - FossAsia Summit 2019 by Jorge Morales
Automating with operators - FossAsia Summit 2019Automating with operators - FossAsia Summit 2019
Automating with operators - FossAsia Summit 2019
Jorge Morales672 views
How to boost your workflow, or git rebase for designers by Anton Parkhomenko
How to boost your workflow, or git rebase for designersHow to boost your workflow, or git rebase for designers
How to boost your workflow, or git rebase for designers
Anton Parkhomenko217 views
From shipping rpms to helm charts - Lessons learned and best practices by Ankush Chadha, MBA, MS
From shipping rpms to helm charts - Lessons learned and best practicesFrom shipping rpms to helm charts - Lessons learned and best practices
From shipping rpms to helm charts - Lessons learned and best practices
Frontend Monoliths: Run if you can! by Jonas Bandi
Frontend Monoliths: Run if you can!Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!
Jonas Bandi1K views
Sidiq Permana - Building For The Next Billion Users by Dicoding
Sidiq Permana - Building For The Next Billion UsersSidiq Permana - Building For The Next Billion Users
Sidiq Permana - Building For The Next Billion Users
Dicoding1.6K views

More from Shem Magnezi

The Future of Work(ers) by
The Future of Work(ers)The Future of Work(ers)
The Future of Work(ers)Shem Magnezi
764 views64 slides
Good rules for bad apps by
Good rules for bad appsGood rules for bad apps
Good rules for bad appsShem Magnezi
101 views24 slides
Iterating on your idea by
Iterating on your ideaIterating on your idea
Iterating on your ideaShem Magnezi
349 views46 slides
The Redux State of the Art by
The Redux State of the ArtThe Redux State of the Art
The Redux State of the ArtShem Magnezi
1.3K views31 slides
Startup hackers toolbox by
Startup hackers toolboxStartup hackers toolbox
Startup hackers toolboxShem Magnezi
181 views42 slides
Fuck you startup world by
Fuck you startup worldFuck you startup world
Fuck you startup worldShem Magnezi
1.4K views14 slides

More from Shem Magnezi(14)

The Future of Work(ers) by Shem Magnezi
The Future of Work(ers)The Future of Work(ers)
The Future of Work(ers)
Shem Magnezi764 views
Good rules for bad apps by Shem Magnezi
Good rules for bad appsGood rules for bad apps
Good rules for bad apps
Shem Magnezi101 views
Iterating on your idea by Shem Magnezi
Iterating on your ideaIterating on your idea
Iterating on your idea
Shem Magnezi349 views
The Redux State of the Art by Shem Magnezi
The Redux State of the ArtThe Redux State of the Art
The Redux State of the Art
Shem Magnezi1.3K views
Startup hackers toolbox by Shem Magnezi
Startup hackers toolboxStartup hackers toolbox
Startup hackers toolbox
Shem Magnezi181 views
Fuck you startup world by Shem Magnezi
Fuck you startup worldFuck you startup world
Fuck you startup world
Shem Magnezi1.4K views
Android Developer Toolbox 2017 by Shem Magnezi
Android Developer Toolbox 2017Android Developer Toolbox 2017
Android Developer Toolbox 2017
Shem Magnezi2K views
Good rules for bad apps by Shem Magnezi
Good rules for bad appsGood rules for bad apps
Good rules for bad apps
Shem Magnezi4.1K views
Building android apps with kotlin by Shem Magnezi
Building android apps with kotlinBuilding android apps with kotlin
Building android apps with kotlin
Shem Magnezi495 views
Andriod dev toolbox part 2 by Shem Magnezi
Andriod dev toolbox  part 2Andriod dev toolbox  part 2
Andriod dev toolbox part 2
Shem Magnezi2.9K views
Android dev toolbox by Shem Magnezi
Android dev toolboxAndroid dev toolbox
Android dev toolbox
Shem Magnezi3.1K views
Know what (not) to build by Shem Magnezi
Know what (not) to buildKnow what (not) to build
Know what (not) to build
Shem Magnezi2.8K views
Android ui tips & tricks by Shem Magnezi
Android ui tips & tricksAndroid ui tips & tricks
Android ui tips & tricks
Shem Magnezi4.5K views

Recently uploaded

Unleash The Monkeys by
Unleash The MonkeysUnleash The Monkeys
Unleash The MonkeysJacob Duijzer
7 views28 slides
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)... by
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...Deltares
9 views34 slides
360 graden fabriek by
360 graden fabriek360 graden fabriek
360 graden fabriekinfo33492
24 views25 slides
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...Deltares
11 views23 slides
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...Deltares
9 views32 slides
Winter '24 Release Chat.pdf by
Winter '24 Release Chat.pdfWinter '24 Release Chat.pdf
Winter '24 Release Chat.pdfmelbourneauuser
9 views20 slides

Recently uploaded(20)

DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)... by Deltares
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...
Deltares9 views
360 graden fabriek by info33492
360 graden fabriek360 graden fabriek
360 graden fabriek
info3349224 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares11 views
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by Deltares
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
Deltares9 views
A first look at MariaDB 11.x features and ideas on how to use them by Federico Razzoli
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use them
Federico Razzoli45 views
Tridens DevOps by Tridens
Tridens DevOpsTridens DevOps
Tridens DevOps
Tridens9 views
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema by Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
Deltares17 views
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares9 views
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -... by Deltares
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
Deltares6 views
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... by Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller36 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm13 views
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit... by Deltares
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
Deltares13 views
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut... by HCLSoftware
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...
HCLSoftware6 views
Navigating container technology for enhanced security by Niklas Saari by Metosin Oy
Navigating container technology for enhanced security by Niklas SaariNavigating container technology for enhanced security by Niklas Saari
Navigating container technology for enhanced security by Niklas Saari
Metosin Oy8 views
Advanced API Mocking Techniques by Dimpy Adhikary
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking Techniques
Dimpy Adhikary19 views
Consulting for Data Monetization Maximizing the Profit Potential of Your Data... by Flexsin
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Flexsin 15 views

“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You Think It Means

Editor's Notes

  1. PxWe
  2. One possible solution- Fast forward months/ years: everyone frustrated, starting from scratch is inevitable.
  3. You start with a small app, it’s all nice The product is getting bigger and the single team working on the project is starting to form some structure and patterns The project gets even bigger, the single team that was responsible can’t keep up with the pace of change Code getting bigger exponentially, complexity is too big to manage, code is duplicated all around the place and developers velocity and happiness is low
  4. One of the engineers come up with an amazing idea (usually someone with a server side background): micro-services for front-end! =0
  5. The code is running on the client side, so all the frameworks overhead counts. The user should feel this is a single app The heavy lifting that you do on the server side can’t happen in the client side. Bundle size is an issue, so you want to “reuse” libraries between services, while keeping those isolated There’s no standard API to communicate between apps in the client side.
  6. There are actually a few, but each aims to solve different problems. Thus- before we pick one we need to understand what we want to solve and what are the prerequisites
  7. Do we know that all teams will use the same framework (and same version)? Do we want single deploy for all the app or independent deploy for each module? Do we want to be framework agnostic? Do we want to have modules that can be shared between different apps? Do we want to turn on and off modules? Should it be dynamic? Do we need to support SSR? Automatic tools (flow, CI, testing infra, redux patterns, utils, global apis) VS. Freedom (teams moving at their own speed, choosing their libraries, choosing their stacks, etc)