@ManfredSteyer
Contents
Consequences
of
Microfrontends
Implementation
with Module
Federation
When can we
have it?
Slide 11
Slide 11 text
@ManfredSteyer
About me…
Manfred Steyer, ANGULARarchitects.io
(Remote) Angular Workshops
and Consulting
Google Developer Expert
for Angular
Trusted Collaborator
in the Angular Team
Manfred Steyer
@ManfredSteyer
Autonomous Teams
Separate Development
Separate Deployment
Own architecture decisions
Own technology descisions
Slide 15
Slide 15 text
@ManfredSteyer
Microfrontends
are first and foremost
about scaling teams!
Slide 16
Slide 16 text
@ManfredSteyer
Challenges
Slide 17
Slide 17 text
@ManfredSteyer
Challenges
UI Composition
UI Consistency
Bundle Size/ Sharing Dependencies
Version Conflicts between Microfrontends
…
Slide 18
Slide 18 text
@ManfredSteyer
Module Federation Solves Some of Them!
UI Composition
UI Consistency
Bundle Size/ Sharing Dependencies
Version Conflicts between Microfrontends
…
Slide 19
Slide 19 text
@ManfredSteyer
2: Webpack 5
Module Federation
Slide 20
Slide 20 text
@ManfredSteyer
DEMO
Slide 21
Slide 21 text
@ManfredSteyer
How to load separately
compiled code?
Slide 22
Slide 22 text
@ManfredSteyer
Idea
const Component = import('http://other-app/xyz')
Does not work with
webpack/ Angular CLI
Even lazy parts must be
known at compile time!
@ManfredSteyer
How to Get the Microfrontend's URL?
Shell (Host) Microfrontend (Remote)
RemoteEntrypoint.js
Slide 25
Slide 25 text
@ManfredSteyer
How to Share Libs?
Shell (Host) Microfrontend (Remote)
shared: [
"@angular/core", "…"
]
shared: [
"@angular/core", "…"
]
Slide 26
Slide 26 text
@ManfredSteyer
Conflicting Shared Libs
Option A: Reuse it anyway
Option B: Load own
Both might be bad
Prevent organizationally (e. g. conventions, contracts, monorepos)
Integration-Testing
Slide 27
Slide 27 text
@ManfredSteyer
DEMO
Slide 28
Slide 28 text
@ManfredSteyer
3: When can
we have it?
Slide 29
Slide 29 text
@ManfredSteyer
Well …
Webpack 5 is currently beta
Shown examples: PoC w/ custom webpack conf + patched CLI lib
CLI: Not before version 11 (fall 2020)
Squeeze federation config into CLI's webpack config
Custom Builder (e. g. ngx-build-plus)
Slide 30
Slide 30 text
@ManfredSteyer
Free eBook
ANGULARarchitects.io/book
Updated for Module Federation
and Alternatives
Slide 31
Slide 31 text
@ManfredSteyer
Conclusion
Main Purpose
of µFrontends:
Scaling Teams
Federation:
Import From
Other App
Sharing Libs
Take Care of
Conflicts
Slide 32
Slide 32 text
@ManfredSteyer
Be like Bonnie and
think first!
Evaluate whether you need
µFrontends
No: Majestic Monolith
Yes: Consider Module
Federation
Slide 33
Slide 33 text
@ManfredSteyer
Contact and Downloads
[web] ANGULARarchitects.io
[twitter] ManfredSteyer
d
Slides & Examples Remote Company Workshops
and Consulting