知识卡片

普通读书笔记卡 · 3355

BFF按界面定制后端

理解等级:初级

Backend for Frontend 是针对设备或界面类型建立专用后端接口层,让前端取得适合自身场景的数据,并可聚合多个后端调用。它处于前端与业务服务之间;放入 BFF 的逻辑应与特定界面需求相关,避免把通用业务能力复制过去。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Principles of Software Architecture Modernization》第2章《Anti-Patterns: Lack of Isolation》(源文件:`_epub-src/OPS/ch02.xhtml`,归一化正文 [12568:16927)) - 结论依据:原文给出 SoundCloud 对 BFF 的定义,并描述其位于前端和业务服务之间、聚合适合特定界面的调用。 - 原始内容:SoundCloud defines BFF as “an architectural pattern that involves creating multiple, dedicated API gateways for each device or interface type, with the goal of optimizing each API for its particular use case.” BFFs live between the frontend and backend ( Figure 2.6 ), being the backend for the frontend, as the name says. BFFs are often written in JavaScript or TypeScript running on NodeJS, but they can be written in any language.