Member-only story

Backends for Frontends (BFF) Pattern: Architectural Patterns

The Backends for Frontends (BFF) pattern is an architectural pattern that involves creating a separate backend service for each frontend application. This pattern is often used in microservices architectures, where each service is responsible for a specific function.

Following the BFF pattern doesn’t mean you’re creating a new backend, but rather that you’re creating an abstraction, which will be known to your frontend.

The BFF Pattern proposes the creation of a layer that acts as an intermediary between frontends and underlying microservices, aggregating and transforming data to meet the specific requirements of each platform. The BFF pattern is best used in situations where there are multiple front-end applications that have different requirements.

For example, a company might have a mobile app, a web app, and a native desktop app. Each of these applications might have different requirements for data access, caching, and security. In this situation, the BFF pattern can be used to create a separate backend service for each front-end application. This can help to ensure that each frontend application gets the data it needs, in the format it needs, and in a way that is secure.

Traditional(Left) vs BFF Pattern(Right)

Advantages of the BFF Pattern:

--

--

Pratik Pandey - https://pratikpandey.substack.com
Pratik Pandey - https://pratikpandey.substack.com

Written by Pratik Pandey - https://pratikpandey.substack.com

Senior Engineer with experience in designing and architecting large scale distributed systems.

No responses yet