Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backends for Frontends pattern #300

Open
iluwatar opened this issue Nov 24, 2015 · 5 comments
Open

Backends for Frontends pattern #300

iluwatar opened this issue Nov 24, 2015 · 5 comments

Comments

@iluwatar
Copy link
Owner

iluwatar commented Nov 24, 2015

Description:
The Backends for Frontends (BFF) design pattern is intended to create separate backend services for different user interfaces or clients. This pattern is particularly useful when different clients (such as mobile apps, desktop applications, and web applications) have distinct needs and require tailored backend interactions. Implementing BFF helps to ensure that each client gets exactly the data it requires in the optimal format, improving performance and maintainability.

Main Elements of the Pattern:

  1. Client-Specific Backend: Each frontend has a dedicated backend service that caters to its specific needs.
  2. Data Aggregation: The BFF aggregates data from various sources and formats it appropriately for the frontend.
  3. Decoupling: This pattern decouples the frontend from the complexities of backend systems, providing a clean API tailored to the frontend's requirements.
  4. Optimized API: Each backend service provides an optimized API for its respective client, improving performance and user experience.

References:

Acceptance Criteria:

  1. Client-Specific Backend Services: Implement distinct backend services for at least two different clients (e.g., web and mobile).
  2. Data Aggregation: Ensure that the BFFs aggregate data from multiple services and format it specifically for their respective clients.
  3. Optimized APIs: Create clean and optimized APIs for each backend service to improve the performance and user experience of the respective frontends.
@javatlacati
Copy link

uml:
image

plantuml code:

@startuml
node mobile{
 component iosapp as "ios app"
 component androidapp as "android app"
}

node intranet{
 component desktop as "desktop app"
 component chatbot
}

component bff as "BFF server"{
 component iosbff as "ios BFF"
 component androidbff as "android BFF"
 component chatbotbff as "chatbot BFF"
 component desktopbff as "desktop BFF"
}

node intranetserv as "intranet  services server"{
 component ss as "supplier service API"
}

cloud onlypublic as "public cloud"{
 component cas as "customer authentication service API"
 component cs as "cart service API"
}

cloud cloudserv as "managed cloud"{
 component os as "order service API"
}

iosapp -- iosbff
androidapp -- androidbff
chatbot -- chatbotbff
desktop -- desktopbff

iosbff -- cas
androidbff -- cas
iosbff -- cs
androidbff -- cs
iosbff -- os
androidbff -- os
chatbotbff -- os
desktopbff -- os

chatbotbff -- ss
desktopbff -- ss
@enduml
pratigya0 pushed a commit to pratigya0/java-design-patterns that referenced this issue Aug 3, 2023
updated subnet mask definition and example
@iluwatar
Copy link
Owner Author

Updated task description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment