SlideShare a Scribd company logo
1 of 47
Download to read offline
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 architecture_presentation_ssoni
Micro frontend architecture_presentation_ssoniMicro frontend architecture_presentation_ssoni
Micro frontend architecture_presentation_ssoniSandeep Soni
 
State of Micro Frontend
State of Micro FrontendState of Micro Frontend
State of Micro FrontendYugo Sakamoto
 
Introduction To Micro Frontends
Introduction To Micro Frontends Introduction To Micro Frontends
Introduction To Micro Frontends Meitar Karas
 
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_2019Codemotion
 
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...Shift Conference
 
"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
 
Mikrofrontend a Module Federation
Mikrofrontend a Module FederationMikrofrontend a Module Federation
Mikrofrontend a Module FederationThe Software House
 
Building applications in a Micro-frontends way
Building applications in a Micro-frontends wayBuilding applications in a Micro-frontends way
Building applications in a Micro-frontends wayPrasanna Venkatesan
 
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 Frontendsandrejusb
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To MicroservicesLalit Kale
 
Micro Frontend Platforms for Kubernetes
Micro Frontend Platforms for KubernetesMicro Frontend Platforms for Kubernetes
Micro Frontend Platforms for KubernetesEntando
 
Microfrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedMicrofrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedVinci Rufus
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecturetyrantbrian
 

What's hot (20)

Micro frontend architecture_presentation_ssoni
Micro frontend architecture_presentation_ssoniMicro frontend architecture_presentation_ssoni
Micro frontend architecture_presentation_ssoni
 
State of Micro Frontend
State of Micro FrontendState of Micro Frontend
State of Micro Frontend
 
Micro frontend
Micro frontendMicro frontend
Micro frontend
 
Introduction To Micro Frontends
Introduction To Micro Frontends Introduction To Micro Frontends
Introduction To Micro Frontends
 
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
 
Micro frontends
Micro frontendsMicro frontends
Micro frontends
 
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?
 
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...
 
"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...
 
Mikrofrontend a Module Federation
Mikrofrontend a Module FederationMikrofrontend a Module Federation
Mikrofrontend a Module Federation
 
Building applications in a Micro-frontends way
Building applications in a Micro-frontends wayBuilding applications in a Micro-frontends way
Building applications in a Micro-frontends way
 
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 Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To Microservices
 
Micro Frontend Platforms for Kubernetes
Micro Frontend Platforms for KubernetesMicro Frontend Platforms for Kubernetes
Micro Frontend Platforms for Kubernetes
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Microfrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedMicrofrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased based
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Architecture: Microservices
Architecture: MicroservicesArchitecture: Microservices
Architecture: Microservices
 

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 ChaperoneGary 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 2018Bhavesh 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 SystemVlad Fedosov
 
Folio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP YiiFolio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP YiiFolio3 Software
 
Open Social In The Enterprise
Open Social In The EnterpriseOpen Social In The Enterprise
Open Social In The EnterpriseTim 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 CompanyMarcos 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 GAElynneblue
 
GraphQL Advanced
GraphQL AdvancedGraphQL Advanced
GraphQL AdvancedLeanIX GmbH
 
James Jara Portfolio 2014 Part 1
James Jara Portfolio 2014 Part 1James Jara Portfolio 2014 Part 1
James Jara Portfolio 2014 Part 1James Jara
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalabilityTwinbit
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery GuideMark Rackley
 
An Introduction to Microservices
An Introduction to MicroservicesAn Introduction to Microservices
An Introduction to MicroservicesAd van der Veer
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015Pushkar 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 2016Audrey Neveu
 
Search API - Google Cloud Platform
Search API - Google Cloud PlatformSearch API - Google Cloud Platform
Search API - Google Cloud PlatformAudrey 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 SearchAudrey 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

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

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