SOLID & Design Patterns Interview Question #123
What is the Backend for Frontend (BFF) pattern?
Architectural Patterns, Application Boundaries & Distributed Design Patterns Senior Advanced
Quick Interview Answer
The Backend for Frontend pattern provides a backend tailored to the needs of a particular client experience, such as web, mobile, or an administrative application. The BFF can aggregate downstream calls and expose client-specific data shapes.
Detailed Explanation
The Backend for Frontend pattern provides a backend tailored to the needs of a particular client experience, such as web, mobile, or an administrative application. The BFF can aggregate downstream calls and expose client-specific data shapes.
A BFF is useful when clients have substantially different requirements. Creating a separate BFF for clients with nearly identical needs can add unnecessary services and duplication.
Code Example
Web App -> Web BFF -> Services
Mobile App -> Mobile BFF -> Services
Admin App -> Admin BFF -> Services