Backend for Frontend (BFF)
A dedicated backend per client type (web, mobile, smart TV) that adapts the model to its needs.
Context
Your general-purpose API leaves the mobile app making 6 requests to render a screen, while the web needs completely different fields.
Problem
A single API trying to serve everyone ends up with versioned endpoints, fat payloads, and client-side workarounds.
Solution
Each client has its own BFF that composes internal calls and returns exactly what it needs.
CSHARP
[Web] → [BFF Web] → [Internal Services]
[Mobile] → [BFF Mobile] → [Internal Services]
[TV] → [BFF TV] → [Internal Services]
Tradeoffs
| Pro | Con |
|---|---|
| Optimal UX per client | More backends to maintain |
| Web/mobile teams can iterate independently | Common logic to duplicate/extract |
#architecture #api