on 06-26-2014 1:11 PM
Hello experts,
Can anyone of folks tell the difference between aggregation and association in ui5 with details ?
Hi,
as per UI5 documentation,
An aggregation is a special relation between two UI element types. It is used to define the parent/child relationship within the above mentioned tree structure. The parent end of the aggregation has cardinality 0..1, while the child end may have 0..1 or 0..*. The element's API - as generated by UI5 tools - offers convenient and consistent methods to deal with aggregations (e.g. to get, set, or remove target elements). Examples are table rows and cells, or the content of a table cell.
An association is another type of relation between two UI element types which is independent of the parent/child relationship within the above mentioned tree structure. Directed outgoing associations to a target of cardinality 0..1 are supported. They represent a loose coupling only and are thus implemented by storing the target element instance's ID. The most prominent example is the association between a label and its field.
tables rows and cells is the example of aggregation whereas label associated with input field is the example of association.
Hope this helps.
Regards,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.