SlideShare a Scribd company logo
Community Partners
Applying microservices principles to front end
Frontend (SPA)
API Gateway
svc svc svc svc
Applying microservices principles to front end
API Gateway
svc svc svc svc
APP APP APP APP
Applying microservices principles to front end
Applying microservices principles to front end
• Simple interface
• Composition reduces complexity
• One flow on information
• Different domains
• Different technologies
• Different release cycles
• Isolation
• Ownership
• Easy integration
<iframe>
window.open
window.postMessage
• Iframes and popups
• Too much static.
• Difficult communication.
• Doesn’t inherit styles.
• Browsers behaving very differently, i.e. popups open in a full page.
• Slower to load.
• window.postMessage
• Browsers behaving differently, i.e. IE 11 < will prevent window-to-window.
• Fire and forget.
• One huge event handler where all messages are delivered.
• Difficult to secure communication.
window.parent.postMessage(
‘Get user token’, ‘*’);
https://www.mysite.com
https://product.mysite.com
https://www.mysite.com
https://product.mysite.com
message.source.postMessage(‘User token:
XYZ’, *);
window.parent.postMessage(
‘Get user token’, ‘*’);
https://www.mysite.com
https://product.mysite.comhttps://www.hacker-site.com
window.parent.postMessage(
‘Send user token’, ‘*’);
window.parent.postMessage(
‘Get user token’, ‘*’);
• Safely allow cross-origin communication between different pages.
• Safely allow cross-origin communication between different pages.
Applying microservices principles to front end
• Abstract rendering into:
• Iframe
• Window
• Provides a simple component-like
contract.
• Supporting passing properties down,
actions up.
• Securely handle communication.
• Technology specific adapters.
Applying microservices principles to front end
Applying microservices principles to front end
Applying microservices principles to front end
https://github.com/harouny/luxor
• Host pass down props.
• Component bubble up events.
• Component subscribe to props change to update internal state.
• Updating component internal state trigger UI changes.
• Host can update props based on events.
One flow of data
Set Props
On Props
Raise event
On event
Set Props
On Props
Raise event
On event
Host
Component
Applying microservices principles to front end
1
3
2
1
2
3
Applying microservices principles to front end
Applying microservices principles to front end
Applying microservices principles to front end
Applying microservices principles to front end
Applying microservices principles to front end
Applying microservices principles to front end
Applying microservices principles to front end
Applying microservices principles to front end
Applying microservices principles to front end
Applying microservices principles to front end
Applying microservices principles to front end
Applying microservices principles to front end
• Xcomponent is not meant to replace native components.
• Use it to share complete functionality.
• Keeps contract simple.
• Bundle Xcomponent library with component definition in one
script.
• Simple integration.
• UseWebpack for bundling.
• Angular digest cycle, change detection.
• Event handlers (functions) are executed outside of angular
context.
• Native drivers helps to avoid the problem.
• Xcomponent uses some built-in props.
• onEnter
• onRender
• onClose
• LogLevel
• “this” in event handlers (functions).
• Bound to component instance even if you don’t think so, i.e.
inside a class.
• IE < 11 prevent communication with popups in a different
domain.
• Iframe bridge is required (configuration)
• Xcomponent brings the best of both worlds of:
• Native components
• Simple contract
• Communication style
• Cross domain components
• Isolation
• Flexibility
• Technology independence
Applying microservices principles to front end
Applying microservices principles to front end

More Related Content

PDF
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
PDF
WebSocketson WildFly
PPTX
Node.js
PPTX
Windows communication foundation (part2) jaliya udagedara
PPTX
SignalR - Building an async web app with .NET
PDF
Server-Sent Events in Action
PPTX
Websocket vs SSE - Paris.js - 24/06/15
PPTX
Phoenix: Sent 200 OK in 3 μs
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
WebSocketson WildFly
Node.js
Windows communication foundation (part2) jaliya udagedara
SignalR - Building an async web app with .NET
Server-Sent Events in Action
Websocket vs SSE - Paris.js - 24/06/15
Phoenix: Sent 200 OK in 3 μs

What's hot (20)

PDF
Rails 4 & server sent events
PDF
Testing Mobile JavaScript (Fall 2010
PDF
Technologies That Make LINE QR Code Login Possible
PPTX
Intro to Web Sockets
PDF
Flask jwt authentication tutorial
PPT
Mule compatible technologies
PPTX
Building a production ready meteor app
PDF
Wcf remaining
PPTX
Stored procedure in Mule
PPTX
Lightning talk - Membase
PPTX
VorlonJS
PDF
Live Streaming & Server Sent Events
PPT
Intercepting Windows Printing by Modifying GDI Subsystem
PPTX
Web sockets - Pentesting
PDF
PharoDAYS 2015: Web 2.0 by Esteban Lorenzano
PPT
Root via XSS
PPT
WebSockets and Java
PPTX
How to develop innovative, scalable systems
PPTX
Windows communication foundation (part1) jaliya udagedara
PDF
web3j 1.0 update
Rails 4 & server sent events
Testing Mobile JavaScript (Fall 2010
Technologies That Make LINE QR Code Login Possible
Intro to Web Sockets
Flask jwt authentication tutorial
Mule compatible technologies
Building a production ready meteor app
Wcf remaining
Stored procedure in Mule
Lightning talk - Membase
VorlonJS
Live Streaming & Server Sent Events
Intercepting Windows Printing by Modifying GDI Subsystem
Web sockets - Pentesting
PharoDAYS 2015: Web 2.0 by Esteban Lorenzano
Root via XSS
WebSockets and Java
How to develop innovative, scalable systems
Windows communication foundation (part1) jaliya udagedara
web3j 1.0 update
Ad

Similar to Applying microservices principles to front end (20)

PDF
ServerSentEvents.pdf
PDF
ServerSentEventsV2.pdf
PDF
Ad108 - XPages in the IBM Lotus Notes Client - A Deep Dive!
PDF
Developing Series 40 web apps with Nokia Web Tools 2.0
PDF
FITC - Node.js 101
PDF
Django è pronto per l'Enterprise
PPTX
Introduction to React native
PPTX
20180518 QNAP Seminar - Introduction to React Native
PPTX
External JavaScript Widget Development Best Practices
PPTX
Java scriptwidgetdevelopmentjstanbul2012
PDF
Node.js 101 with Rami Sayar
PDF
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
PDF
Griffon for the Enterprise
PPTX
Signal R 2015
PPTX
concept of server-side JavaScript / JS Framework: NODEJS
PPTX
External JavaScript Widget Development Best Practices (updated) (v.1.1)
PDF
Service worker API
PDF
Advanced web application architecture - Talk
PDF
MEAN Stack Warm-up
KEY
20120306 dublin js
ServerSentEvents.pdf
ServerSentEventsV2.pdf
Ad108 - XPages in the IBM Lotus Notes Client - A Deep Dive!
Developing Series 40 web apps with Nokia Web Tools 2.0
FITC - Node.js 101
Django è pronto per l'Enterprise
Introduction to React native
20180518 QNAP Seminar - Introduction to React Native
External JavaScript Widget Development Best Practices
Java scriptwidgetdevelopmentjstanbul2012
Node.js 101 with Rami Sayar
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Griffon for the Enterprise
Signal R 2015
concept of server-side JavaScript / JS Framework: NODEJS
External JavaScript Widget Development Best Practices (updated) (v.1.1)
Service worker API
Advanced web application architecture - Talk
MEAN Stack Warm-up
20120306 dublin js
Ad

More from Ahmed Elharouny (8)

PPTX
Deep dive into azure durable functions
PPTX
NoSQL, which way to go?
PPTX
Introduction to require js
PPTX
Building share point apps with angularjs
PPTX
Introduction to AngularJs
PPTX
Advanced Jquery
PPTX
Introduction to Jquery
PPTX
Design patterns
Deep dive into azure durable functions
NoSQL, which way to go?
Introduction to require js
Building share point apps with angularjs
Introduction to AngularJs
Advanced Jquery
Introduction to Jquery
Design patterns

Recently uploaded (20)

PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
System and Network Administraation Chapter 3
PPT
Introduction Database Management System for Course Database
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
medical staffing services at VALiNTRY
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
Design an Analysis of Algorithms II-SECS-1021-03
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
System and Network Administraation Chapter 3
Introduction Database Management System for Course Database
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
ISO 45001 Occupational Health and Safety Management System
How Creative Agencies Leverage Project Management Software.pdf
Odoo Companies in India – Driving Business Transformation.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
Upgrade and Innovation Strategies for SAP ERP Customers
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Internet Downloader Manager (IDM) Crack 6.42 Build 41
medical staffing services at VALiNTRY
Understanding Forklifts - TECH EHS Solution
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
VVF-Customer-Presentation2025-Ver1.9.pptx
Navsoft: AI-Powered Business Solutions & Custom Software Development

Applying microservices principles to front end

Editor's Notes

  • #4: Existing system that is using microservices architecture only on the backend.
  • #5: Existing system that is using microservices architecture only on the backend. Frondend is more complicated to work on, yet, don’t benefit from applying microservices principals that could reduce complexity
  • #6: Our goal is to apply microservices principals on frontend. - Separately deployable components - Isolated and decoupled - Focused - Technology agnostic
  • #8: Sharing css Then sharing DOM components UI only Then sharing css, UI and functionality Then making component communication right Then having all this in HTML standards
  • #22: Reference: https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/client-side-REST-integration/
  • #23: Reference: https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/client-side-REST-integration/
  • #24: Reference: https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/client-side-REST-integration/