Exploring communication patterns
Running multiple SPA frameworks independently is a good start, but it’s not fully what we’ll need in real-world applications. In many applications, we will need to have some form of communication between these – at least on some occasions.
There are three quite important aspects that need to be covered by these communication requests:
- Sharing some messages, for example, to inform other micro frontends about a specific event
- Sharing data, for example, to spread knowledge efficiently about shared domain objects
- Providing components, for example, to bring
get
functionality from a different domain to a larger UI building block
All of these three aspects can be implemented following the architecture patterns discussed in the next subsections. We’ll start with the exchange of events.
Exchanging events
By far the most crucial communication pattern for micro frontends is the usage of events. There...