SlideShare una empresa de Scribd logo
1 de 62
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
@shemag8
/package.json:
"dependencies": {
"@wework/moduleA": "0.1.6",
"@wework/moduleB": "1.1.6",
...
}
index.js:
import ModuleAComp from
'wework/modeulA'
<ModuleAComp />
moduleA/index.js:
export default ModuleAComp;
moduleA/package.json:
{
"name": "@wework/moduleA",
"author": ...
"main": ...,
"version": "0.1.6",
"peerDependencies": {
...
}
}
@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
@shemag8
> lerna init
lerna-repo/
packages/
package-1/
package.json
package-2/
package.json
package.json
lerna.json
@shemag8
Package 1 Package 2
Main Package
Lerna
● Managing versioning
● Managing
dependencies
● Used by Babel, React,
Angular, Jest
@shemag8
<Module 1> <Module 2>
Plain old HTML (and JS)
Web Components
@shemag8
moduleA/fragments.js:
class ModuleA extends HTMLElement {
constructor() {
super();
this.innerHTML = `<button
type="button">Text</button>`;
}
}
window.customElements.define('moduleA',
ModuleA);
page.js:
$app.innerHTML = `
<moduleA id="buy"></moduleA>
`;
index.html:
<!doctype html>
<html lang="en">
<head>
</head>
<body>
<main id="app"></main>
<script src="./page.js" async></script>
<script src="./moduleA/fragments.js"
async></script>
</body>
</html>
@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 /package2
API Proxy
App per route
@shemag8
server {
# Decide which HTML fragment to
insert based on the URL
location /browse {
set $PAGE 'browse';
}
location /order {
set $PAGE 'order';
}
location /profile {
set $PAGE 'profile'
}
error_page 404 /index.html;
}
<html lang="en" dir="ltr">
<body>
<h1>Common code</h1>
<!--# include file="$PAGE.html" -->
</body>
</html>
@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 Frame 2
Main app
IFrames
@shemag8
<html>
<body>
<iframe id="micro-frontend-container"></iframe>
<script type="text/javascript">
const microFrontendsByRoute = {
'/': 'https://browse.example.com/index.html',
'/order-food': 'https://order.example.com/index.html',
'/user-profile': 'https://profile.example.com/index.html',
};
const iframe = document.getElementById('micro-frontend-container');
iframe.src = microFrontendsByRoute[window.location.pathname];
</script>
</body>
</html>
@shemag8
Frame 1
● No heavy lifting or
dependency
complexity
● Complete separation
● Very nostalgic
● Used by Spotify Frame 2
Main app
IFrames
@shemag8
App 1 App 2
single-spa-config
Single SPA
@shemag8
index.html:
<body>
<script
src="config.js"></script>
</body>
config.js:
import * as singleSpa from 'single-spa';
const loadingFunction = () =>
import('./app1/app1.js');
const activityFunction = location =>
location.pathname.startsWith('/app1');
singleSpa.registerApplication('app1',
loadingFunction, activityFunction);
singleSpa.start();
app1/app.js:
export function bootstrap(props) {
return Promise.resolve().then(() => {
domEl =
document.createElement('div');
domEl.id = 'app1';
document.body.appendChild(domEl);
});
}
export function mount(props) {
return Promise.resolve().then(() => {
domEl.textContent = 'App 1 is
mounted!'
});
}
export function unmount(props) {
...
@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 are plenty of options out
there
@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
● Miro FE (by Martin Fowler)- http://bit.ly/2knpmMJ
● 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

Más contenido relacionado

La actualidad más candente

Imagine recap-devhub
Imagine recap-devhubImagine recap-devhub
Imagine recap-devhub
Magento Dev
 

La actualidad más candente (19)

Imagine recap-devhub
Imagine recap-devhubImagine recap-devhub
Imagine recap-devhub
 
Magento 2 Development for PHP Developers
Magento 2 Development for PHP DevelopersMagento 2 Development for PHP Developers
Magento 2 Development for PHP Developers
 
Fitur Terbaru Flutter di Tahun 2021 - Widyarso Joko Purnomo
Fitur Terbaru Flutter di Tahun 2021 - Widyarso Joko PurnomoFitur Terbaru Flutter di Tahun 2021 - Widyarso Joko Purnomo
Fitur Terbaru Flutter di Tahun 2021 - Widyarso Joko Purnomo
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJS
 
Sony lazuardi native mobile app with javascript
Sony lazuardi   native mobile app with javascriptSony lazuardi   native mobile app with javascript
Sony lazuardi native mobile app with javascript
 
Magento 2 Design Patterns
Magento 2 Design PatternsMagento 2 Design Patterns
Magento 2 Design Patterns
 
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
 
Portfolio
PortfolioPortfolio
Portfolio
 
How to build your own Hybrid JS Interface with Android?
How to build your own Hybrid JS Interface with Android?How to build your own Hybrid JS Interface with Android?
How to build your own Hybrid JS Interface with Android?
 
Goodbye JavaScript Hello Blazor
Goodbye JavaScript Hello BlazorGoodbye JavaScript Hello Blazor
Goodbye JavaScript Hello Blazor
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
Magento 2 Modules are Easy!
Magento 2 Modules are Easy!Magento 2 Modules are Easy!
Magento 2 Modules are Easy!
 
How To Install Magento 2 (updated for the latest version)
How To Install Magento 2 (updated for the latest version)How To Install Magento 2 (updated for the latest version)
How To Install Magento 2 (updated for the latest version)
 
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
 
Angular js - 10 reasons to choose angularjs
Angular js - 10 reasons to choose angularjs Angular js - 10 reasons to choose angularjs
Angular js - 10 reasons to choose angularjs
 
Full stack web development
Full stack web developmentFull stack web development
Full stack web development
 
SEO methods in Single Page Applications
SEO methods in Single Page ApplicationsSEO methods in Single Page Applications
SEO methods in Single Page Applications
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development Presentation
 
Blazor - An Introduction
Blazor - An IntroductionBlazor - An Introduction
Blazor - An Introduction
 

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

Codemotion Rome 2016 - Polymer
Codemotion Rome 2016 - PolymerCodemotion Rome 2016 - Polymer
Codemotion Rome 2016 - Polymer
Maurizio Mangione
 

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

“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 ...
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...
 
Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...
Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...
Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...
 
How NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscapeHow NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscape
 
Headless Magento - Meet Magento Poland 2017
Headless Magento - Meet Magento Poland 2017Headless Magento - Meet Magento Poland 2017
Headless Magento - Meet Magento Poland 2017
 
Polymer & PWA: Understanding the “why”
Polymer & PWA: Understanding the “why”Polymer & PWA: Understanding the “why”
Polymer & PWA: Understanding the “why”
 
The state of navigator.register protocolhandler
The state of navigator.register protocolhandlerThe state of navigator.register protocolhandler
The state of navigator.register protocolhandler
 
Creando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUGCreando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUG
 
Neoito — How modern browsers work
Neoito — How modern browsers workNeoito — How modern browsers work
Neoito — How modern browsers work
 
C# and Dot Net Framework 1st & 2nd Unit.pdf
C# and Dot Net Framework 1st & 2nd Unit.pdfC# and Dot Net Framework 1st & 2nd Unit.pdf
C# and Dot Net Framework 1st & 2nd Unit.pdf
 
Ajax
AjaxAjax
Ajax
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
 
Codemotion Rome 2016 - Polymer
Codemotion Rome 2016 - PolymerCodemotion Rome 2016 - Polymer
Codemotion Rome 2016 - Polymer
 
Polymer is production ready, how about you?
Polymer is production ready, how about you?Polymer is production ready, how about you?
Polymer is production ready, how about you?
 
Testing with Codeception
Testing with CodeceptionTesting with Codeception
Testing with Codeception
 
What's New and Newer in Apache httpd-24
What's New and Newer in Apache httpd-24What's New and Newer in Apache httpd-24
What's New and Newer in Apache httpd-24
 
Open Social Summit Korea
Open Social Summit KoreaOpen Social Summit Korea
Open Social Summit Korea
 
Thadomal IEEE-HTML5-Workshop
Thadomal IEEE-HTML5-WorkshopThadomal IEEE-HTML5-Workshop
Thadomal IEEE-HTML5-Workshop
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
Automating with operators - FossAsia Summit 2019
Automating with operators - FossAsia Summit 2019Automating with operators - FossAsia Summit 2019
Automating with operators - FossAsia Summit 2019
 
You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)
 

Más de Shem Magnezi

Más de Shem Magnezi (14)

The Future of Work(ers)
The Future of Work(ers)The Future of Work(ers)
The Future of Work(ers)
 
Good rules for bad apps
Good rules for bad appsGood rules for bad apps
Good rules for bad apps
 
Iterating on your idea
Iterating on your ideaIterating on your idea
Iterating on your idea
 
The Redux State of the Art
The Redux State of the ArtThe Redux State of the Art
The Redux State of the Art
 
Startup hackers toolbox
Startup hackers toolboxStartup hackers toolbox
Startup hackers toolbox
 
Fuck you startup world
Fuck you startup worldFuck you startup world
Fuck you startup world
 
The Future of Work
The Future of WorkThe Future of Work
The Future of Work
 
Android Developer Toolbox 2017
Android Developer Toolbox 2017Android Developer Toolbox 2017
Android Developer Toolbox 2017
 
Good rules for bad apps
Good rules for bad appsGood rules for bad apps
Good rules for bad apps
 
Building android apps with kotlin
Building android apps with kotlinBuilding android apps with kotlin
Building android apps with kotlin
 
Andriod dev toolbox part 2
Andriod dev toolbox  part 2Andriod dev toolbox  part 2
Andriod dev toolbox part 2
 
Android dev toolbox
Android dev toolboxAndroid dev toolbox
Android dev toolbox
 
Know what (not) to build
Know what (not) to buildKnow what (not) to build
Know what (not) to build
 
Android ui tips & tricks
Android ui tips & tricksAndroid ui tips & tricks
Android ui tips & tricks
 

Último

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Último (20)

%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

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

Notas del editor

  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)
  8. Use peerDependencies
  9. Use peerDependencies
  10. Use peerDependencies
  11. Use peerDependencies
  12. Use peerDependencies
  13. Use peerDependencies