Knowledge sharing
Ideally, each micro frontend represents an isolated module, which works without dependencies and without any knowledge of the other micro frontends. Realistically, micro frontends will have dependencies and at least some knowledge of other micro frontends.
There are two kinds of references:
- Direct (or strong) references leading to strong coupling
- Indirect (or weak) references leading to loose coupling
Only loosely coupled modules can scale well. The problem with loosely coupled modules is that still some conventions and contracts need to be followed. For instance, if we emit an event with a certain name, potential listeners expect this name to remain the same. Once we change the name, the listeners cannot receive this event anymore.
The agreement for an identifier is what we refer to as knowledge sharing. There are multiple ways to perform the act of knowledge sharing:
- Two or more teams agree on a certain name.
- One team picks the...