Files
knowledge-kit/Chapter2 - Web FrontEnd/2.20.md
2020-02-25 17:46:51 +08:00

15 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 大前端
记录大前端领域较好的文章
1. [“观点|蚂蚁金服玉伯:我们是如何从前端技术进化到体验科技的?”](https://juejin.im/post/5b6904f1f265da0f48613ab0#comment)
2. [Pattern: Backends For Frontends](https://samnewman.io/patterns/architectural/bff/)
3. [了解 BFF 架构](https://segmentfault.com/a/1190000009558309)
什么情况需要 BFF
- 比如你的后台写好了接口App 的第一个版本上线后发现现有的数据结构不能满足第二个版本的界面需求了。这时候如果没做版本控制,直接将接口做了修改,那么对于 App 没有升级的用户来说是灾难,接口很可能会挂掉。
- 如果之前是 iOS 和 Android App后来加了小程序和 H5 页面,可能需求不一样,这样直接在接口上做修改的话,之前的接口会有非常多的判断代码,逻辑太乱了。一个好的设计是 **“单一原则”**。 后台做基于领域模型的 RPC 接口,前端则根据一个中间服务拿数据,常见的有 Node、PHP、Python提供这种服务 BFF 就是这样一种概念。