Slide 1

Slide 1 text

@vitormalencar Module-Federation Module-Federation A game-changer in JavaScript architecture

Slide 2

Slide 2 text

MY "WHY" 🤔 💭 WHY I DO WHAT I DO I believe it is possible to change the world through technology.....

Slide 3

Slide 3 text

Hi 👋, I'm Vitor Alencar. I'm a software engineer! I helped improve Brazil education I helped people share their opinions online now I'm helping people get their money back!

Slide 4

Slide 4 text

@vitormalencar 150K+ 05 COURSES 200H CONTENT 100+ VIDEOS 04 PODCASTS PEOPLE IMPACTED

Slide 5

Slide 5 text

@vitormalencar Microfrontends are especially useful when we have projects with dozens of developers working together in a large business domain Why Micro front ends ?

Slide 6

Slide 6 text

@vitormalencar Microsfot Google Airbnb Netflix You? Spotify

Slide 7

Slide 7 text

@vitormalencar Monolith to Microservices

Slide 8

Slide 8 text

@vitormalencar MFE similar methodology Be able to be managed from separate teams Deploy independently Small application set Better Domain separation

Slide 9

Slide 9 text

@vitormalencar Is about scaling teams

Slide 10

Slide 10 text

@vitormalencar Sharing code is Hard and it gets harder and harder on a large scale

Slide 11

Slide 11 text

@vitormalencar Let's check the current state of tools out there for code sharing What are our options now?

Slide 12

Slide 12 text

@vitormalencar Why is hard NPM is slow It grows in complexity Custom-made tools get dated fast Sharing is usually primitive

Slide 13

Slide 13 text

@vitormalencar The Goal Performance Build Time Easy sharing

Slide 14

Slide 14 text

@vitormalencar Module federation

Slide 15

Slide 15 text

@vitormalencar What is module federation Share modules Share components Share Functions Share data Over the wire

Slide 16

Slide 16 text

@vitormalencar The place that webpack is initialized during page load Host application

Slide 17

Slide 17 text

@vitormalencar Another webpack build that will be consumed by other application Remote application

Slide 18

Slide 18 text

@vitormalencar What is module federation Share modules / components / functions / data deploy independent SPA's Over the wire at runtime Redundancy and self-healing powers

Slide 19

Slide 19 text

@vitormalencar Capabilities Dynamic updates over the wire Minimal overhead No dev env changes Can be handled by independent teams

Slide 20

Slide 20 text

@vitormalencar

Slide 21

Slide 21 text

@vitormalencar

Slide 22

Slide 22 text

@vitormalencar Recap Fast updates Better control independent Deploys

Slide 23

Slide 23 text

@vitormalencar

Slide 24

Slide 24 text

@vitormalencar

Slide 25

Slide 25 text

@vitormalencar Consistency and better updates Design system library

Slide 26

Slide 26 text

@vitormalencar Error Handling How to catch Errors and prevent runtime white screen

Slide 27

Slide 27 text

@vitormalencar Error boundary and similar

Slide 28

Slide 28 text

@vitormalencar Sharing State Handle state changes across MFE's

Slide 29

Slide 29 text

@vitormalencar It works, just be reactive Redux Context RXjs Zustand .....

Slide 30

Slide 30 text

@vitormalencar

Slide 31

Slide 31 text

@vitormalencar Self-Healing Capabilities Fallback to remote apps vendors if a dependency fails to load.

Slide 32

Slide 32 text

@vitormalencar

Slide 33

Slide 33 text

@vitormalencar

Slide 34

Slide 34 text

@vitormalencar Dynamic Federation Handeling module injection at runtime

Slide 35

Slide 35 text

@vitormalencar And much more..

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

@vitormalencar

Slide 38

Slide 38 text

Danke! @vitormalencar