SlideShare a Scribd company logo
Micro
frontends
Ran Wahle
About Me
Ran Wahle
Full Stack
developer at Tikal
About Me
Ran Wahle
Volunteer
Are
Microfrontends
This, on client?
Micro frontends
One App Multiple modules
Micro frontends
One App
Different CI/CD
Different teams
Maybe different tech stack
Micro frontends
Shell
Module Module Module
Today I’ll deal with
dirty laundry
Our app - Manage our
laundry
Total isolation between apps
Requirements
Client Server
Client Server
Client Server
Client Server
SPA user experience
Requirements
Shell
Good developer experience
Requirements
Client Server
Why not iframe
Bad publicity
Why not iframe
Too isolated
Why not iframe
Browser limitations
Why not iframe
Different history states
Why iframe?
Iframe way of remote
import fetch(url).then((response) =>
response.text()).then((html: string) => {
loadContentIntoFrame()
})
Iframe way of
remote import
const doc = document.implementation.createHTMLDocument();
doc.documentElement.innerHTML = appHTML;
const base = doc.createElement('base');
base.href = getHref();
doc.head.insertBefore(base,
doc.head.firstElementChild);
if (iframe.contentDocument && iframe.contentWindow) {
iframe.contentDocument.open();
iframe.contentDocument.write(doc.documentElement.innerHTML
);
iframe.contentDocument.close();
}
Set the base relative
to the shell
Deeplink & postmessage
window.addEventListener(‘message’,
message => {
if (message.data.topic === 'location-
changed') {
const newUrl =message.data.route);
window.history.replaceState(null, '',
newUrl);
}
}
const location = useLocation();
useEffect(() => {
if (window.parent && window.parent
!== window) {
window.parent.postMessage({topic:
'location-changed', route:
location.pathname}, '*');
}
}, [location])
`
App1 App2 App3
Shell
Msg Msg Msg
Msg
Iframe has to be friendly
Iframe has to be friendly
CORS
When iframe is friendly
You can share tokens
When iframe is friendly
You can post messages
When iframe is friendly
You can execute global scope
functions
$0.contentWindow.getData()
Side by side demo
Let’s wrap
We’ve seen some dirty laundry code.
There are scenarios when module
federation won’t be good enough, then,
iframe may serve your need.
My code repo
https://github.com/ranwahle/
micro-frontend-demo
Thank you!
Ran Wahle
ran.wahle@gmail.com
ranw@tikalk.com
@ranwahle

More Related Content

PPT
Developing Java Web Applications
PPTX
Web application framework
PPTX
Introduction To Micro Frontends
PPTX
Meteor Meet-up San Diego December 2014
PDF
MicroForntends.pdf
PDF
Wrangling Large Scale Frontend Web Applications
PPTX
Background thread
PPTX
Dave Orchard - Offline Web Apps with HTML5
Developing Java Web Applications
Web application framework
Introduction To Micro Frontends
Meteor Meet-up San Diego December 2014
MicroForntends.pdf
Wrangling Large Scale Frontend Web Applications
Background thread
Dave Orchard - Offline Web Apps with HTML5

Similar to MicroFrontend With Iframes, dirty laundry that can be cleaned (20)

PPTX
Deploying applications to Cloud with Google App Engine
PDF
VINAYAN_Resume
PPTX
WinJS at NYC Code Camp 2012
PPTX
MVVM+MEF in Silvelight - W 2010ebday
PPT
Distributed Programming using RMI
PPT
Distributed Programming using RMI
PDF
Pervasive Web Application Architecture
PDF
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
PPTX
Front End Development | Introduction
PDF
Introduction to ASP.NET MVC
PPTX
Reactive application using meteor
PPTX
MVC & backbone.js
PPTX
SeedStack feature tour
PDF
Penetration testing web application web application (in) security
PPTX
Cloud Foundry a Developer's Perspective
PDF
Get your mobile app in production in 3 months: Native and Reactive Mobile Apps
PPTX
Apache Cordova In Action
PPTX
AJppt.pptx
PPTX
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
PDF
Meebo performance ny_web_performance
Deploying applications to Cloud with Google App Engine
VINAYAN_Resume
WinJS at NYC Code Camp 2012
MVVM+MEF in Silvelight - W 2010ebday
Distributed Programming using RMI
Distributed Programming using RMI
Pervasive Web Application Architecture
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Front End Development | Introduction
Introduction to ASP.NET MVC
Reactive application using meteor
MVC & backbone.js
SeedStack feature tour
Penetration testing web application web application (in) security
Cloud Foundry a Developer's Perspective
Get your mobile app in production in 3 months: Native and Reactive Mobile Apps
Apache Cordova In Action
AJppt.pptx
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Meebo performance ny_web_performance
Ad

More from Ran Wahle (20)

PPTX
Implementing promises with typescripts, step by step
PPTX
HTML dialog element demonstration session
PPTX
Into React-DOM.pptx
PPTX
Lets go to the background
PPTX
Permissions api
PPTX
Lets go vanilla
PPTX
Custom elements
PPTX
Web workers
PPTX
Using legacy code with micro frontends
PPTX
Ngrx one-effect
PPTX
Angular migration
PPTX
Javascript async / await Frontend-IL
PPTX
Boost js state management
PPTX
Angular 2.0 change detection
PPTX
Code migration from Angular 1.x to Angular 2.0
PPTX
Async patterns in javascript
PPTX
Angular js 2
PPTX
Asyncawait in typescript
PPTX
Angular%201%20to%20angular%202
PPTX
What’s new in angular 2 - From FrontEnd IL Meetup
Implementing promises with typescripts, step by step
HTML dialog element demonstration session
Into React-DOM.pptx
Lets go to the background
Permissions api
Lets go vanilla
Custom elements
Web workers
Using legacy code with micro frontends
Ngrx one-effect
Angular migration
Javascript async / await Frontend-IL
Boost js state management
Angular 2.0 change detection
Code migration from Angular 1.x to Angular 2.0
Async patterns in javascript
Angular js 2
Asyncawait in typescript
Angular%201%20to%20angular%202
What’s new in angular 2 - From FrontEnd IL Meetup
Ad

Recently uploaded (20)

PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Essential Infomation Tech presentation.pptx
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
AI in Product Development-omnex systems
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Digital Strategies for Manufacturing Companies
PPTX
Transform Your Business with a Software ERP System
PPTX
ai tools demonstartion for schools and inter college
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Nekopoi APK 2025 free lastest update
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Essential Infomation Tech presentation.pptx
Reimagine Home Health with the Power of Agentic AI​
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
AI in Product Development-omnex systems
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Digital Strategies for Manufacturing Companies
Transform Your Business with a Software ERP System
ai tools demonstartion for schools and inter college
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
How Creative Agencies Leverage Project Management Software.pdf
Odoo POS Development Services by CandidRoot Solutions
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Upgrade and Innovation Strategies for SAP ERP Customers
Nekopoi APK 2025 free lastest update
CHAPTER 2 - PM Management and IT Context
2025 Textile ERP Trends: SAP, Odoo & Oracle

MicroFrontend With Iframes, dirty laundry that can be cleaned

Editor's Notes

  • #6: App can be something very minimal
  • #7: App can be something very minimal
  • #8: App can be something very minimal