SlideShare a Scribd company logo
Micro FrontEnd
The microservices puzzle extended to frontend
Classic Study Case
An History of Evolution
Front-End
Back-End
Database
Monolith
Front-End
Front & Back
Front &
Microservices
Back-End
Database
Product
service
Search
Service
Checkout
service
Front-End
It’s Not Only About Architecture
Front-End
Back-End
Database
Monolith
Front-End
Front & Back
Front &
Microservices
Back-End
Database
Product
service
Search
Service
Checkout
service
Front-End
The Pet Store
Team
The Front End
Team
The Back End
Team
The Front End
Team
Product
Team
Search
Team
Checkout
Team
42
1 5
Microservices Benefits
Small &
Specialized
Teams
Easier to
scale
Micro
Services
Freedom in
stack’s
choices
Easier to
deploy
3
4
Front & Microservices: The perfect match?
Front &
Microservices
Product
service
Search
Service
Checkout
service
Front-End
The Front End
Team
Product
Team
Search
Team
Checkout
Team
Next Step of Evolution
Product Team Search Team Checkout Team
Front-End
Back-End
Database
Front-End
Back-End
Database
Front-End
Back-End
Database
Classic E-Commerce Approach
The Petstore Reloaded
Search Team
Product Team
Checkout Team
Customer Focused Teams
Product Team Search Team Checkout Team
Front-End
Back-End
Database
Front-End
Back-End
Database
Front-End
Back-End
Database
Customer Focused Teams
Product Team Search Team Checkout Team
Front-End
Back-End
Database
Front-End
Back-End
Database
Front-End
Back-End
Database
Mission:
present the
product in a clear
way
Mission:
help finding the
right product
quickly
Mission:
make the
checkout
experience easy
3
4
5
2
1
Micro Frontend Benefits
Freedom in
stack’s
choices
Small
Customer
Centric
Teams
Autonomous
development Autonomous
release of
features
Application’s
evolution
made easier
Micro
Frontend
Real Life Study Case
July 2015
Manager
March 2017
Governance
August 2017
Operations
: Data Fabric
Real Life Study Case: Data Fabric
V2 is coming
Time to reorganize
the team!
OCT
2017
December 2017
Layout
March 2018
Galaxy
July 2018
Layout-as-lib
Data Fabric V2
Design System (aka saagie-ui)
Try #1: Saagie-Layout
Try #1: Saagie-Layout
What’s a Web Component?
Custom Elements
Shadow Dom HTML Template
ES Modules
<my-component>
My-component.js Index.html
class MyComponent extends HTMLElement {
connectedCallback() {
// element has been attached to the DOM
}
disconnectedCallback() {
// element has been detached from the DOM
}
attributeChangedCallback() {
// an attribute value has changed
}
render() {
this.innerHTML = `<div> … </div>`;
}
}
customElements.define('my-component', MyComponent);
<html lang="en">
<head>
<title>My application</title>
</head>
<body>
</body>
</html>
<script type="module"
src="my-component.js">
</script>
<my-component></my-component>
<script
src="/lib/document-register-element.js">
</script>
Talking about support...
source
Saagie-Layout
Saagie-Layout
From an Application To a Web Component
class DataManager extends HTMLElement {
constructor() {
this.render();
}
render() {
this.platform = this.getAttribute('platform');
this.innerHTML =
}
}
angular
.module('data-manager')
.controller('AppController',
AppController);
AppController.$inject = ['$scope',
'$rootScope', '$state', … ];
function AppController($scope,
$rootScope, $state, ...) {
…
}
app-controller.js data-manager.js
customElements.define('saagie-data-manager',DataManager);
`<div ng-app="data-manager"
ng-controller="AppController">
<platform-nav platform=${this.platform}>
</platform-nav>
</div>`;
From an Application To a Web Component
class DataGovernance extends HTMLElement {
connectedCallback() {
this.render();
}
render() {
this.apiPath = this.getAttribute('datagov-url');
this.innerHTML =
}
}
@Component({
selector:
'data-governance’,
templateUrl:
'./app.component.html',
providers:
[]
})
export class AppComponent {
…
}
app-component.js data-governance.js
`<data-governance
id="data-governance"
datagov-url=${this.apiPath}>
</data-governance>`;
customElements.define('saagie-data-governance',
DataGovernance);
Saagie-Layout
index.html
<html lang="en">
<head>
</head>
<body>
</body>
</html>
<link rel="stylesheet" href="/saagie-ui/src/index.css">
<script src="/data-governance/web-components/data-governance.js">
</script>
<script src="/data-fabric/web-components/data-manager.js">
</script>
<sla-board></sla-board>
Saagie-Layout
class Board extends HTMLElement {
render(path, user) {
const page = this.getPage(path);
this.innerHTML =
}
…
getPage(path) {
let page;
switch (path) {
case PROJECTS :
page = `<saagie-data-manager
id="data-manager"
platform=${getSelectedPlatform()}>
</saagie-data-manager>`;
break;
case GOVERNANCE :
page = `<saagie-data-governance
id="data-governance"
datagov-url="${this.dataGovUrl}">
</saagie-data-governance>`;
break;
}
}
}
board.js
`<div class="sui-l-app-layout">
<sla-topbar currentPage="${path}">
</sla-topbar>
<account-menu currentUser="${user}">
</account-menu>
<primary-nav></primary-nav>
<div class="sui-l-app-layout__page">
${page}
</div>
</div>`;
customElements.define('sla-board', Board);
Pros & Cons
ConsPros
● consistent user experience ● not a true SPA
● high dependencies on
libraries between apps
● bad performances
● routers management
● implies to run the entire
stack locally
● possibility to display several
components on the same
page
● independent deployment
Try #2: Galaxy
Pros & Cons
ConsPros
● possibility to share
components between
applications
● still high dependencies on
libraries between apps
● centralized routing system
● but also between React’s
versions
Try #3: Layout-as-Lib
Layout-as-Lib
<html>
<head>
<title>Saagie Governance</title>
</head>
<body id="sui-root">
<data-governance-angular
class="sui-l-app-layout__subapp">
</data-governance-angular>
</body>
</html>
index.html
import {AppModule} from './app/app.module';
import {LoadLayoutData} from 'saagie-layout-lib';
platformBrowserDynamic().bootstrapModule(AppModule);
main.ts
<saagie-layout
current-platform-object='{"loading": true}'
hide="true">
</saagie-layout>
const legacy = window
.location
.pathname.startsWith('/datagovernance');
if (!legacy) {
const hrefParameters =
window.location.href.split('platform/');
new LoadLayoutData().init('governance',
parseInt(hrefParameters[1], 10));
const layout = document.querySelector('saagie-layout');
layout.removeAttribute('hide');
}
Layout-as-Lib
import '@webcomponents/custom-elements';
import './web-components/Layout';
import './web-components/PrimaryNav';
import './web-components/Topbar';
index.js
export default class LoadLayoutData {
…
LoadLayoutData.js
import LoadLayoutData from
'./services/LoadLayoutData';
export default {
LoadLayoutData
}; async loadData(layoutComponent, currentApp,
currentPlatformId) {
await this.loadRights();
await this.loadJobsData();
await this.loadProfile();
}
init(currentApp, currentPlatformId) {
const layoutComponent =
document.querySelector('saagie-layout');
return this.loadData(layoutComponent,
currentApp, currentPlatformId);
}}
Layout-as-Lib
import '@webcomponents/custom-elements';
import './web-components/Layout';
import './web-components/PrimaryNav';
import './web-components/Topbar';
index.js
export default class LoadLayoutData {
…
LoadLayoutData.js
import LoadLayoutData from
'./services/LoadLayoutData';
export default {
LoadLayoutData
};
async loadRights(){
const rights = await fetch(apiRightsUrl);
this.login = rights.login;
this.setUser({ login: this.login });
this.setPlatforms(rights.platforms));
}
setPlatforms(platforms) {
this.layoutComponent
.setAttribute('platforms-list-object',
JSON.stringify({platforms}));
}
Layout-as-Lib
layout.js
class Layout extends HTMLElement { …
initRender() {
this.innerHTML =
`<div class="sui-l-app-layout"
id="sui-root">
<saagie-topbar
class="sui-o-topbar">
</saagie-topbar>
<saagie-primary-nav
class="sui-o-primary-nav">
</saagie-primary-nav>
${this.innerHTML}
</div>`;
}
}
connectedCallback() {
this.initRender();
…
}
attributeChangedCallback(name, oldValue,
newValue) {
switch (name) {
case 'current-app':
this.changeChildAttribute
('saagie-topbar', name, newValue);
this.changeChildAttribute
('saagie-primary-nav', name, newValue);
break;
case 'current-platform-object':
…
if(!customElements.get('saagie-layout')){
customElements.define('saagie-layout', Layout);
}
Pros & Cons
ConsPros
● not an SPA at all
● no components
aggregation possible
Page Transitions
Page Transitions
Page Transitions
Page Transitions
Pros & Cons
ConsPros
● way more faster
● easier to integrate
● breaking changes implies to
update each application
● possible inconsistent user
experience
● independent deployment
AND development
● no more libraries conflict
● can be run on its own
Data Fabric
July 2015
Manager
March 2017
Governance
August 2017
Operations
Data Fabric V2
V2 is coming
Time to reorganize
the team!
OCT
2017
December 2017
Layout
March 2018
Galaxy
May 2018
Security
Data Fabric V2
September 2018
Project & Jobs
July 2018
App Store
December 2018
Dataset Access
June 2018
Layout-as-lib
Best practices, tips & tricks
Think usecase first Take care of your
design
Share ressources,
not runtime!
Aggregation of components
or aggregation of SPA?
Design system, optimistic UI,
skeletons ...
Build independent and self
contained apps
Share libraries and common
services
● Micro-frontends.org
https://github.com/neuland/micro-frontends
Micro Frontends talk by Michael Geers at Web Rebels, Oslo 2018 @nataltis
● Experiences Using Micro FrontEnds at IKEA
https://www.infoq.com/news/2018/08/experiences-micro-frontends
● Project Mosaic (Zalando)
https://www.mosaic9.org/
● Single SPA
https://single-spa.js.org/
To go further
Thank you!

More Related Content

What's hot

Micro-frontend
Micro-frontendMicro-frontend
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Codemotion
 
State of Micro Frontend
State of Micro FrontendState of Micro Frontend
State of Micro Frontend
Yugo Sakamoto
 
Micro frontends
Micro frontendsMicro frontends
Micro frontends
Assaf Gannon
 
Micro frontend
Micro frontendMicro frontend
Micro frontend
Amr Abd El Latief
 
FEVR - Micro Frontend
FEVR - Micro FrontendFEVR - Micro Frontend
FEVR - Micro Frontend
Miki Lombardi
 
Micro-Frontend Architecture
Micro-Frontend ArchitectureMicro-Frontend Architecture
Micro-Frontend Architecture
Livares Technologies Pvt Ltd
 
Micro Frontends Architecture
Micro Frontends ArchitectureMicro Frontends Architecture
Micro Frontends Architecture
Rag Dhiman
 
How to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elementsHow to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elements
MarcellKiss7
 
Micro Frontend Platforms for Kubernetes
Micro Frontend Platforms for KubernetesMicro Frontend Platforms for Kubernetes
Micro Frontend Platforms for Kubernetes
Entando
 
"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
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
Miki Lombardi
 
Microservice Approach for Web Development with Micro Frontends
Microservice Approach for Web Development with Micro FrontendsMicroservice Approach for Web Development with Micro Frontends
Microservice Approach for Web Development with Micro Frontends
andrejusb
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jest
pksjce
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
Bozhidar Bozhanov
 
"Micro-frontends, web development", Oleksandr Khivrych
"Micro-frontends, web development", Oleksandr Khivrych"Micro-frontends, web development", Oleksandr Khivrych
"Micro-frontends, web development", Oleksandr Khivrych
Fwdays
 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on ReactJS
Atlogys Technical Consulting
 
Micro-frontends – is it a new normal?
Micro-frontends – is it a new normal?Micro-frontends – is it a new normal?
Micro-frontends – is it a new normal?
Lohika_Odessa_TechTalks
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
Anil Allewar
 
Angular based enterprise level frontend architecture
Angular based enterprise level frontend architectureAngular based enterprise level frontend architecture
Angular based enterprise level frontend architecture
Himanshu Tamrakar
 

What's hot (20)

Micro-frontend
Micro-frontendMicro-frontend
Micro-frontend
 
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
 
State of Micro Frontend
State of Micro FrontendState of Micro Frontend
State of Micro Frontend
 
Micro frontends
Micro frontendsMicro frontends
Micro frontends
 
Micro frontend
Micro frontendMicro frontend
Micro frontend
 
FEVR - Micro Frontend
FEVR - Micro FrontendFEVR - Micro Frontend
FEVR - Micro Frontend
 
Micro-Frontend Architecture
Micro-Frontend ArchitectureMicro-Frontend Architecture
Micro-Frontend Architecture
 
Micro Frontends Architecture
Micro Frontends ArchitectureMicro Frontends Architecture
Micro Frontends Architecture
 
How to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elementsHow to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elements
 
Micro Frontend Platforms for Kubernetes
Micro Frontend Platforms for KubernetesMicro Frontend Platforms for Kubernetes
Micro Frontend Platforms for Kubernetes
 
"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...
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
Microservice Approach for Web Development with Micro Frontends
Microservice Approach for Web Development with Micro FrontendsMicroservice Approach for Web Development with Micro Frontends
Microservice Approach for Web Development with Micro Frontends
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jest
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
 
"Micro-frontends, web development", Oleksandr Khivrych
"Micro-frontends, web development", Oleksandr Khivrych"Micro-frontends, web development", Oleksandr Khivrych
"Micro-frontends, web development", Oleksandr Khivrych
 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on ReactJS
 
Micro-frontends – is it a new normal?
Micro-frontends – is it a new normal?Micro-frontends – is it a new normal?
Micro-frontends – is it a new normal?
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Angular based enterprise level frontend architecture
Angular based enterprise level frontend architectureAngular based enterprise level frontend architecture
Angular based enterprise level frontend architecture
 

Similar to Micro frontend: The microservices puzzle extended to frontend

Creating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with ChaperoneCreating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with Chaperone
Gary Wisniewski
 
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
Bhavesh Surani
 
LvivCSS: Web Components as a foundation for Design System
LvivCSS: Web Components as a foundation for Design SystemLvivCSS: Web Components as a foundation for Design System
LvivCSS: Web Components as a foundation for Design System
Vlad Fedosov
 
XPages Mobile, #dd13
XPages Mobile, #dd13XPages Mobile, #dd13
Folio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP YiiFolio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP Yii
Folio3 Software
 
Open Social In The Enterprise
Open Social In The EnterpriseOpen Social In The Enterprise
Open Social In The Enterprise
Tim Moore
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
Marcos Labad
 
How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...
Katia Aresti
 
File Repository on GAE
File Repository on GAEFile Repository on GAE
File Repository on GAE
lynneblue
 
GraphQL Advanced
GraphQL AdvancedGraphQL Advanced
GraphQL Advanced
LeanIX GmbH
 
James Jara Portfolio 2014 Part 1
James Jara Portfolio 2014 Part 1James Jara Portfolio 2014 Part 1
James Jara Portfolio 2014 Part 1
James Jara
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
Pandiya Rajan
 
Portafolio
PortafolioPortafolio
Portafolio
James Jara
 
Pyramid patterns
Pyramid patternsPyramid patterns
Pyramid patterns
Carlos de la Guardia
 
Iac d.damyanov 4.pptx
Iac d.damyanov 4.pptxIac d.damyanov 4.pptx
Iac d.damyanov 4.pptx
Dimitar Damyanov
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
Twinbit
 
Elastic-Engineering
Elastic-EngineeringElastic-Engineering
Elastic-Engineering
Araf Karsh Hamid
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide
Mark Rackley
 
An Introduction to Microservices
An Introduction to MicroservicesAn Introduction to Microservices
An Introduction to Microservices
Ad van der Veer
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
Pushkar Chivate
 

Similar to Micro frontend: The microservices puzzle extended to frontend (20)

Creating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with ChaperoneCreating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with Chaperone
 
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
 
LvivCSS: Web Components as a foundation for Design System
LvivCSS: Web Components as a foundation for Design SystemLvivCSS: Web Components as a foundation for Design System
LvivCSS: Web Components as a foundation for Design System
 
XPages Mobile, #dd13
XPages Mobile, #dd13XPages Mobile, #dd13
XPages Mobile, #dd13
 
Folio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP YiiFolio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP Yii
 
Open Social In The Enterprise
Open Social In The EnterpriseOpen Social In The Enterprise
Open Social In The Enterprise
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
 
How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...
 
File Repository on GAE
File Repository on GAEFile Repository on GAE
File Repository on GAE
 
GraphQL Advanced
GraphQL AdvancedGraphQL Advanced
GraphQL Advanced
 
James Jara Portfolio 2014 Part 1
James Jara Portfolio 2014 Part 1James Jara Portfolio 2014 Part 1
James Jara Portfolio 2014 Part 1
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
 
Portafolio
PortafolioPortafolio
Portafolio
 
Pyramid patterns
Pyramid patternsPyramid patterns
Pyramid patterns
 
Iac d.damyanov 4.pptx
Iac d.damyanov 4.pptxIac d.damyanov 4.pptx
Iac d.damyanov 4.pptx
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
 
Elastic-Engineering
Elastic-EngineeringElastic-Engineering
Elastic-Engineering
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide
 
An Introduction to Microservices
An Introduction to MicroservicesAn Introduction to Microservices
An Introduction to Microservices
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
 

More from Audrey Neveu

WEBHOOKS VS WEBSUB - COMMENT STREAMER VOS ÉVÉNEMENTS EN TEMPS RÉEL ?
WEBHOOKS VS WEBSUB - COMMENT STREAMER VOS ÉVÉNEMENTS EN TEMPS RÉEL ?WEBHOOKS VS WEBSUB - COMMENT STREAMER VOS ÉVÉNEMENTS EN TEMPS RÉEL ?
WEBHOOKS VS WEBSUB - COMMENT STREAMER VOS ÉVÉNEMENTS EN TEMPS RÉEL ?
Audrey Neveu
 
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Audrey Neveu
 
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Audrey Neveu
 
The end of polling : why and how to transform a REST API into a Data Streamin...
The end of polling : why and how to transform a REST API into a Data Streamin...The end of polling : why and how to transform a REST API into a Data Streamin...
The end of polling : why and how to transform a REST API into a Data Streamin...
Audrey Neveu
 
The end of polling : why and how to transform a REST API into a Data Streamin...
The end of polling : why and how to transform a REST API into a Data Streamin...The end of polling : why and how to transform a REST API into a Data Streamin...
The end of polling : why and how to transform a REST API into a Data Streamin...
Audrey Neveu
 
Ionic, le framework mobile hybride carrément addictif - Devoxx France 2016
Ionic, le framework mobile hybride carrément addictif - Devoxx France 2016Ionic, le framework mobile hybride carrément addictif - Devoxx France 2016
Ionic, le framework mobile hybride carrément addictif - Devoxx France 2016
Audrey Neveu
 
Search API - Google Cloud Platform
Search API - Google Cloud PlatformSearch API - Google Cloud Platform
Search API - Google Cloud Platform
Audrey Neveu
 
Moteurs de recherche : un oeil sous le capot avec Elastic Search
Moteurs de recherche : un oeil sous le capot avec Elastic SearchMoteurs de recherche : un oeil sous le capot avec Elastic Search
Moteurs de recherche : un oeil sous le capot avec Elastic Search
Audrey Neveu
 

More from Audrey Neveu (8)

WEBHOOKS VS WEBSUB - COMMENT STREAMER VOS ÉVÉNEMENTS EN TEMPS RÉEL ?
WEBHOOKS VS WEBSUB - COMMENT STREAMER VOS ÉVÉNEMENTS EN TEMPS RÉEL ?WEBHOOKS VS WEBSUB - COMMENT STREAMER VOS ÉVÉNEMENTS EN TEMPS RÉEL ?
WEBHOOKS VS WEBSUB - COMMENT STREAMER VOS ÉVÉNEMENTS EN TEMPS RÉEL ?
 
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
 
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
Le Streaming d'API : pourquoi et comment transformer vos APIs statiques en do...
 
The end of polling : why and how to transform a REST API into a Data Streamin...
The end of polling : why and how to transform a REST API into a Data Streamin...The end of polling : why and how to transform a REST API into a Data Streamin...
The end of polling : why and how to transform a REST API into a Data Streamin...
 
The end of polling : why and how to transform a REST API into a Data Streamin...
The end of polling : why and how to transform a REST API into a Data Streamin...The end of polling : why and how to transform a REST API into a Data Streamin...
The end of polling : why and how to transform a REST API into a Data Streamin...
 
Ionic, le framework mobile hybride carrément addictif - Devoxx France 2016
Ionic, le framework mobile hybride carrément addictif - Devoxx France 2016Ionic, le framework mobile hybride carrément addictif - Devoxx France 2016
Ionic, le framework mobile hybride carrément addictif - Devoxx France 2016
 
Search API - Google Cloud Platform
Search API - Google Cloud PlatformSearch API - Google Cloud Platform
Search API - Google Cloud Platform
 
Moteurs de recherche : un oeil sous le capot avec Elastic Search
Moteurs de recherche : un oeil sous le capot avec Elastic SearchMoteurs de recherche : un oeil sous le capot avec Elastic Search
Moteurs de recherche : un oeil sous le capot avec Elastic Search
 

Recently uploaded

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 

Recently uploaded (20)

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 

Micro frontend: The microservices puzzle extended to frontend

  • 1. Micro FrontEnd The microservices puzzle extended to frontend
  • 3. An History of Evolution Front-End Back-End Database Monolith Front-End Front & Back Front & Microservices Back-End Database Product service Search Service Checkout service Front-End
  • 4. It’s Not Only About Architecture Front-End Back-End Database Monolith Front-End Front & Back Front & Microservices Back-End Database Product service Search Service Checkout service Front-End The Pet Store Team The Front End Team The Back End Team The Front End Team Product Team Search Team Checkout Team
  • 5. 42 1 5 Microservices Benefits Small & Specialized Teams Easier to scale Micro Services Freedom in stack’s choices Easier to deploy 3 4
  • 6. Front & Microservices: The perfect match? Front & Microservices Product service Search Service Checkout service Front-End The Front End Team Product Team Search Team Checkout Team
  • 7. Next Step of Evolution Product Team Search Team Checkout Team Front-End Back-End Database Front-End Back-End Database Front-End Back-End Database
  • 9. The Petstore Reloaded Search Team Product Team Checkout Team
  • 10. Customer Focused Teams Product Team Search Team Checkout Team Front-End Back-End Database Front-End Back-End Database Front-End Back-End Database
  • 11. Customer Focused Teams Product Team Search Team Checkout Team Front-End Back-End Database Front-End Back-End Database Front-End Back-End Database Mission: present the product in a clear way Mission: help finding the right product quickly Mission: make the checkout experience easy
  • 12. 3 4 5 2 1 Micro Frontend Benefits Freedom in stack’s choices Small Customer Centric Teams Autonomous development Autonomous release of features Application’s evolution made easier Micro Frontend
  • 13. Real Life Study Case July 2015 Manager March 2017 Governance August 2017 Operations : Data Fabric
  • 14. Real Life Study Case: Data Fabric V2 is coming Time to reorganize the team! OCT 2017 December 2017 Layout March 2018 Galaxy July 2018 Layout-as-lib
  • 16. Design System (aka saagie-ui)
  • 19. What’s a Web Component? Custom Elements Shadow Dom HTML Template ES Modules
  • 20. <my-component> My-component.js Index.html class MyComponent extends HTMLElement { connectedCallback() { // element has been attached to the DOM } disconnectedCallback() { // element has been detached from the DOM } attributeChangedCallback() { // an attribute value has changed } render() { this.innerHTML = `<div> … </div>`; } } customElements.define('my-component', MyComponent); <html lang="en"> <head> <title>My application</title> </head> <body> </body> </html> <script type="module" src="my-component.js"> </script> <my-component></my-component> <script src="/lib/document-register-element.js"> </script>
  • 24. From an Application To a Web Component class DataManager extends HTMLElement { constructor() { this.render(); } render() { this.platform = this.getAttribute('platform'); this.innerHTML = } } angular .module('data-manager') .controller('AppController', AppController); AppController.$inject = ['$scope', '$rootScope', '$state', … ]; function AppController($scope, $rootScope, $state, ...) { … } app-controller.js data-manager.js customElements.define('saagie-data-manager',DataManager); `<div ng-app="data-manager" ng-controller="AppController"> <platform-nav platform=${this.platform}> </platform-nav> </div>`;
  • 25. From an Application To a Web Component class DataGovernance extends HTMLElement { connectedCallback() { this.render(); } render() { this.apiPath = this.getAttribute('datagov-url'); this.innerHTML = } } @Component({ selector: 'data-governance’, templateUrl: './app.component.html', providers: [] }) export class AppComponent { … } app-component.js data-governance.js `<data-governance id="data-governance" datagov-url=${this.apiPath}> </data-governance>`; customElements.define('saagie-data-governance', DataGovernance);
  • 26. Saagie-Layout index.html <html lang="en"> <head> </head> <body> </body> </html> <link rel="stylesheet" href="/saagie-ui/src/index.css"> <script src="/data-governance/web-components/data-governance.js"> </script> <script src="/data-fabric/web-components/data-manager.js"> </script> <sla-board></sla-board>
  • 27. Saagie-Layout class Board extends HTMLElement { render(path, user) { const page = this.getPage(path); this.innerHTML = } … getPage(path) { let page; switch (path) { case PROJECTS : page = `<saagie-data-manager id="data-manager" platform=${getSelectedPlatform()}> </saagie-data-manager>`; break; case GOVERNANCE : page = `<saagie-data-governance id="data-governance" datagov-url="${this.dataGovUrl}"> </saagie-data-governance>`; break; } } } board.js `<div class="sui-l-app-layout"> <sla-topbar currentPage="${path}"> </sla-topbar> <account-menu currentUser="${user}"> </account-menu> <primary-nav></primary-nav> <div class="sui-l-app-layout__page"> ${page} </div> </div>`; customElements.define('sla-board', Board);
  • 28. Pros & Cons ConsPros ● consistent user experience ● not a true SPA ● high dependencies on libraries between apps ● bad performances ● routers management ● implies to run the entire stack locally ● possibility to display several components on the same page ● independent deployment
  • 30. Pros & Cons ConsPros ● possibility to share components between applications ● still high dependencies on libraries between apps ● centralized routing system ● but also between React’s versions
  • 32. Layout-as-Lib <html> <head> <title>Saagie Governance</title> </head> <body id="sui-root"> <data-governance-angular class="sui-l-app-layout__subapp"> </data-governance-angular> </body> </html> index.html import {AppModule} from './app/app.module'; import {LoadLayoutData} from 'saagie-layout-lib'; platformBrowserDynamic().bootstrapModule(AppModule); main.ts <saagie-layout current-platform-object='{"loading": true}' hide="true"> </saagie-layout> const legacy = window .location .pathname.startsWith('/datagovernance'); if (!legacy) { const hrefParameters = window.location.href.split('platform/'); new LoadLayoutData().init('governance', parseInt(hrefParameters[1], 10)); const layout = document.querySelector('saagie-layout'); layout.removeAttribute('hide'); }
  • 33. Layout-as-Lib import '@webcomponents/custom-elements'; import './web-components/Layout'; import './web-components/PrimaryNav'; import './web-components/Topbar'; index.js export default class LoadLayoutData { … LoadLayoutData.js import LoadLayoutData from './services/LoadLayoutData'; export default { LoadLayoutData }; async loadData(layoutComponent, currentApp, currentPlatformId) { await this.loadRights(); await this.loadJobsData(); await this.loadProfile(); } init(currentApp, currentPlatformId) { const layoutComponent = document.querySelector('saagie-layout'); return this.loadData(layoutComponent, currentApp, currentPlatformId); }}
  • 34. Layout-as-Lib import '@webcomponents/custom-elements'; import './web-components/Layout'; import './web-components/PrimaryNav'; import './web-components/Topbar'; index.js export default class LoadLayoutData { … LoadLayoutData.js import LoadLayoutData from './services/LoadLayoutData'; export default { LoadLayoutData }; async loadRights(){ const rights = await fetch(apiRightsUrl); this.login = rights.login; this.setUser({ login: this.login }); this.setPlatforms(rights.platforms)); } setPlatforms(platforms) { this.layoutComponent .setAttribute('platforms-list-object', JSON.stringify({platforms})); }
  • 35. Layout-as-Lib layout.js class Layout extends HTMLElement { … initRender() { this.innerHTML = `<div class="sui-l-app-layout" id="sui-root"> <saagie-topbar class="sui-o-topbar"> </saagie-topbar> <saagie-primary-nav class="sui-o-primary-nav"> </saagie-primary-nav> ${this.innerHTML} </div>`; } } connectedCallback() { this.initRender(); … } attributeChangedCallback(name, oldValue, newValue) { switch (name) { case 'current-app': this.changeChildAttribute ('saagie-topbar', name, newValue); this.changeChildAttribute ('saagie-primary-nav', name, newValue); break; case 'current-platform-object': … if(!customElements.get('saagie-layout')){ customElements.define('saagie-layout', Layout); }
  • 36. Pros & Cons ConsPros ● not an SPA at all ● no components aggregation possible
  • 41. Pros & Cons ConsPros ● way more faster ● easier to integrate ● breaking changes implies to update each application ● possible inconsistent user experience ● independent deployment AND development ● no more libraries conflict ● can be run on its own
  • 42. Data Fabric July 2015 Manager March 2017 Governance August 2017 Operations
  • 43. Data Fabric V2 V2 is coming Time to reorganize the team! OCT 2017 December 2017 Layout March 2018 Galaxy May 2018 Security
  • 44. Data Fabric V2 September 2018 Project & Jobs July 2018 App Store December 2018 Dataset Access June 2018 Layout-as-lib
  • 45. Best practices, tips & tricks Think usecase first Take care of your design Share ressources, not runtime! Aggregation of components or aggregation of SPA? Design system, optimistic UI, skeletons ... Build independent and self contained apps Share libraries and common services
  • 46. ● Micro-frontends.org https://github.com/neuland/micro-frontends Micro Frontends talk by Michael Geers at Web Rebels, Oslo 2018 @nataltis ● Experiences Using Micro FrontEnds at IKEA https://www.infoq.com/news/2018/08/experiences-micro-frontends ● Project Mosaic (Zalando) https://www.mosaic9.org/ ● Single SPA https://single-spa.js.org/ To go further