So after yesterday’s browse around the various UML diagram flavours i could find, I keep coming back to the sequence diagram as the one which is most accommodating to the tracking of messages through a system.
In fact the only problem with it is the imbalance between the messages (treated as method calls) and the actors (the “real” objects).
Starting with a bog standards sequence diagram, here’s a sample to work with:
We have a controller, which issues a command to calculate the total due to an Invoice object. The invoice object queries each of its line items and builds a sub-total before calling the tax calculator and calculating the total to return.
So, I’ve thought up something I’m calling a message sequence diagram as a starting point. Here’s what I’ve got so far:
As you can see it’s quite compact. Part of this is a result of the fact that I’m passing a message object around “Total Request” and the method names (and return from calls) are not shown. The message is referenced by each actor upon receipt of the message.
Message delivery is shown by the arrows and the sequence of deliveries can be determined from the numbering where necessary.
Now I shall digest this for a little while.
Well that's all very well but you rejected the communication diagram based on lack of detail about the message. Here you show even less detail than in the communication diagram.
ReplyDeleteIn addition, you're not showing the method names (which are still at least part of the "message" as you are thinking of it...)
Rubbish!