SlideShare a Scribd company logo
Micro Frontends
Myth or Reality?
Amir Zuker
Senior Software Architect
Founder, Web Division Leader
Twitter: @AmirZuker
About Me
2
Amir Zuker
 Senior software architect, instructor, speaker and developer
 Over 20 years of experience in the field
 Designed and developed various systems, both backend and frontend
 Mentored and lead large teams and R&D divisions
 Publications
 Book: HandsOn Full-Stack Web Development with ASP.NET Core
 Open source: WCF Contrib
 WCF Microsoft Official Curriculum (MOC)
 Leads the WEB division at CodeValue
The Idea of Micro Frontends
3
4
What is
Micro Frontends?
5
"Extending the microservice idea
to frontend development"
https://micro-frontends.org/
Microservices
 A vast subject
 Out of scope
 In relevance to this talk
 Decompose the monolith to smaller parts
 Each part is independently managed, versioned and deployed
 Tailor parts together to form features
 And well.. polyglot
6
7
"Web app as a composition of
features which are owned by
independent teams.
..using different JavaScript
frameworks"
https://micro-frontends.org/
not necessarily
Why though? It's Frontend!
 It normally boils down to the same technology (JavaScript mostly)
 It all runs in the same host and process (browser mostly)
 It's.. well.. UI!
8
9
The bigger you are
and more versatile and
agile you need to be..
The more likely you are
to benefit from micro-frontends
Not an Entirely New Concept
 Having small parts which are managed independently
 ..plugged into the entire app
 ..able to integrate and interact
 Not a new concept
 Composite or Widget-based Apps
 Facebook
 WordPress
 SharePoint
10
Let's Get Practical
11
12
Decompose, How?
Decomposition Strategies
 There are various ways to decompose apps
 Functional feature-based verticality
 Domain driven and business concerns
 Organizational, team structure and responsibility
 Can consider some parity with the backend
 It really depends
13
App Svc1 Svc2
Decomposition
 Effective decomposition is crucial
 Beware of the Big Ball of Mud (BBOM)
 A "distributed monolith" in backend semantics
 Difficult to get it completely right
 Observe and change accordingly
14
15
Checkout
Exploration
Decompose
Apps
16
Let's Get Technical
No Single Truth
 There are always multiple ways to achieve your goal
 Essentially, determine the shared foundation for integration
 Key approaches
 Technology agnostic
 Technology specific
 A big spectrum in between
17
Technology Agnostic
 "New" interoperable standards have solidified
 Web Components!
 Basically, leverage the HTML DOM as the shared foundation
 Custom Elements
 Input and Events
 More complex
 Requires higher discipline
18
HTML DOM
JS, TS
Core SDK
Micro
App
Micro
App
Micro
App
19
Custom Elements
<shell>
<exploration-category-page category="art">
<checkout-offerings id="232">
offerElem.addEventListener(
'selected',
() => { … });
Input
Events
Technology Specific
 Expand the shared foundation
 Settle on a specific set of additional frameworks
 Manage it across teams and products
 Easier when applicable
 Less flexible
20
HTML DOM
JS, TS
Vue.js, Vuex, Vue Router
Core SDK
Micro App Micro App Micro App
21
Wait, does it mean that my Vue apps,
split into separate packages which are
independently managed and integrated..
Technically, in a sense, YES!
AM I DOING MICRO FRONTENDS?
Demo
Custom Element
22
Writing Web Components
 Controversial
 Can be tedious and convoluted
 Don't have to implement web components directly
 Higher level frameworks still provide incredible value
 Going with web components is not a problem free path
 Prefer to register components quickly
 Shadow DOM and theme-ability
 Server-side rendering (web components are a browser phenomenon)
 Accessibility
 SEO
23
Frameworks and Custom Elements
 Can be built using several frameworks, e.g. –
 Vue CLI Build Target / vue-web-component-wrapper / vue-custom-element
 Svelte 'customElement' compiler option
 Angular Elements
 Stencil
 Polymer
 Etc.
 Check integrability of frameworks with custom elements
 https://custom-elements-everywhere.com/
24
Which? It Depends
25
x50
Demo
micro-frontends
26
But Wait, There's More
27
Crosscutting Concerns
 Data and State
 Separate / Namespaced / Shared
 Events BUS
 Routing and Links
 Internationalization
 Network
 Logging
 Error Handling
 Dialogs
28
 Busy / Spinner
 Undo / Redo
 Notifications
 Configuration
 AUTH
 Theming
 Responsiveness
 Style Guide
 Storage and cookies
 Etc..
Crosscutting Concerns
 Data and State
 Separate / Namespaced / Shared
 Events BUS
 Routing and Links
 Internationalization
 Network
 Logging
 Error Handling
 Dialogs
29
 Busy / Spinner
 Undo / Redo
 Notifications
 Configuration
 AUTH
 Theming
 Responsiveness
 Style Guide
 Storage and cookies
 Etc..
Core SDK (shared code)
 Keep it minimal and as needed
 Try to keep it on top of the chosen foundation
 HTML DOM or Frameworks
 Creates a technical debt
 Requires proper management and mandate control
30
Code Splitting
 Size matters in Web
 The more frameworks and code, the bigger the assets
 Consider effective..
 Tree-shaking
 Lazy loading
 Preloading
 Invest in code splitting enabler patterns and pick the right tools
 E.g. Webpack externals / Webpack module federation / Rollup for micro parts /
Webpack for shell / etc.
31
Encapsulation Isolation
 Micro apps still run in the same host (browser window)
 Think about different framework versions
 Require true isolation?
 Consider <iframe> and window.postMessage
 Caveats
 Integration is more complex
 More so in case of intertwined micro apps
 Shared assets can be downloaded multiple times
 Seamless UX is difficult
32
Server-side Rendering
 Working with <iframe> can get you there
 However, has its drawbacks
 Consider server-side includes (web server feature)
 Or other edge-side include (ESI) enabler frameworks
 E.g. Tailor, nodesi, ESI, compoxure
33
<checkout-offerings id="232">
<!--#include virtual="/checkout/offerrings?id=232" -->
</checkout-offerings>
Productivity
 Productivity is paramount
 Process, Collaboration, Integration, Sharing, Testing and Distribution
 Care about..
 Feature flags
 Repo management, methodologies and tools
 Test and Automation
 Showcases
 Self executable micro apps
 Versioning
 Releases
 DevOps
34
You're Not Alone
 Tools and frameworks can help of course
 Project Mosaic
 https://www.mosaic9.org/
 Single-SPA
 https://single-spa.js.org/
35
36
Micro Frontends
Comes at a cost..
37
Micro Frontends
Don't blindly ride hype trains
38
Micro Frontends
Do what is right for you..
Ask Yourself..
 Do you have an excessively large or multiple frontend products?
 Do you need to scale and effectively manage dozens of developers?
 Do you require high agility and versatility in your frontend products?
 Do you need to support flexible pluggability (widget / micro-apps style)
 Are you willing to invest and adjust?
 Organization-wise, process, development, ecosystem, DevOps pipelines, etc.
39
41
Micro Frontends
It's a journey..
Resources
 WebComponents.org
 https://www.webcomponents.org/
 Micro-Frontends.org
 https://micro-frontends.org/
 Integrability of frameworks with custom elements
 https://custom-elements-everywhere.com/
 Project Mosaic
 https://www.mosaic9.org/
 Single SPA
 https://single-spa.js.org/
 Demos
 https://github.com/azuker/micro-frontends
42
Amir Zuker
Senior Software Architect
Founder, Web Division Leader
Twitter: @AmirZuker
Ad

More Related Content

What's hot (19)

Front end development session1
Front end development session1Front end development session1
Front end development session1
marwa Ayad Mohamed
 
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
Prasid Pathak
 
Top Web Development Frameworks Comparison: All You Need To Know
Top Web Development Frameworks Comparison: All You Need To KnowTop Web Development Frameworks Comparison: All You Need To Know
Top Web Development Frameworks Comparison: All You Need To Know
PixelCrayons
 
Latest Javascript MVC & Front End Frameworks 2017
Latest Javascript MVC & Front End Frameworks 2017Latest Javascript MVC & Front End Frameworks 2017
Latest Javascript MVC & Front End Frameworks 2017
AmarInfotech
 
Top front end website development tools and frameworks
Top front end website development tools and frameworksTop front end website development tools and frameworks
Top front end website development tools and frameworks
Sovereign software solution
 
Front end developer responsibilities what does a front-end developer do?
Front end developer responsibilities  what does a front-end developer do?Front end developer responsibilities  what does a front-end developer do?
Front end developer responsibilities what does a front-end developer do?
Katy Slemon
 
Performance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern jsPerformance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern js
Filip Rakowski
 
Full stack web development
Full stack web developmentFull stack web development
Full stack web development
Crampete
 
Top 10 open source technologies for enterprise/Business web application devel...
Top 10 open source technologies for enterprise/Business web application devel...Top 10 open source technologies for enterprise/Business web application devel...
Top 10 open source technologies for enterprise/Business web application devel...
Techcronus Business Solutions Pvt. Ltd.
 
Top Frontend Framework 2022
Top Frontend Framework 2022Top Frontend Framework 2022
Top Frontend Framework 2022
ElenorWisozk
 
ReactJS vs Vue.js — What to choose in 2019?
ReactJS vs Vue.js — What to choose in 2019?ReactJS vs Vue.js — What to choose in 2019?
ReactJS vs Vue.js — What to choose in 2019?
PixelCrayons
 
Zero cost serverless Real time web app
Zero cost serverless Real time web appZero cost serverless Real time web app
Zero cost serverless Real time web app
Barcamp Saigon
 
Lotus Framework
Lotus FrameworkLotus Framework
Lotus Framework
Todi Adiyatmo
 
PWA basics for developers
PWA basics for developersPWA basics for developers
PWA basics for developers
Filip Rakowski
 
Ppt full stack developer
Ppt full stack developerPpt full stack developer
Ppt full stack developer
SudhirVarpe1
 
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
Edureka!
 
How To be a Backend developer
How To be a Backend developer    How To be a Backend developer
How To be a Backend developer
Ramy Hakam
 
What’s new in LightSwitch 2013?
What’s new in LightSwitch 2013?What’s new in LightSwitch 2013?
What’s new in LightSwitch 2013?
Robert MacLean
 
Developing SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJSDeveloping SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJS
Alvaro Sanchez-Mariscal
 
Front end development session1
Front end development session1Front end development session1
Front end development session1
marwa Ayad Mohamed
 
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
Prasid Pathak
 
Top Web Development Frameworks Comparison: All You Need To Know
Top Web Development Frameworks Comparison: All You Need To KnowTop Web Development Frameworks Comparison: All You Need To Know
Top Web Development Frameworks Comparison: All You Need To Know
PixelCrayons
 
Latest Javascript MVC & Front End Frameworks 2017
Latest Javascript MVC & Front End Frameworks 2017Latest Javascript MVC & Front End Frameworks 2017
Latest Javascript MVC & Front End Frameworks 2017
AmarInfotech
 
Top front end website development tools and frameworks
Top front end website development tools and frameworksTop front end website development tools and frameworks
Top front end website development tools and frameworks
Sovereign software solution
 
Front end developer responsibilities what does a front-end developer do?
Front end developer responsibilities  what does a front-end developer do?Front end developer responsibilities  what does a front-end developer do?
Front end developer responsibilities what does a front-end developer do?
Katy Slemon
 
Performance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern jsPerformance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern js
Filip Rakowski
 
Full stack web development
Full stack web developmentFull stack web development
Full stack web development
Crampete
 
Top 10 open source technologies for enterprise/Business web application devel...
Top 10 open source technologies for enterprise/Business web application devel...Top 10 open source technologies for enterprise/Business web application devel...
Top 10 open source technologies for enterprise/Business web application devel...
Techcronus Business Solutions Pvt. Ltd.
 
Top Frontend Framework 2022
Top Frontend Framework 2022Top Frontend Framework 2022
Top Frontend Framework 2022
ElenorWisozk
 
ReactJS vs Vue.js — What to choose in 2019?
ReactJS vs Vue.js — What to choose in 2019?ReactJS vs Vue.js — What to choose in 2019?
ReactJS vs Vue.js — What to choose in 2019?
PixelCrayons
 
Zero cost serverless Real time web app
Zero cost serverless Real time web appZero cost serverless Real time web app
Zero cost serverless Real time web app
Barcamp Saigon
 
PWA basics for developers
PWA basics for developersPWA basics for developers
PWA basics for developers
Filip Rakowski
 
Ppt full stack developer
Ppt full stack developerPpt full stack developer
Ppt full stack developer
SudhirVarpe1
 
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
Edureka!
 
How To be a Backend developer
How To be a Backend developer    How To be a Backend developer
How To be a Backend developer
Ramy Hakam
 
What’s new in LightSwitch 2013?
What’s new in LightSwitch 2013?What’s new in LightSwitch 2013?
What’s new in LightSwitch 2013?
Robert MacLean
 
Developing SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJSDeveloping SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJS
Alvaro Sanchez-Mariscal
 

Similar to Micro-Frontends JSVidCon (20)

"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Fwdays
 
CODE IGNITER
CODE IGNITERCODE IGNITER
CODE IGNITER
Yesha kapadia
 
WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012
Dmitri Artamonov
 
micro-frontends-with-vuejs
micro-frontends-with-vuejsmicro-frontends-with-vuejs
micro-frontends-with-vuejs
Oleksandr Tserkovnyi
 
Scaling frontend applications with micro-frontends Presentation.pdf
Scaling frontend applications with micro-frontends Presentation.pdfScaling frontend applications with micro-frontends Presentation.pdf
Scaling frontend applications with micro-frontends Presentation.pdf
KatamaRajuBandigari1
 
MicroFrontends für Microservices
MicroFrontends für MicroservicesMicroFrontends für Microservices
MicroFrontends für Microservices
Comsysto Reply GmbH
 
Development of Multiplatform CMS System with Zend Framework
Development of Multiplatform CMS System with Zend FrameworkDevelopment of Multiplatform CMS System with Zend Framework
Development of Multiplatform CMS System with Zend Framework
Sinisa Vukovic
 
Web 2.0 and LiveQuotes Presentation
Web 2.0 and LiveQuotes PresentationWeb 2.0 and LiveQuotes Presentation
Web 2.0 and LiveQuotes Presentation
Jamie Thingelstad
 
Accelerate your digital transformation
Accelerate your digital transformationAccelerate your digital transformation
Accelerate your digital transformation
Michael Dawson
 
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
Katy Slemon
 
Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?
Phil Estes
 
Microservices and OSGi: Better together?
Microservices and OSGi: Better together?Microservices and OSGi: Better together?
Microservices and OSGi: Better together?
Graham Charters
 
Modern JavaScript Applications: Design Patterns
Modern JavaScript Applications: Design PatternsModern JavaScript Applications: Design Patterns
Modern JavaScript Applications: Design Patterns
Volodymyr Voytyshyn
 
Building reusable components as micro frontends with glimmer js and webcompo...
Building reusable components as micro frontends  with glimmer js and webcompo...Building reusable components as micro frontends  with glimmer js and webcompo...
Building reusable components as micro frontends with glimmer js and webcompo...
Andrei Sebastian Cîmpean
 
Modern Microservices Architecture with Docker
Modern Microservices Architecture with DockerModern Microservices Architecture with Docker
Modern Microservices Architecture with Docker
Eran Stiller
 
Globant development week / Micro frontend
Globant development week / Micro frontendGlobant development week / Micro frontend
Globant development week / Micro frontend
Globant
 
FEVR - Micro Frontend
FEVR - Micro FrontendFEVR - Micro Frontend
FEVR - Micro Frontend
Miki Lombardi
 
A Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayA Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing Essay
Lanate Drummond
 
Designing Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAsDesigning Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAs
Dave Malouf
 
MS private cloud
MS private cloudMS private cloud
MS private cloud
Rateb Abu Hawieleh
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Fwdays
 
WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012
Dmitri Artamonov
 
Scaling frontend applications with micro-frontends Presentation.pdf
Scaling frontend applications with micro-frontends Presentation.pdfScaling frontend applications with micro-frontends Presentation.pdf
Scaling frontend applications with micro-frontends Presentation.pdf
KatamaRajuBandigari1
 
MicroFrontends für Microservices
MicroFrontends für MicroservicesMicroFrontends für Microservices
MicroFrontends für Microservices
Comsysto Reply GmbH
 
Development of Multiplatform CMS System with Zend Framework
Development of Multiplatform CMS System with Zend FrameworkDevelopment of Multiplatform CMS System with Zend Framework
Development of Multiplatform CMS System with Zend Framework
Sinisa Vukovic
 
Web 2.0 and LiveQuotes Presentation
Web 2.0 and LiveQuotes PresentationWeb 2.0 and LiveQuotes Presentation
Web 2.0 and LiveQuotes Presentation
Jamie Thingelstad
 
Accelerate your digital transformation
Accelerate your digital transformationAccelerate your digital transformation
Accelerate your digital transformation
Michael Dawson
 
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
Katy Slemon
 
Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?
Phil Estes
 
Microservices and OSGi: Better together?
Microservices and OSGi: Better together?Microservices and OSGi: Better together?
Microservices and OSGi: Better together?
Graham Charters
 
Modern JavaScript Applications: Design Patterns
Modern JavaScript Applications: Design PatternsModern JavaScript Applications: Design Patterns
Modern JavaScript Applications: Design Patterns
Volodymyr Voytyshyn
 
Building reusable components as micro frontends with glimmer js and webcompo...
Building reusable components as micro frontends  with glimmer js and webcompo...Building reusable components as micro frontends  with glimmer js and webcompo...
Building reusable components as micro frontends with glimmer js and webcompo...
Andrei Sebastian Cîmpean
 
Modern Microservices Architecture with Docker
Modern Microservices Architecture with DockerModern Microservices Architecture with Docker
Modern Microservices Architecture with Docker
Eran Stiller
 
Globant development week / Micro frontend
Globant development week / Micro frontendGlobant development week / Micro frontend
Globant development week / Micro frontend
Globant
 
FEVR - Micro Frontend
FEVR - Micro FrontendFEVR - Micro Frontend
FEVR - Micro Frontend
Miki Lombardi
 
A Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayA Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing Essay
Lanate Drummond
 
Designing Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAsDesigning Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAs
Dave Malouf
 
Ad

Recently uploaded (20)

AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Buckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug LogsBuckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug Logs
Lynda Kane
 
Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.
gregtap1
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Salesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docxSalesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docx
José Enrique López Rivera
 
Learn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step GuideLearn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step Guide
Marcel David
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Buckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug LogsBuckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug Logs
Lynda Kane
 
Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.Network Security. Different aspects of Network Security.
Network Security. Different aspects of Network Security.
gregtap1
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Salesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docxSalesforce AI Associate 2 of 2 Certification.docx
Salesforce AI Associate 2 of 2 Certification.docx
José Enrique López Rivera
 
Learn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step GuideLearn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step Guide
Marcel David
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Ad

Micro-Frontends JSVidCon

  • 1. Micro Frontends Myth or Reality? Amir Zuker Senior Software Architect Founder, Web Division Leader Twitter: @AmirZuker
  • 2. About Me 2 Amir Zuker  Senior software architect, instructor, speaker and developer  Over 20 years of experience in the field  Designed and developed various systems, both backend and frontend  Mentored and lead large teams and R&D divisions  Publications  Book: HandsOn Full-Stack Web Development with ASP.NET Core  Open source: WCF Contrib  WCF Microsoft Official Curriculum (MOC)  Leads the WEB division at CodeValue
  • 3. The Idea of Micro Frontends 3
  • 5. 5 "Extending the microservice idea to frontend development" https://micro-frontends.org/
  • 6. Microservices  A vast subject  Out of scope  In relevance to this talk  Decompose the monolith to smaller parts  Each part is independently managed, versioned and deployed  Tailor parts together to form features  And well.. polyglot 6
  • 7. 7 "Web app as a composition of features which are owned by independent teams. ..using different JavaScript frameworks" https://micro-frontends.org/ not necessarily
  • 8. Why though? It's Frontend!  It normally boils down to the same technology (JavaScript mostly)  It all runs in the same host and process (browser mostly)  It's.. well.. UI! 8
  • 9. 9 The bigger you are and more versatile and agile you need to be.. The more likely you are to benefit from micro-frontends
  • 10. Not an Entirely New Concept  Having small parts which are managed independently  ..plugged into the entire app  ..able to integrate and interact  Not a new concept  Composite or Widget-based Apps  Facebook  WordPress  SharePoint 10
  • 13. Decomposition Strategies  There are various ways to decompose apps  Functional feature-based verticality  Domain driven and business concerns  Organizational, team structure and responsibility  Can consider some parity with the backend  It really depends 13 App Svc1 Svc2
  • 14. Decomposition  Effective decomposition is crucial  Beware of the Big Ball of Mud (BBOM)  A "distributed monolith" in backend semantics  Difficult to get it completely right  Observe and change accordingly 14
  • 17. No Single Truth  There are always multiple ways to achieve your goal  Essentially, determine the shared foundation for integration  Key approaches  Technology agnostic  Technology specific  A big spectrum in between 17
  • 18. Technology Agnostic  "New" interoperable standards have solidified  Web Components!  Basically, leverage the HTML DOM as the shared foundation  Custom Elements  Input and Events  More complex  Requires higher discipline 18 HTML DOM JS, TS Core SDK Micro App Micro App Micro App
  • 19. 19 Custom Elements <shell> <exploration-category-page category="art"> <checkout-offerings id="232"> offerElem.addEventListener( 'selected', () => { … }); Input Events
  • 20. Technology Specific  Expand the shared foundation  Settle on a specific set of additional frameworks  Manage it across teams and products  Easier when applicable  Less flexible 20 HTML DOM JS, TS Vue.js, Vuex, Vue Router Core SDK Micro App Micro App Micro App
  • 21. 21 Wait, does it mean that my Vue apps, split into separate packages which are independently managed and integrated.. Technically, in a sense, YES! AM I DOING MICRO FRONTENDS?
  • 23. Writing Web Components  Controversial  Can be tedious and convoluted  Don't have to implement web components directly  Higher level frameworks still provide incredible value  Going with web components is not a problem free path  Prefer to register components quickly  Shadow DOM and theme-ability  Server-side rendering (web components are a browser phenomenon)  Accessibility  SEO 23
  • 24. Frameworks and Custom Elements  Can be built using several frameworks, e.g. –  Vue CLI Build Target / vue-web-component-wrapper / vue-custom-element  Svelte 'customElement' compiler option  Angular Elements  Stencil  Polymer  Etc.  Check integrability of frameworks with custom elements  https://custom-elements-everywhere.com/ 24
  • 27. But Wait, There's More 27
  • 28. Crosscutting Concerns  Data and State  Separate / Namespaced / Shared  Events BUS  Routing and Links  Internationalization  Network  Logging  Error Handling  Dialogs 28  Busy / Spinner  Undo / Redo  Notifications  Configuration  AUTH  Theming  Responsiveness  Style Guide  Storage and cookies  Etc..
  • 29. Crosscutting Concerns  Data and State  Separate / Namespaced / Shared  Events BUS  Routing and Links  Internationalization  Network  Logging  Error Handling  Dialogs 29  Busy / Spinner  Undo / Redo  Notifications  Configuration  AUTH  Theming  Responsiveness  Style Guide  Storage and cookies  Etc..
  • 30. Core SDK (shared code)  Keep it minimal and as needed  Try to keep it on top of the chosen foundation  HTML DOM or Frameworks  Creates a technical debt  Requires proper management and mandate control 30
  • 31. Code Splitting  Size matters in Web  The more frameworks and code, the bigger the assets  Consider effective..  Tree-shaking  Lazy loading  Preloading  Invest in code splitting enabler patterns and pick the right tools  E.g. Webpack externals / Webpack module federation / Rollup for micro parts / Webpack for shell / etc. 31
  • 32. Encapsulation Isolation  Micro apps still run in the same host (browser window)  Think about different framework versions  Require true isolation?  Consider <iframe> and window.postMessage  Caveats  Integration is more complex  More so in case of intertwined micro apps  Shared assets can be downloaded multiple times  Seamless UX is difficult 32
  • 33. Server-side Rendering  Working with <iframe> can get you there  However, has its drawbacks  Consider server-side includes (web server feature)  Or other edge-side include (ESI) enabler frameworks  E.g. Tailor, nodesi, ESI, compoxure 33 <checkout-offerings id="232"> <!--#include virtual="/checkout/offerrings?id=232" --> </checkout-offerings>
  • 34. Productivity  Productivity is paramount  Process, Collaboration, Integration, Sharing, Testing and Distribution  Care about..  Feature flags  Repo management, methodologies and tools  Test and Automation  Showcases  Self executable micro apps  Versioning  Releases  DevOps 34
  • 35. You're Not Alone  Tools and frameworks can help of course  Project Mosaic  https://www.mosaic9.org/  Single-SPA  https://single-spa.js.org/ 35
  • 38. 38 Micro Frontends Do what is right for you..
  • 39. Ask Yourself..  Do you have an excessively large or multiple frontend products?  Do you need to scale and effectively manage dozens of developers?  Do you require high agility and versatility in your frontend products?  Do you need to support flexible pluggability (widget / micro-apps style)  Are you willing to invest and adjust?  Organization-wise, process, development, ecosystem, DevOps pipelines, etc. 39
  • 41. Resources  WebComponents.org  https://www.webcomponents.org/  Micro-Frontends.org  https://micro-frontends.org/  Integrability of frameworks with custom elements  https://custom-elements-everywhere.com/  Project Mosaic  https://www.mosaic9.org/  Single SPA  https://single-spa.js.org/  Demos  https://github.com/azuker/micro-frontends 42
  • 42. Amir Zuker Senior Software Architect Founder, Web Division Leader Twitter: @AmirZuker

Editor's Notes

  • #2: Hello everyone, and welcome to my talk about micro FE First thing first
  • #3: My name is Amir Zuker I'm a senior software architect from CodeValue where I lead its Web Divison End: So that's enough about me, let's begin. Next: Let's start with a little theory
  • #4: Prev: Let's start with a little theory ..in order to grasp the idea of micro frontends When I talk about micro FE in these upcoming slides, it's about the architecture style, the concept Next: To do that
  • #5: Let's understand what is microfrontends Following are few quotes from the micro-frontends.org website and it states
  • #6: Following are few quotes from the micro-frontends.org website And it states "Extending the microservice idea to frontend development"
  • #7: Polyglot – the flexibility of choosing different technologies as needed. We should still consolidate technologies and be sensible about it But it's about having that ability
  • #8: NOT NECESSARILY Next: Ok, that's cool, however.. It's frontend right
  • #9: UI - Not a distributed system, should execute as a single block the user interacts with Next: Be that as it may, there are benefits to using a micro-frontends architecture. In essence..
  • #11: The term Micro Frontends first came up in ThoughtWorks Technology Radar at the end of 2016
  • #14: Parity – achieve end-to-end fullstack team ownership, increased productivity, however it's not always possible nor a correct thing to do
  • #15: Effective.. If you do it improperly, you can get the counter effect where productivity is compromised. You might end up in a situation that resembles the BBOM, Where parts are not cohesive and everything is tightly coupled, and changing one area requires changing everything else ..Difficult Next: As an example..
  • #16: Assume you have a shop The user can browse through products, read the description, and so on Then there are the list of prices where the user can add to the cart and buy products A super basic example Just to convey the overall idea
  • #18: Not mutually exclusive, the magnitude may vary
  • #19: The "newer" part of micro-frontends
  • #21: Next: So, to emphasize..
  • #22: If you have 2 apps and extract reused bits to a separate package, or simply separate parts to separate modules, that's not really micro fe It depends on how you decentralize the app to smaller parts, how autonomous they truly are, how effective you manage the integration in between, and how you release the software.
  • #24: ..And everything around having to register the web components as quickly as possible Expect a bumpy road and plan for it --- Register quickly – UI is not shown, SSR suffers, SEO crawlers, time to first meaningful paint is decreased, UI waits for JS to load and execute
  • #25: Link – it covers how well popular FW integrate with web components, so do check it out
  • #26: So.. You need to make choices. It very much depends and mileage may vary. Let's agree on the 2 edges: The smaller you are, let's say 1 dev 1 app, you would probably not do micro fe altogether If you get a bit bigger, you might want to consider incorporating micro fe, probably towards technology specific And if you reach higher dimensions, have several divisions, hundreds of developers, dozens of apps, you might lean towards technology agnostic These are not mutually exclusive, E.g. add vue.js to the shared foundation but remain agnostic in terms of state management Do what is right for you
  • #27: Ng-app – bundle.js but can use ngx-build-plus instead
  • #29: Encapsulation vs. Global State – how to interact between micros, share namespaced state and functionality or have it encapsulated and sync/bridge between the two
  • #30: Encapsulation vs. Global State – how to interact between micros, share namespaced state and functionality or have it encapsulated and sync/bridge between the two
  • #31: Encapsulation vs. Global State – how to interact between micros, share namespaced state and functionality or have it encapsulated and sync/bridge between the two
  • #34: Can use server-side includes, a feature of the browser and web server. When the browser meets such a comment, it makes a request to the URL and renders the output into that section. Alternatively, you can use other ESI tools. Note that if you bring web components into the mix, you might experience additional complexities when it comes to server side rendering. Next: last but not least..
  • #35: If the productivity is compromised – it kind of defeats the point It spans over just development.. The application lifecycle management, how you collaborate, integrate, share, test and distribute code. How can you turn features on/off, AB testing, dynamic packaging How do you manage the codebase, repos, and build tools to do that How you test each part and everything together How you showcase every part and able to execute it individually How you version, know of what changed, and release And of course, integrate everything into the devops pipelines End: it's okay to do it gradually and not wait until everything is perfect But do invest time in doing so End: You should note that you're not alone
  • #37: Especially when you lean towards technology agnostic
  • #40: The more boxes you check, the more likely you are to benefit from micro fe
  • #44: Alright, that's a wrap! Thank you all for listening, I had a blast Enjoy the rest of the conference, and happy coding