.NET Architecture & System Design Interview Question #111

What is the Backend for Frontend (BFF) pattern?

Microservices, API Gateway, Service Communication & Event-Driven Architecture Mid-Level Intermediate

Quick Interview Answer

A Backend for Frontend provides a backend layer tailored to a specific client type such as web, mobile, or administration. Each BFF can aggregate or shape data according to that client's requirements.

Detailed Explanation

A Backend for Frontend provides a backend layer tailored to a specific client type such as web, mobile, or administration. Each BFF can aggregate or shape data according to that client's requirements.

BFFs are useful when clients have materially different needs. If all clients require nearly identical behavior, separate BFFs can create unnecessary duplication.

Code Example

Web App    -> Web BFF    -> Services
Mobile App -> Mobile BFF -> Services
Admin App  -> Admin BFF  -> Services