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

业务写前端好还是后端好? #501

Open
pengkobe opened this issue Jan 21, 2019 · 0 comments
Open

业务写前端好还是后端好? #501

pengkobe opened this issue Jan 21, 2019 · 0 comments

Comments

@pengkobe
Copy link
Owner

pengkobe commented Jan 21, 2019

这是一个很有争议的话题,有人说写前端好,有人说写后端好。

写前端好

  • 可以降低服务器压力
  • 前端计算很快,用户不会感受得到小小的计算时间
  • 前端语言发展,有各种框架和库的支持,写代码和后端一样高效

写后端好

  • 前端专注 UI,业务更改时只需要修改后端代码发布即可,前端版本管理复杂,发布麻烦
  • 后端缓存后,对重复信息不需要重复计算,直接拉取就能用
  • 业务逻辑与基础数据平台和前端的分离,利于开发人员开发与维护

    貌似跟写在前端和后端也没有关系

  • 冗余字段较多,而网络流量的花费不容小觑
  • 部分功能需要多次请求,而网络延时的不确定性往往比后端内网大

  • 需要经常变更的还是写后端比较好
  • 不需要变更的直接写在前端也无妨
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant