0
votes

I'm pretty familiar with UML 2.0, I used it many times, nonetheless I still face some problems understanding some details. For in instance, in Sequence Diagram, I still don't know when to use a synchronous message and when to use an asynchronous. As for Class Diagram, I have some serious problems knowing when to use a composition/aggregation and association. If someone possible illustrates that with concrete examples that would be great.

1
You should split that in two questions and elaborate what your concerns are or your question might get closed for being too broad.qwerty_so

1 Answers

0
votes

Sequence diagrams

A synchronous message is the equivalent of a function call. The processing is performed synchronously (sic) and the result of the processing is known when the function returns.

An asynchronous message is the equivalent of posting a mail. The message will potentially be put in a queue and processed later on, possibly by another thread. The result of the processing may not be available when the call returns.

For high-level diagrams (use cases, architecture, ...), you might consider the distinction as irrelevant.

Class diagrams

Associations, aggregations and compositions are linked to ownership and lifetime of the objects. Association has the loosest relationship, while composed objects die together.

For a complete description with examples, refer to object composition.