The BFF Pattern (Backend for Frontend): An Introduction

The BFF Pattern (Backend for Frontend): An Introduction

The BFF Pattern (Backend for Frontend): An Introduction. Get to know the benefits of using the BFF pattern in practice - Imagine a scenario where you need to build an e-Commerce application using microservices.

Get to know the benefits of using the BFF pattern in practice

Imagine a scenario where you need to build an e-Commerce application using microservices. You may have microservices for Customers, Orders, Products, Shopping carts, etc. The microservices will exposes APIs to be used by the frontend.

However, the data returned to the frontend by the Microservices may not be formatted or filtered according to the exact way the frontend needs to represent them.

In that case, the frontend needs to have some logic on its own to re-format these data. Having such logic in the frontend will use up more browser resources.

In a situation like this, we can use a BFF in order to shift some of this front-end logic to an intermediate layer. The intermediate layer is the BFF. When a frontend requests some data, it will call an API in the BFF.

The BFF will do the following.

  • Call the relevant microservices APIs and obtain the needed data

  • Format the data based on the frontend representation

  • Send the formatted data to the frontend

    As a result, there will be minimal logic on the frontend. Therefore, a BFF helps to streamline data representation and takes up the responsibility of providing a well-focused interface for the frontend.

microservices backend-development javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Hire Dedicated JavaScript Developers -Hire JavaScript Developers

Hire dedicated JavaScript Developers who are proficient in AngularJS, ReactJS, NodeJS, & VueJS frameworks. Get flexible hiring models as per your business requirements.

Hire Backend Developers India

Are you looking to hire experienced Backend Developers at a reasonable cost to boost-up your IT business? **[Hire Backend Developers India](https://hourlydeveloper.io/hire-back-end-developer/ "Hire Backend Developers India")** and accomplish...

Hire Dedicated Backend Developers

Want to create a backend for a web or mobile app using PHP & JS frameworks? **[Hire Dedicated Backend Developers](https://hourlydeveloper.io/hire-back-end-developer/ "Hire Dedicated Backend Developers")** who offer end-to-end, robust, scalable...

How long does it take to develop/build an app?

This article covers A-Z about the mobile and web app development process and answers your question on how long does it take to develop/build an app.

Developer Career Path: To Become a Team Lead or Stay a Developer?

For a developer, becoming a team leader can be a trap or open up opportunities for creating software. Two years ago, when I was a developer, ... by Oleg Sklyarov, Fullstack Developer at Skyeng company