In the last years, microservices have exploded in popularity, and many companies are using them to avoid the limitations of large, monolithic backends.
But today many companies continue to struggle with monolithic frontend codebases.
Micro Frontends come to help!
What are Micro Frontends?
The term Micro Frontends extends the concepts of microservices to the frontend world.
With Micro Frontends we can think about a website or web app as a composition of features which are owned and developed by independent teams.
Each team develop its features independently.
When I say Independently, I mean also using different technology stacks if the teams prefer.
An example of Micro Frontends
Let’s take an example of Micro Frontend using the browse page of Netflix.
We assume that there are four teams (team A, team B, team C, team D).
- Team A works on featured movies (Using Angular)
- Team B works on the movies list (using React)
- Team C works on the profile page (using Vue.js)
As you can see, each team is responsible for a small function.
The benefits of using Micro Frontends
Let’s see some of the more obvious benefits of using this architecture.
Smaller and maintainable codebases
We will no longer have a monolith because we will split it into smaller parts.
Each team can work independently, even choosing different technologies.
When the team is responsible only for specific functionality, they can deploy without worrying about something else.
The teams are autonomous and do not depend in any way on other teams.
Which companies use Micro Frontends?
Doing some research with amazement, I noticed that Micro Frontends are used by some big companies like Spotify, Dazn, OpenTable, Ikea, Skyscanner and Zalando.
Micro frontends can be implemented in different ways.
How does Spotify via iframe, how does Ikea through Edge Side Includes or how does OpenTable and Skyscanner through a framework like OpenComponents.
Another interesting method of using Micro Frontends is the one used by Dazn, you can read this interesting article if you are interested.
I believe that more frequently we will hear talking about Micro Frontends in the near future and could be one of the hottest topics for frontend development.
It could represent one of the best ways to manage large codebase and teams.
To learn more about this topic, I suggest you to visit micro-frontends.org