Backend-for-Frontend and Client-Specific API Design Questions

Shaping API responses to the needs of specific client types: the Backend-for-Frontend (BFF) pattern, one BFF per client versus a shared gateway, client-side composition or a generic API, what belongs in a BFF (including normalizing inconsistent downstream pagination and error formats for one client), and aggregating several backend calls into one client-shaped response. Covers payload shaping (sparse fieldsets and field selection against relational and document stores, partial responses, optional expansion of related collections, delta responses with deletions, compact serialization including binary wire formats), round-trip reduction and composite views for feeds and dashboards, adapting to mobile versus web bandwidth, battery and device constraints (device-appropriate image variants, prefetching and refresh frequency tuned to connection quality), and choosing GraphQL versus REST to fix over- and under-fetching, including incremental migration from REST to GraphQL. Authentication, general REST resource design, versioning, rate limiting, offline sync and real-time transport are covered elsewhere.

MediumSystem Design
32 practiced

A product has web, iOS and Android clients that each need aggregated views combining several backend services. Evaluate an API gateway, client-side composition and a Backend-for-Frontend per client, covering latency, caching, developer productivity, code duplication, schema evolution and operational complexity. Which would you recommend for a platform with several internal product teams, and why?

HardSystem Design
43 practiced

You need one API strategy that serves mobile clients on poor connectivity and web clients that need rich interactivity. Would you serve both from the same API, a shared gateway, or separate client-specific backends? How would the protocol, payload shape and caching differ per client class?

That is every published Backend-for-Frontend and Client-Specific API Design question for Solutions Architect so far. Browse the other topics in this category, or practice this one interactively.