当前位置:网站首页>Differences in the working mechanism between SAP E-commerce Cloud Accelerator and Spartacus UI
Differences in the working mechanism between SAP E-commerce Cloud Accelerator and Spartacus UI
2022-08-04 19:34:00 【HUAWEI CLOUD】
单页面应用程序,又称 Single Page Application,在当今的webThe field of application development is very popular.Many businesses are interested in it,Developers want to explore it to come up with better ideas.与此同时,多年来,Multiple Page Appshave been doing well.
If you compare them based on their value and market range——它们各有利弊.那么,单页面应用程序(spa)和多页面web应用程序(mpa)哪个更好呢?
SAP Commerce Cloud Accelerator UI 基于 JSP,属于服务器端渲染技术,Commerce 服务器将渲染好的 HTML 页面发送给客户端.
当用户在当前页面点击某些元素,要跳转到新的 UI 时,这些新的 UI 和当前页面是由不同的 page 实现的.因此这些跳转操作,会触发浏览器向服务器发起新的页面请求(page request).
客户端收到服务器发送的页面响应后,刷新自己的页面:
而 Spartacus UI 是单页面应用,客户端仅仅向服务器端请求一次页面模板代码( ng build 生成的 JavaScript 代码):
至于页面要显示的业务数据,通过 OCC API 调用向服务器端索取:
最后,客户端也就是浏览器里,执行 Angular 框架代码,执行页面模板对应的 JavaScript 代码,将服务器端返回的 OCC API 响应进行渲染,得到最后客户看到的 Storefront 页面.
当然,Spartacus UI 也支持服务器端渲染模式:Server Side Render mode,简称 SSR,此时页面源代码的渲染是在 SSR 服务器上完成.OCC API 的调用,也是 SSR server 向 Commerce 服务器发起的.
更多Jerry的原创文章,尽在:“汪子熙”:
SAP Commerce Cloud Accelerator UI 基于 JSP,属于服务器端渲染技术,Commerce 服务器将渲染好的 HTML 页面发送给客户端.
当用户在当前页面点击某些元素,要跳转到新的 UI 时,这些新的 UI 和当前页面是由不同的 page 实现的.因此这些跳转操作,会触发浏览器向服务器发起新的页面请求(page request).
客户端收到服务器发送的页面响应后,刷新自己的页面:
而 Spartacus UI 是单页面应用,客户端仅仅向服务器端请求一次页面模板代码( ng build 生成的 JavaScript 代码):
至于页面要显示的业务数据,通过 OCC API 调用向服务器端索取:
最后,客户端也就是浏览器里,执行 Angular 框架代码,执行页面模板对应的 JavaScript 代码,将服务器端返回的 OCC API 响应进行渲染,得到最后客户看到的 Storefront 页面.
当然,Spartacus UI 也支持服务器端渲染模式:Server Side Render mode,简称 SSR,此时页面源代码的渲染是在 SSR 服务器上完成.OCC API 的调用,也是 SSR server 向 Commerce 服务器发起的.
边栏推荐
- nr part calculation
- Storage resource activation system to help new infrastructure
- A complete cross-compilation environment records the shell scripts generated by peta
- PostgreSQL的 SPI_接口函数
- zynq records
- SAP 电商云 Accelerator 和 Spartacus UI 的工作机制差异
- 将网页变成字符串,并保存起来
- 高效目标检测:动态候选较大程度提升检测精度(附论文下载)
- 使用.NET简单实现一个Redis的高性能克隆版(二)
- How to add custom syntax to MySQL?
猜你喜欢
随机推荐
The difference between Client Side Cache and Server Side Cache
internship:改了需求
【HCIP】MPLS WPN 实验
openharmony初体验(1)
密码学系列之:PEM和PKCS7,PKCS8,PKCS12
getBoundingClientRect
To -.-- -..- -
目标检测的发展与现状
PostgreSQL的 SPI_接口函数
【着色器实现Glitch单项故障闪烁效果(与Television效果不同)_Shader效果第十四篇】
Pedestrian fall detection experiment based on YOLOV5
如何推动乡村振兴的落地
seata源码解析:seata server各种消息处理流程
如何手动下载并安装 Visual Studio Code 的 SAP Fiori tools - Extension Pack
really time ntp service start command
【ASP.NET Core】 中间件
力扣题(5)—— 最长回文子串
03 ts类型缩小,函数
如何让远在的老板看到你!----------来自财富中国网
致-.-- -..- -