Microfrontends should be your last resort

In today’s tech industry, front-end developers often discuss “micro frontends,” which are similar to microservices for back-end systems. However, just like poorly designed microservices can create a distributed monolith, implementing a bad micro-frontend architecture can result in tightly-coupled code spread across various components. While there are benefits to MFEs for large teams with well-defined domains, most teams are not in this position and should focus on refactoring their domains before adopting a more complex architecture. MFEs make it challenging to release, move, and test code coherently. Instead, it is recommended to start with a modular monolith and refactor domains before creating new pipelines.

MFEs, which are modularizing front-end JavaScript apps, have their roots in solving specific technical problems. They allow teams to work independently by providing separate contexts. However, implementing MFEs incorrectly can lead to a distributed monolith, with complex dependencies mediated through mechanisms like HTTP calls or events. This makes refactoring difficult compared to a monolith, where changes can be made and tested easily within a single repository. MFEs have overheads and can require careful coordination and integration testing. To mitigate these issues, dependencies should be minimized, and domains should

https://www.breck-mckye.com/blog/2023/05/Microfrontends-should-be-your-last-resort/

To top