当前位置:网站首页>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 服务器发起的.

边栏推荐
- QT 小知识随记
- 高效目标检测:动态候选较大程度提升检测精度(附论文下载)
- T+Cloud:构建新型生意社交网络和营销关系的“智公司”
- PG网络传输安全SSL介绍及使用示例
- 手把手教你CSP系列之script-src
- [Awards for Essays] Autumn recruitment special training to create your exclusive product experience
- SIGIR 2022 | 邻域建模Graph-Masked Transformer,显著提高CTR预测性能
- Defaced Fingerprint Recovery and Identification
- 《学会写作》粥佐罗著
- Exploration and Practice of Database Governance
猜你喜欢
随机推荐
[Awards for Essays] Autumn recruitment special training to create your exclusive product experience
基于YOLOV5行人跌倒检测实验
Kubernetes之list-watch机制
Industrial CCD and CMOS camera
迪赛智慧数——其他图表(主题河流图):近年居民消费、储蓄、投资意愿
SAP UI5 的初始化过程
百度智能云重庆工业互联网平台正式亮相,深耕重庆,辐射西南
译文推荐|Apache Pulsar 隔离系列(四):单集群隔离策略
v-model的使用
Chrome 开发者工具 performance 标签页的用法
T+Cloud:构建新型生意社交网络和营销关系的“智公司”
手把手教你CSP系列之script-src
lds链接的 顺序问题
internship:改了需求
TikTok如何为独立站引流?
【Attention演变史】翻译模型seq2seq (第二弹)
Query the published version records of the APP Store
Jmeter - Heap配置原因报错Invalid initial heap size: -Xms1024m -Xmx2048mError
笔记本WIFI无法上网(无Internet访问权限)
ELECTRA:Pre-training Text Encoders as Discriminators Rather Than Generators








