Frontend Architectural Patterns: Backends-For-Frontends
Client-Tailored Microservices
Is your backend architecture making it difficult to implement delightful user-facing experiences? Has your API monolith become a bottleneck for your front-end teams? You might want to try out the Backends-For-Frontends (BFF) architectural pattern.
What is it?
The backends-for-frontends pattern describes a world in which each of your client applications has its own server-side component — a backend for each frontend.
This pattern works well if you have multiple client interfaces with significantly different needs that all consume the same underlying resources. A common real-world example is an application that has both a web and a mobile client.
To understand why backends-for-frontends are useful, let’s take a look at how web architecture has evolved over the years.
Multiple clients with a single general-purpose server
Simplicity is great, right? It absolutely is…but only up to a point. For smaller applications, this architecture is just fine. However, monoliths tend to break down with scale. You might hear your teams start to say things like…
- Our server is so bloated…