Backends for Frontends (BFF) is an architectural pattern designed to improve the interaction between frontends and complex systems.
The Backend For Fronted (BFF) approach involves dedicating a backend component per frontend type to encapsulate specific variations in protocols, workflows, or functional requirements. Next, we’ll explore the different types of BFFs and how they can be applied to maximize the efficiency, flexibility, and maintainability of your system.
What is a BFF?
A BFF acts as an integration layer between frontends and core system services. This architecture tailors the system to the specific needs of each frontend, as well as facilitating custom protocols, specific workflows , and frontend-optimized technologies. It also solves common coordination and coupling problems between teams developing multiple frontends.
For more details you can consult the following link:
Variants of Backends for Frontends (BFF)
BFFs can be classified based on the type of component dedicated to each scenario or frontend (Web, APP, etc.):
Proxies are a variant of Backends for Frontends (BFF) designed to handle differences in protocols, authorizations, or encryption between different types of frontends. Their main strength is the ability to handle these variations without modifying the underlying workflows, making them an ideal choice when frontends share a common business logic.
In this architecture, each frontend team can have its own proxy, tailored specifically to the needs of its frontend. This proxy acts as an intermediate layer between the frontend and the general system API, adjusting requests and responses to ensure compatibility and efficiency.
Proxies are characterized by being lightweight, focusing exclusively on adapting data and protocols without adding complex logic or additional responsibilities.
Imagine a system with mobile and web applications. Although both interact with the same core services, they might need different data formats or handle protocols like REST on the web and GraphQL in an APP. Here, a specific proxy for each frontend can take care of these adaptations without modifying the main backend.
In short, proxies are an efficient and flexible solution to list of finland whatsapp phone numbers manage technical differences between frontends while maintaining simplicity in the design of the overall architecture.
Orchestrators
Orchestrators are a variant of Backends for Frontends (BFF) that are used when what is email marketing and what is it used for? frontends have completely different workflows. Instead of simply adapting requests and responses as proxies do, orchestrators take responsibility for coordinating multiple underlying services to deliver a unified experience tailored to the specific needs of each frontend.
Each frontend has its own dedicated backend, which brazil data contains the specific logic required for its workflow. This allows for a clear separation between different roles or types of users, optimizing interaction with the system.
Orchestrators excel at managing the complexity of systems where frontends perform tasks that don’t share much in common.
In an e-commerce store,
consumers and administrators have completely different workflows. Consumers access features such as product search, ordering, and payment. Administrators manage inventory, monitor statistics, and process returns.
To manage these differences, a dedicated orchestrator for consumers can coordinate services such as products, shopping cart, and payment gateway, while another orchestrator for administrators focuses on inventory and reporting services.
In short, orchestrators are ideal for systems where the diversity of workflows requires a specialized backend to ensure efficiency and clarity in handling the operations of each frontend.