Backend for Frontend (BFF) is a design pattern that decouples the backend and frontend for different client types, such as mobile, web, desktop, and voice assistants. It provides dedicated APIs, data conversion, and performance optimization for each client. The Backends for Frontends pattern is useful when you want to avoid customizing a single backend for multiple interfaces.
The Backends for Frontends pattern was first described by Sam Newman. The pattern suggests creating separate backend services to be consumed by specific frontend applications or interfaces. This pattern is useful when you want to avoid customizing a single backend for multiple interfaces.
By creating one backend per user interface, each backend can be optimized for that interface. As a result, it will be smaller, less complex, and likely faster than a generic backend that tries to satisfy the requirements for all interfaces. Each interface team has autonomy to control their own backend and doesn’t rely on a centralized backend development team. This gives the interface team flexibility in language selection, release cadence, prioritization of workload, and feature integration in their backend.