Stitching in BFFs
The notion of a dedicated aggregation layer is a crucial part of server-side composition and edge-side composition. But going beyond these two patterns, we can see BFFs being used for all kinds of things – not only as aggregation layers to render HTML, but also to provide information that is only relevant for the frontend.
While client-side composition and, in general, stitching in the browser is not uncommon, the potential performance improvements that come by providing everything – potentially even cached – from a central source should not be underestimated.
Bringing in a CDN to serve static resources faster is definitely a good way to gain performance. A good combination of server-side composition and edge-side composition would make use of layouts and advanced HTML manipulation (for example, for forms) on the server and bring together the final pieces in a flat stitching approach.
Flat stitching refers to ESI or SSI resolutions that...