Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Microfrontend Revolution Module Federation with Angular @techWebinarNepal
Search
Manfred Steyer
PRO
September 13, 2020
Programming
0
390
The Microfrontend Revolution Module Federation with Angular @techWebinarNepal
Manfred Steyer
PRO
September 13, 2020
Tweet
Share
More Decks by Manfred Steyer
See All by Manfred Steyer
Native Federation: The Future of Micro Frontends in Angular
manfredsteyer
PRO
0
92
The New NGRX Signal Store for Angular: 3+n Flavors of the Signal Store
manfredsteyer
PRO
0
56
Micro Frontends with Modern Angular and Island Architectures @ijs London 2024
manfredsteyer
PRO
0
91
Modern State Management in Angular: 3+n Flavors of the Signal Store @ijs London 2024
manfredsteyer
PRO
0
89
Changed Rules: Architectures with Lightweight Stores
manfredsteyer
PRO
0
240
Migrating to Signals: A Practical Workshop
manfredsteyer
PRO
0
420
Micro Frontends with Web Standards
manfredsteyer
PRO
1
310
The New NGRX Signal Store for Angular: 3+n Flavors
manfredsteyer
PRO
1
220
Leveraging the new NGRX Signal Store
manfredsteyer
PRO
0
170
Other Decks in Programming
See All in Programming
Domain-Driven Transformation
hschwentner
2
1.5k
検証も兼ねて個人開発でHonoとかと向き合った話
hanetsuki
1
1.3k
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
7
970
雑に思考を整理する技術と効能
konifar
63
30k
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
180
2 週間で Twitter Bot を作ってみた
contour_gara
0
770
GitLab CI/CD で C#/WPFアプリケーションのテストとインストーラーのビルド・デプロイを自動化する
hacarus
0
170
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
400
Goのエラースタックトレースの歴史と今後
sonatard
10
1.8k
新宿ダンジョンを可視化してみた
satoshi7190
3
380
SIMD Parallel Programming with the Vector API
josepaumard
0
230
What We Can Learn From OSS
inouehi
0
430
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
32
46k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
Unsuck your backbone
ammeep
663
57k
What the flash - Photography Introduction
edds
64
11k
Visualization
eitanlees
137
14k
How to train your dragon (web standard)
notwaldorf
75
5.2k
Building Effective Engineering Teams - LeadDev
addyosmani
32
1.9k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
Code Reviewing Like a Champion
maltzj
515
39k
Documentation Writing (for coders)
carmenintech
61
4k
Facilitating Awesome Meetings
lara
43
5.6k
Statistics for Hackers
jakevdp
790
220k
Transcript
@ManfredSteyer ManfredSteyer The Microfrontend Revolution Module Federation with Angular Manfred
Steyer, ANGULARarchitects.io
@ManfredSteyer Do you remember her? Bonnie Barstow, PhD
@ManfredSteyer Software Engineering is a Team Sport
@ManfredSteyer Coordination b/w Teams
@ManfredSteyer Monolith Flight System
@ManfredSteyer Booking Service Check-in Service Boarding Service Luggage Service Microservices
Sub-Domains (DDD)
@ManfredSteyer Booking App Check-in App Boarding App Luggage App Microfrontends
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer Contents #1: Consequences of Microfrontends #2: Module Federation #3:
Dynamic Module Federation #4: Version Mismatch #5: Possible Roadmap
@ManfredSteyer Manfred Steyer
@ManfredSteyer
@ManfredSteyer Booking App Check-in App Boarding App Luggage App Autonomous
Teams
@ManfredSteyer Autonomous Teams Separate Development Separate Deployment Own architecture decisions
Own technology descisions
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer Challenges UI Composition UI Consistency Bundle Size/ Sharing Dependencies
Version Conflicts between Microfrontends …
@ManfredSteyer Module Federation Solves Some of Them! UI Composition UI
Consistency Bundle Size/ Sharing Dependencies Version Conflicts between Microfrontends …
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer Idea const Component = await import('http://other-app/xyz') Does not work
with webpack/ Angular CLI Even lazy parts must be known at compile time!
@ManfredSteyer Webpack 5 Module Federation Shell (Host) Microfrontend (Remote) //
Maps Urls in // webpack config remotes: { mfe1: "mfe1" } // Expose files in // webpack config exposes: { Cmp: './my.cmp.ts' } import('mfe1/Cmp')
@ManfredSteyer How to Get the Microfrontend's URL? Shell (Host) Microfrontend
(Remote) RemoteEntrypoint.js <script src="…"></script>
@ManfredSteyer How to Share Libs? Shell (Host) Microfrontend (Remote) shared:
[ "@angular/core", "…" ] shared: [ "@angular/core", "…" ]
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer Dealing with Version Mismatch SemVer by Default: Highest compatiable
version Fallback: Use own version Relaxing: Configure a range of accepted versions Singleton: Warning or error
@ManfredSteyer Configuring Singletons shared: { "my-lib": { singleton: true, strictVersion:
true // Error instead of warning! } }
@ManfredSteyer Relaxing Version Requirements shared: { "my-lib": { requiredVersion: ">=1.0.1
<11.1.1" } }
@ManfredSteyer
@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)
@ManfredSteyer Free eBook ANGULARarchitects.io/book Updated for Module Federation and Alternatives
@ManfredSteyer Conclusion Main Purpose of µFrontends: Scaling Teams Decoupling Federation:
Import From Other App Sharing Libs Take Care of Conflicts
@ManfredSteyer Be like Bonnie and think first! Evaluate whether you
need µFrontends No: Majestic Monolith Yes: Consider Module Federation
@ManfredSteyer d Slides & Examples Remote Company Workshops and Consulting
http://angulararchitects.io