Book Image

The Art of Micro Frontends

By : Florian Rappl
Book Image

The Art of Micro Frontends

By: Florian Rappl

Overview of this book

Micro frontend is a web architecture for frontend development borrowed from the idea of microservices in software development, where each module of the frontend is developed and shipped in isolation to avoid complexity and a single point of failure for your frontend. Complete with hands-on tutorials, projects, and self-assessment questions, this easy-to-follow guide will take you through the patterns available for implementing a micro frontend solution. You’ll learn about micro frontends in general, the different architecture styles and their areas of use, how to prepare teams for the change to micro frontends, as well as how to adjust the UI design for scalability. Starting with the simplest variants of micro frontend architectures, the book progresses from static approaches to fully dynamic solutions that allow maximum scalability with faster release cycles. In the concluding chapters, you'll reinforce the knowledge you’ve gained by working on different case studies relating to micro frontends. By the end of this book, you'll be able to decide if and how micro frontends should be implemented to achieve scalability for your user interface (UI).
Table of Contents (21 chapters)
1
Section 1: The Hive - Introducing Frontend Modularization
6
Section 2: Dry Honey - Implementing Micro frontend Architectures
14
Section 3: Busy Bees - Scaling Organizations

Chapter 7: Server-Side Composition

In the previous chapter, you saw that micro frontends can be composed with very simple methods. The web already gives us everything we need. The problem, however, with such simple solutions is that they don't scale well – neither in development nor at runtime. And scaling is one of the most important points about micro frontends.

Now, the question is: What can we do about it? How can we keep everything as isolated, separated, and independent as possible, without having any constraints on the scalability? One possible answer can be found in the server-side composition pattern. It uses techniques available for web servers to join the micro frontends before they reach the client.

The trade-off of this pattern is that additional complexity needs to be introduced in the backend. As a result, we can dynamically stitch a view together from various sources using server-side composition. It allows horizontal micro frontends without requiring...