UI5

UI5使用Association和Aggregation描述控件之间的关系。

Aggregation:parent和子控件在lifecycle上存在依赖关系:

When a ManagedObject is destroyed, all aggregated objects are destroyed as well and the object itself is removed from its parent. That is, aggregations won't contain destroyed objects or null/undefined.

比如UI5的转盘控件Carousel: 一旦转盘被析构,里面显示的page当然也没有继续存在的意义了,需要跟着被析构。

而Association描述了在lifecycle层面的一种soft dependency关系:

Managed associations also form a relationship between objects, but they don't define a lifecycle for the associated objects. They even can 'break' in the sense that an associated object might have been destroyed already although it is still referenced in an association. 

最明显的例子就是控件和其label的关系,比如button和label:技术上来说,可以彼此分开独立存在。

CRM

CRM的Genil model存在三种类型的relation,可以在doman CRM_RELATION_KIND里查看:

区别:

  • Association: Link between any kind of objects. Can also be defined across components with root or access object as target. 依赖关系最为loose的一种relation,可以用来连接跨model之间的节点。

  • Aggregation: Binds child objects to a root object. Only access and dependent objects can be aggregated. 只适用于同一模型的节点之间的关联。

  • Composition: Like an aggregation, but composed child objects always exist. 特殊类型的Aggregation。目标节点的Cardinality为1或者1..n

S/4HANA

只有两种:association或者composition。Composition的含义同CRM里的aggregation,而association的含义同UI5和CRM中的association一致。

C4C

只有两种: association或者composition。C4C的这两种relation多了一个限制:relation的目标BO必须和源BO在同一个部署单元Deployment Unit,或者目标BO位于Foundation部署单元内。

Association的语法如下图:

association的multiplicity只支持[0,1]或者[1,1], 如果不显式指定,默认为[1,1].

C4C relation的一个特色是,一旦申明了一个子节点之后,系统会默认生成一个对应的composition。

下图第4行代码会自动生成一个[0,n]的从root节点到Item节点的composition。


要获取更多Jerry的原创技术文章,请关注公众号"汪子熙"或者扫描下面二维码:

Association, Composition and Aggregation in UI5, CRM, S/4HANA and C4C的更多相关文章

  1. JAVA类与类之间的全部关系简述+代码详解

    本文转自: https://blog.csdn.net/wq6ylg08/article/details/81092056类和类之间关系包括了 is a,has a, use a三种关系(1)is a ...

  2. 关联,聚合和组合(复合)--Association, Aggregation and Composition

    概要 Association, Aggregation and Composition are terms that represent relationships among objects. Th ...

  3. powerdsigner Association Multiplicity

    这一篇來告诉一个不容易分辨的关系图式:Association(结合)的各种類型,除了了解它的涵义 外,也让各位可以看图說故事,知道它背后所要表达的意义. Association结合 Associati ...

  4. 如何将Twitter的内容导入到SAP CRM和C4C

    Twitter的内容导入SAP CRM Interaction Center呼叫中心 具体步骤查看我的博客Twitter(also Facebook) is official integrated i ...

  5. [emacs] Drawing uml under emacs org-mode using plantUML - 类图

    [emacs] Drawing uml under emacs org-mode using plantUML - 类图 // */ // ]]>   [emacs] Drawing uml u ...

  6. 1 UML基础

    学习设计模式的过程中,发现相关的作者们都会用UML类图来表示一个模式的整体脉络,这种方式确实直观明了,既能体现宏观思路.又能兼顾实现细节.真的是很妙的工具.在开始正式学习设计模式之前,有必要对UML有 ...

  7. UML类图关系总结

    在UML类图中,常见的有以下几种关系: 泛化(Generalization) 实现(Realization) 关联(Association) 聚合(Aggregation) 组合(Compositio ...

  8. UML常用图的几种关系的总结

    在UML的 类图中,常见的有以下几种关系: 泛化(Generalization),  实现(Realization), 关联(Association), 聚合(Aggregation), 组合(Com ...

  9. Understanding the RelationshipType Enumeration [AX 2012]

    Understanding the RelationshipType Enumeration [AX 2012] 3 out of 3 rated this helpful - Rate this t ...

随机推荐

  1. 如何将微信上传AMR格式语音转化为MP3格式

    1. 服务器安装ffmpeg 2. 执行命令 ffmpeg -i {amr_file_path} -f mp3 -acodec libmp3lame -y {mp3_file_path} public ...

  2. 解决Yii2 添加css后页面刷新也无反应的情况

    'assetManager' => [ // uncomment the following line if you want to auto update your assets (unix ...

  3. 查看pip已经安装过的包

    查看pip已经安装过的包 pip list 查看xx包的安装路径 pip install xx 查看python2的pip安装的包 python2 -m pip list 查看python3 的pip ...

  4. C# 序列化(Binary、Xml、Soap)

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.I ...

  5. HBase学习(二)

    HBase安装说明: HBase下载地址: http://archive.apache.org/dist/hbase/ 更新比较多的版本是比较稳定,使用周期比较长的版本 HBase表操作命令:http ...

  6. Mybatis学习笔记18 - 缓存

    两级缓存: 一级缓存:(本地缓存):sqlSession级别的缓存.一级缓存是一直开启的:SqlSession级别的一个Map 数据库同一次会话期间查询到的数据会放在本地缓存中.以后如果需要获取相同的 ...

  7. [转]JS跨域总结

    本文转自:http://www.cnblogs.com/qixuejia/archive/2012/08/29/2662220.html javascript跨域有两种情况: 1.基于同一父域的子域之 ...

  8. 在rails 中返回 zip 文件

    在平日的开发当中我们一般只返回html,json 等等,但是偶尔情况下也会使用到其他文件的返回,比如 pdf ,csv 文件 今天在开发中使用的是将大量的文字返回给用户. ## 知识点 `Tempfi ...

  9. URAL 1142——Relations——————【dp】

    A - Relations Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submi ...

  10. POJ 1182——食物链——————【种类并查集】

    食物链 Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64u Submit Status P ...