You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A visit to `localhost:4200` shows the application.
13
+
14
+
## Benefits of microfrontends
15
+
16
+
- Vertical services (backend and frontend are fully owned by one team)
17
+
- Ship code independently and faster
18
+
- Freedom from existing opinionated codebase
19
+
- Failures will likely only affect your microfrontend and not the whole app and you can release a fix more quickly
20
+
21
+
## You might need microfrontends when...
22
+
23
+
- your releases are slow
24
+
- you need to wait for other teams for unblocking the release pipeline
25
+
- it is not clear who owns which views
26
+
27
+
## Drawbacks of microfrontends
28
+
29
+
- bigger bundle size
30
+
- added complexity of stitching shell app and microfrontends together
31
+
32
+
### Using webpack module federation
33
+
34
+
- microfrontends are more tightly coupled since they share common dependencies
35
+
36
+
## web-component vs iframe
37
+
38
+
iframes are more isolated while web-components are more tightly integrated with the application that embeds them.
39
+
40
+
### Disadvantages of iframes
41
+
42
+
#### Overlays
43
+
44
+
Modals and toast messages are only displayed within the element of the iframe itself and cannot "escape" it. This is why with iframes you would need to use some mechanisms like [Window.postMessage](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) to let the outer application know that it should display a modal or toast message with some specific content that is passed along.
45
+
46
+
#### Theming
47
+
48
+
The DOM of the iframe is separate from the DOM of the embedding application. This makes it harder to use CSS variables for example.
0 commit comments