SlideShare a Scribd company logo
1 of 42
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

More Related Content

What's hot

Front end development session1
Front end development session1Front end development session1
Front end development session1marwa 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 KnowPixel Crayons
 
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 2017AmarInfotech
 
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 frameworksSovereign 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 jsFilip Rakowski
 
Full stack web development
Full stack web developmentFull stack web development
Full stack web developmentCrampete
 
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 2022ElenorWisozk
 
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?Pixel Crayons
 
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 appBarcamp Saigon
 
PWA basics for developers
PWA basics for developersPWA basics for developers
PWA basics for developersFilip Rakowski
 
Ppt full stack developer
Ppt full stack developerPpt full stack developer
Ppt full stack developerSudhirVarpe1
 
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 AngularJSAlvaro Sanchez-Mariscal
 

What's hot (19)

Front end development session1
Front end development session1Front end development session1
Front end development session1
 
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 ...
 
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
 
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
 
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
 
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?
 
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
 
Full stack web development
Full stack web developmentFull stack web development
Full stack web development
 
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...
 
Top Frontend Framework 2022
Top Frontend Framework 2022Top Frontend Framework 2022
Top Frontend Framework 2022
 
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?
 
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
 
Lotus Framework
Lotus FrameworkLotus Framework
Lotus Framework
 
PWA basics for developers
PWA basics for developersPWA basics for developers
PWA basics for developers
 
Ppt full stack developer
Ppt full stack developerPpt full stack developer
Ppt full stack developer
 
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...
 
How To be a Backend developer
How To be a Backend developer    How To be a Backend developer
How To be a Backend developer
 
What’s new in LightSwitch 2013?
What’s new in LightSwitch 2013?What’s new in LightSwitch 2013?
What’s new in LightSwitch 2013?
 
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
 

Similar to Micro-Frontends JSVidCon

"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 2012Dmitri 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.pdfKatamaRajuBandigari1
 
MicroFrontends für Microservices
MicroFrontends für MicroservicesMicroFrontends für Microservices
MicroFrontends für MicroservicesComsysto 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 FrameworkSinisa Vukovic
 
Web 2.0 and LiveQuotes Presentation
Web 2.0 and LiveQuotes PresentationWeb 2.0 and LiveQuotes Presentation
Web 2.0 and LiveQuotes PresentationJamie Thingelstad
 
Accelerate your digital transformation
Accelerate your digital transformationAccelerate your digital transformation
Accelerate your digital transformationMichael 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 PatternsVolodymyr 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 DockerEran Stiller
 
Globant development week / Micro frontend
Globant development week / Micro frontendGlobant development week / Micro frontend
Globant development week / Micro frontendGlobant
 
FEVR - Micro Frontend
FEVR - Micro FrontendFEVR - Micro Frontend
FEVR - Micro FrontendMiki 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 EssayLanate 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 RIAsDave Malouf
 

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...
 
CODE IGNITER
CODE IGNITERCODE IGNITER
CODE IGNITER
 
WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012
 
micro-frontends-with-vuejs
micro-frontends-with-vuejsmicro-frontends-with-vuejs
micro-frontends-with-vuejs
 
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
 
MicroFrontends für Microservices
MicroFrontends für MicroservicesMicroFrontends für Microservices
MicroFrontends für Microservices
 
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
 
Web 2.0 and LiveQuotes Presentation
Web 2.0 and LiveQuotes PresentationWeb 2.0 and LiveQuotes Presentation
Web 2.0 and LiveQuotes Presentation
 
Accelerate your digital transformation
Accelerate your digital transformationAccelerate your digital transformation
Accelerate your digital transformation
 
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...
 
Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?
 
Microservices and OSGi: Better together?
Microservices and OSGi: Better together?Microservices and OSGi: Better together?
Microservices and OSGi: Better together?
 
Modern JavaScript Applications: Design Patterns
Modern JavaScript Applications: Design PatternsModern JavaScript Applications: Design Patterns
Modern JavaScript Applications: Design Patterns
 
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...
 
Modern Microservices Architecture with Docker
Modern Microservices Architecture with DockerModern Microservices Architecture with Docker
Modern Microservices Architecture with Docker
 
Globant development week / Micro frontend
Globant development week / Micro frontendGlobant development week / Micro frontend
Globant development week / Micro frontend
 
FEVR - Micro Frontend
FEVR - Micro FrontendFEVR - Micro Frontend
FEVR - Micro Frontend
 
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
 
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
 
MS private cloud
MS private cloudMS private cloud
MS private cloud
 

Recently uploaded

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

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

  1. Hello everyone, and welcome to my talk about micro FE First thing first
  2. 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
  3. 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
  4. Let's understand what is microfrontends Following are few quotes from the micro-frontends.org website and it states
  5. Following are few quotes from the micro-frontends.org website And it states "Extending the microservice idea to frontend development"
  6. 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
  7. NOT NECESSARILY Next: Ok, that's cool, however.. It's frontend right
  8. 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..
  9. The term Micro Frontends first came up in ThoughtWorks Technology Radar at the end of 2016
  10. Parity – achieve end-to-end fullstack team ownership, increased productivity, however it's not always possible nor a correct thing to do
  11. 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..
  12. 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
  13. Not mutually exclusive, the magnitude may vary
  14. The "newer" part of micro-frontends
  15. Next: So, to emphasize..
  16. 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.
  17. ..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
  18. Link – it covers how well popular FW integrate with web components, so do check it out
  19. 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
  20. Ng-app – bundle.js but can use ngx-build-plus instead
  21. Encapsulation vs. Global State – how to interact between micros, share namespaced state and functionality or have it encapsulated and sync/bridge between the two
  22. Encapsulation vs. Global State – how to interact between micros, share namespaced state and functionality or have it encapsulated and sync/bridge between the two
  23. Encapsulation vs. Global State – how to interact between micros, share namespaced state and functionality or have it encapsulated and sync/bridge between the two
  24. 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..
  25. 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
  26. Especially when you lean towards technology agnostic
  27. The more boxes you check, the more likely you are to benefit from micro fe
  28. Alright, that's a wrap! Thank you all for listening, I had a blast Enjoy the rest of the conference, and happy coding