Hybris service layer 和 CRM WebClient UI 一些架构层面的横向比较
首先看 CRM WebClient UI 的架构图,经典的四层结构:
我把Hybris service layer理解成CRM WebUI的API layer.
The Hybris ServiceLayer is an API for developing services for SAP Hybris Commerce. It provides a number of common services, while allowing you to extend these or develop your own.
The main characteristics of the ServiceLayer are: - 我逐条和CRM WebUI框架比较
(1) It is based on a service-oriented architecture.
Hybris里的SOA架构和BYD不一样,后者支持不同的deployment unit部署在不同服务器上, cross unit的应用通过message通信。
Hybris是一个monolithic应用,所有的extension物理上都运行在一台server,一个session里(不考虑cluster mode)
(2) It provides a clean separation of business logic and persistence logic.
CRM WebUI也满足这一特性。
(3) It provides a number of services, each with its well-defined responsibilities.
(4) 这个描述太generic,大多数framework的某个layer都应该满足。
(5) It provides a framework to develop your own services and to extend existing ones.
CRM WebUI的API和Genil layer也支持extensibility.
(6) It is heavily based on the Spring Framework.
这是Hybris的特色和强大之处,抱Spring的大腿。
(7) It is based on common patterns, such as interface-oriented design and dependency injection.
CRM WebUI也满足。
(8) It is the layer where partners should implement their business logic.
CRM WebUI也满足。
(9) It provides hooks into model life-cycle events for performing custom logic.
ABAP没有 build一说,也不需要在class activate的时候执行post操作。没有这种use case.
(10) It provides hooks into system event life-cycle events such as init and update process.
同第 8 点比较。
(11) It provides a framework for publishing and receiving events.
CRM WebUI里大量使用到的event subscription和issue就是CL_CRM_BOL_ENTITY_COL的focus_changed event.
上图的client是这四种entity的通称:
(1) Page Controllers of an MVC framework
(2) Web Service clients
(3) Scripts
(4) Other services
在Ticket Routing Rules里配置:
和SAP许多其他产品的determination套路一样,同一列之间的不同column是AND关系,不同列之间是OR关系。
这些rule在后台还是存储成一系列BRF相关的模型。
我们在前台看到的determination rule界面,在后台存储成BRF function里的一个decision table:
ABAP的SM50查看当前server可用的dialog process。
Hybris
查看某个thread当前detail状态:
“TaskExecutor-junit-3459-TriggerTask [8796093416374]” prio=5 tid=0x3459 nid=0xd83 TIMED_WAITING - stats: cpu=0 blk=-1 wait=-1
java.lang.Thread.State: TIMED_WAITING
at sun.misc.Unsafe.park(Native Method)
- parking to wait for java.util.concurrent.locks.AbstractQueuedSynchronizer
ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at de.hybris.platform.core.threadregistry.RegistrableThread.internalRun(RegistrableThread.java:145)
at de.hybris.platform.core.threadregistry.RegistrableThread.run(RegistrableThread.java:135)
Locked synchronizers: count = 0
这个功能相当于ABAP的SM50里双击某个dialog process看到的detail callstack。
- 点赞
- 收藏
- 关注作者
评论(0)