本文地址:https://www.cnblogs.com/veinyin/p/14380919.html
重交互的页面业务、核心链路的场景业务(下单等)非常合适
技术优势
-
加载速度:用户感觉页面加载非常快,一进入页面就能看见页面元素
-
良好交互体验:局部渲染,避免了不必要的页面跳转和重复渲染
-
前后端职责分离:前端实现页面交互逻辑,后端负责业务逻辑
-
减轻服务端负载:服务器只处理数据接口输出,不用考虑页面模版渲染和 HTML 展示
技术不足
-
开发成本相对较高(前端其实负责了很多的业务逻辑)
-
首次加载时间过多(其他模块的代码也会打包到首页中,体积增大)
-
SEO 难度较大(单页面元素很多是由 JS 控制,非静态页,不利于 SEO)
技术实现:三大框架