liveBook · Manning

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.

How 4 Manning books explain it

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 →

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
Optimizes business APIs for particular frontend consumers, including mobile applications, websites, and specialized experiences.
How deep it goes
Explains aggregation, optimization, ownership, alternatives, and layering risks without detailing implementation internals.
Examples
Uses mobile and web consumers, a banking transfer API, unsupported HTTP methods, GraphQL, and method-override headers.
What you can do after
Build it from scratch by designing a consumer-specific API and selecting adaptations or API types that fit its constraints.

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

Related concepts

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.