liveBook · Manning

Backend-for-frontend pattern

Also called BFF

The backend-for-frontend pattern provides a backend service tailored to a particular frontend or client, adapting or aggregating interactions with underlying services.

How 6 Manning books explain it

Fast by Default

A Backend for Frontend is an architectural pattern that provides a backend service tailored to the needs of a particular client application or interface.

How it is used
Reduces client network round trips by tailoring and aggregating API responses for a particular interface.
How deep it goes
Defines client-specific BFFs and elaborates incremental proxy, aggregation, parallelization, and migration steps.
Examples
Uses SoundCloud’s separate Mobile, Web, and partner APIs and a gradual sequential-call migration scenario.
What you can do after
Apply it by introducing a thin aggregation layer that lets clients replace sequential service calls with one tailored response.

Read how Fast by Default explains backend-for-frontend pattern →

Python Concurrency with asyncio

A backend-for-frontend service is a service dedicated to making backend calls and aggregating responses for a particular type of frontend client.

How it is used
Aggregates microservice calls for client-specific e-commerce APIs while centralizing response composition and resilience logic.
How deep it goes
Defines the pattern and implements a product listing service with concurrent requests, timeouts, optional data, retries, and circuit breaking.
Examples
Uses an e-commerce product page combining product, inventory, cart, and favorite-service responses.
What you can do after
Build a resilient aggregated API with asyncio and aiohttp, including bounded waits and partial responses.

Read how Python Concurrency with asyncio explains backend-for-frontend pattern →

ASP.NET Core in Action, 3e

Backend for Frontend is an architecture pattern that provides a dedicated backend for a particular frontend, handling authentication and translating or forwarding frontend requests to downstream APIs.

How it is used
Secures SPA-to-API communication by moving OpenID Connect handling and bearer-token management into an ASP.NET Core backend.
How deep it goes
Explains the authentication and forwarding flow, but does not detail implementation configuration or backend endpoint code.
Examples
Uses Blazor WebAssembly, React, and Angular frontends calling an ASP.NET Core backend that forwards requests to a real API.
What you can do after
Operate a SPA without exposing its API bearer tokens to the browser, while accepting the cost of an additional backend service.

Read how ASP.NET Core in Action, 3e explains backend-for-frontend pattern →

Secure APIs

The backends-for-frontends pattern provides client-specific backend interfaces tailored to the needs of different frontend applications.

How it is used
Provides frontend-specific interfaces through an API gateway when clients would otherwise integrate with multiple backend APIs.
How deep it goes
Explains the pattern’s purpose and gateway role, but stops short of implementation code or detailed interface design.
Examples
Uses an e-commerce system spanning serverless, Kubernetes, dedicated servers, REST, GraphQL, gRPC, and asynchronous APIs.
What you can do after
Apply it through an API gateway to hide backend complexity and expose client-tailored interfaces.

Read how Secure APIs explains backend-for-frontend pattern →

Grokking Software Architecture

A design pattern that provides a dedicated API tailored to a specific user interface or client.

How it is used
Tailors an API to a specific user interface when clients have different needs.
How deep it goes
Defines the pattern and illustrates its responsibilities with mobile and warehouse examples.
Examples
Uses a mobile adapter that reduces data and a warehouse adapter built with GraphQL.
What you can do after
Evaluate whether a client with distinct needs warrants a dedicated API adapter.

Read how Grokking Software Architecture explains backend-for-frontend pattern →

The Design of Web APIs, Second Edition

A backend-for-frontend is a consumer-specific backend API that aggregates and optimizes one or more underlying APIs for a particular frontend application or channel.

How it is used
Aggregates and optimizes business APIs for a specific consumer, such as a mobile app or website.
How deep it goes
Explains its experience-API role, consumers, ownership, and the organizational risks of adding layers.
Examples
Uses a POST-only banking app that needs to update transfers as an example of adapting consumer requests.
What you can do after
Apply it to aggregate and optimize APIs for a frontend or adapt requests to that consumer’s constraints.

Read how The Design of Web APIs, Second Edition explains backend-for-frontend pattern →

Also covered in

What to know first

Related concepts

Questions about backend-for-frontend pattern

What is backend-for-frontend pattern?

The backend-for-frontend pattern provides a backend service tailored to a particular frontend or client, adapting or aggregating interactions with underlying services.

Which Manning books explain backend-for-frontend pattern?

Fast by Default, Python Concurrency with asyncio, ASP.NET Core in Action, 3e, Secure APIs, Grokking Software Architecture and The Design of Web APIs, Second Edition.

What should I know before learning backend-for-frontend pattern?

Manning books that teach backend-for-frontend pattern usually introduce REST, HTTP, contract and authentication first.

What is backend-for-frontend pattern a kind of?

Backend-for-frontend pattern is a kind of design pattern. A design pattern is a reusable, general solution structure for a recurring software design problem.

What is backend-for-frontend pattern also called?

Backend-for-frontend pattern is also called BFF.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.