oop - What are the differences between Object Collections, Object Aggregates, Object Associations, and Object Composition? -


i'm seeing these terms used , i'm thinking own usage of them may incorrect. i'm wondering how different.

object collection - ???

object aggregation - ???

object association - ???

object composition - ???

it seems these terms come lately when talking orms, data-mappers, , repositories. example, fowler mentions object collections here. these terms mean specifically, , how should use them in speaking?

object collections

is more broader term, "arrays", but, includes "arrays". collections objects themselves, main goal store several other objects, plus other features depends on each collection kind, such order of insertion, or order of extraction, if duplicated items allowed, , on.

object association

is also, generic term, implies there conceptual relationship between 2 objects. there also, several kinds of "associations", more specific goals.

object aggregation

is object association in object related object. can exist independently, , creation or destruction of one, not affect other one, although operations result of interaction of both objects.

object composition

is object association in object part of main object. sub-object cannot exist independently, usually, it's creation or destruction, managed main object.

note:

note: object aggregation , object composition kinds of object association (s), but, there not ones.


Comments

Popular posts from this blog

java - Could not locate OpenAL library -

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

sorting - opencl Bitonic sort with 64 bits keys -