Why should I use "A.method" when I send a message to "A"?

It has been a challenge for people to understand why they use “A.method” for sending message to “A”. The logic is there are cases (very often) that who is sending the message is NOT important. This syntax is to address that scenario. We have been calling these scenarios as “sync messages”.

Not have an explicit “Client” is the default for ZenUML and has been the recommended way to draw sequence diagrams. It also the distinguishing feature of ZenUML.

For many people, sequence diagram is used to describe interactions between participants which is correct. They think naturally the syntax should be “A → B: Message”. Even though we support this, “sync messages” tend to be more powerful and with more expressiveness.

The question is how to sell this idea to end users.

What does the specification say?

This kind of message is called “FoundMessage”.

FoundMessage

 

Found messages are messages with known receiver, but the sending of the message is not described within the specification. See 17.4.4 (Message)

17.4.4.1 A found message is denoted with a small black circle at the starting end of the message.

 

Ideas

Add a FAQ to the Editor

Add a default “Client” in the viewer

When the editor is empty, we show a semi-opacity “Client” lifeline in the viewer and say “Client” is an implicit participant. You can assume that the message is from somewhere that is NOT important.

Tell users to use “A->B.method”

Add support of “{}” to “A → B: message {}”

We have chosen not to support this because of syntax complexity and semantic rationality.

From syntax point of view, to support “{}” we need to exclude “{“ from allowed characters in message. This actually is not that difficult.

Add the black circle at the arrow end of the message

Add description on the arrow as tooltip