AOE Technology RadarAOE Technology Radar

Micro Frontends

architecturefrontend
Adopt

While Micro Frontends have gained significant attention as a software architectural approach that mirrors the principles of microservices at the frontend level, it's crucial to recognize that they are not a universal remedy for all frontend development challenges. The decision to implement Micro Frontends should be made thoughtfully, taking into account the project's specific requirements.

Pros:

  • Modularity: Breaking down the frontend into smaller, manageable pieces allows for easier development, testing, and maintenance. Teams can work on individual modules autonomously, leading to faster development cycles.
  • Technology Agnosticism: Enabling the use of different frameworks and technologies for different parts of the application. Teams can choose the best technology stack for each component, promoting flexibility and fostering innovation.
  • Resilience: In monolithic applications, a single bug can potentially affect the entire system. Isolation of components mitigates this risk and simplifies maintenance and debugging.

Cons:

  • Complexity: Managing multiple codebases, handling cross-cutting concerns such as authentication, routing, and state management, and ensuring a consistent user experience throughout the application can introduce a level of complexity that may not be justified for all projects.
  • Performance Overhead: Increased JavaScript bundle sizes and additional HTTP requests, as each module may be loaded separately, can impact page load times, especially in low-bandwidth environments. Careful optimization and caching strategies are required to mitigate this issue.
  • Versioning and Compatibility: Maintaining compatibility between evolving technologies and frameworks is a substantial challenge. Compatibility issues may arise, requiring additional development and testing efforts.

Ultimately, the decision of whether to choose Micro Frontends or other architectural approaches should align with the project's goals, team expertise, and scalability requirements. Individual teams working on well-defined, independently deployable features of a large application may benefit from using Micro Frontends. However, for smaller applications or teams with limited resources, a traditional monolithic approach might be more efficient.

Adopt

The Micro Frontends approach continues to prove to be a valuable pattern for large-scale systems developed by several teams. Therefore, we moved this pattern to "adopt".

We use page composing as one implementation of this pattern.

Trial

When deciding on a system architecture we are always striving for technology neutralism. This is to allow us to stay flexible with future decisions. Micro Frontends can be a tool to support us with this goal. We favor protocols and methods, such as plain HTML and HTTP, over specific technologies when designing Micro Frontends.

Since Micro Frontends have proven to allow use move fast and agile, we moved this pattern to "trial".

Assess

We see many benefits in Microservices – especially in large teams – but often this architecture does not involve the user interface. Instead, you might end up maintaining a frontend monolith. With Micro Frontends you enable your frontend developers to gain the same benefits that we have grown accustomed to in a Microservice architecture: Decoupled components, which are developed and deployed by independent teams. But what sounds reasonable comes with challenges. Integrating different Frontends on the client- or server-side can be tricky, as well as keeping the overall User Experience consistent.

Despite the challenges, Micro Frontends help us to develop large applications across multiple teams. Developers can work more independently without having too much trouble maintaining a large codebase. Being able to update or replace Frontend libraries in some parts of the application is yet another benefit in the fast-moving world of frontend development.