Architecture Patterns
The idea behind Micro Frontends is to think about a website or web app as a composition of features which are owned by independent teams. Each team has a distinct area of business or mission it cares about and specialises in. A team is cross functional and develops its features end-to-end, from database to user interface. Let's take a look at the following diagram about Microfrontends architecture:
Microfrontends
So the example application might look like this:
Example Microfrontends
Source: https://martinfowler.com/articles/micro-frontends.html
As we know already what is Microfrontends architecture, let's take a look at pros and cons of using it.
Benefits of using Microfrontends
Implementing Microfrontends architecture comes with several useful benefits that I listed below like:
-
Being Technology Agnostic - Teams can choose technology stack that works for them best.
-
Team Code is isolated - Build independent applications in isolated environments and repositories
-
Independent deployment - Applications in Microfrontend architecture can be deployed independently which is great for Continuous Deployment / Delivery
-
Incremental upgrades - Changes can be applied incrementally without affecting the whole application which is easier to test and less risky.
Cons of using Microfrontends
Using Microfrontends architecture comes with benefits but it can also lead to issues. Take a look at some of them below:
-
Bigger complexity - Maintaining and aligning several product teams can be much more difficult.
-
Terminology - Teams should have unique namespaces that will not colide with each other.
-
Sharing context - In some cases like Auth, frontend apps might need to share context of authenticated user which may be complicated to implement.
Resources
Check out the following resources to learn more about Microfrontends Architecture: