paint-brush
3 Things You Will Love About Micro Frontendsby@maksymmostovyi
610 reads
610 reads

3 Things You Will Love About Micro Frontends

by Maksym Mostovyi August 27th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Micro frontends are a great way to make your app easy to maintain and scale. The idea is that we split the whole monolith application into smaller pieces and we call them micro frontends. Developers have more control over the codebase, deployments, architecture, and technologies used for the development of that independent piece. The architecture was inspired by back-end microservices. It can make the app better structured, easily maintainable, and scalable. It has enough flexibility in terms of frameworks and libraries, which makes your life as a developer at some point much easier.
featured image - 3 Things You Will Love About Micro Frontends
Maksym Mostovyi  HackerNoon profile picture


Microfronends get more and more popular. A lot of companies have already integrated that approach to the development of web applications. Micro frontends are a great way to make your app easy to maintain and scale, but also it has some disadvantages, such as the implementation of such architecture and more. In this article I will not be focusing on the technical part of that, I would like to tell about how it impacts the development and maintainability of the app.


I've been working on apps with such architecture for some time. I found that approach awesome and very complex at the same time. Because to set all the things up is not so trivial and takes a lot of effort. But once everything is up and running, here is the good part that comes in.


First of all, I would like to briefly go through and explain what is micro frontends, in case you have never worked with them or heard about them.


That architecture was inspired by back-end microservices. The idea is that we split the whole monolith application into smaller pieces and we call them micro frontends. All these parts are wrapped by another web app, a container. It is responsible for navigation, user authentication, and in some cases data distribution.


In case you would like to deep dive and get a better knowledge of what is micro front ends and how it works, I would recommend reading this article.


Let's talk now about how that architecture impacts development and developers. Here I would like to highlight 3 main points.


Managing the codebase

Code managing become so easy. As I mentioned above, the application is built from smaller pieces, which represent pages or separate features. In ideal scenarios, pages/features are assigned to independent front-end teams. And that codebase is totally on them. So, they are free to choose the technologies, libraries they want to use, and the architecture to apply and plan their features roadmap independently. And that approach definitely improves development speed and quality, because it helps to avoid syncing up with other front-end developers, and reduces the number of conflicts in the codebase.


Wide choice of frameworks and libraries

As was mentioned already, micro frontends allow you to use any framework or library. That decision is totally up to the team that is working on a particular codebase. But of course, it’s better to keep consistency in the app and use the same framework as other micro apps using. But in case you want to change it, it is totally possible to do it without a great impact on the whole system. Besides, that team can explore and apply new technologies and solutions and manage than on their own. And that is, I believe, the great benefit of micro frontends.


Deployments

Independent deployments its another key thing. The team working on specific micro frontends has full control of deployments and changes in the repository. First of all, the team has its scope of potential changes in the repository. So they can plan their development and releases without having a dependency on the whole app. And even if something is going wrong during releases, they can easily roll back changes without impact on another piece of the project. Moreover, code owners of the repo have full control of changes merged to the repo, which makes it easier to make the release cuts. And that gives huge advantages to repository control, which is awesome.


Wrapping up

I had a great experience working with micro frontend architecture. I believe it’s a good approach to developing mid to big-size projects. It can make the app better structured, easily maintainable, and scalable. It has enough flexibility in terms of frameworks and libraries, which makes your life as a developer at some point much easier. So developers have more control over the codebase, deployments, architecture, and technologies used for the development of that independent piece. I believe that are valid points, which make you love micro frontends.


I hope my brief story was helpful. Cheers!