Geeks With Blogs
Ulterior Motive Lounge UML Comics and more from Martin L. Shoemaker (The UML Guy),
Offering UML Instruction and Consulting for your projects and teams.

No, we're not doing that film (yet). But we are back in Right Court one more time. We're taking an unscheduled break from the schedule this week. I'm giving a UML presentation at Ann Arbor Day of .NET, and I need to prepare material for that. So rather than going Back... to the 80s as planned, I'm going to dual-task: the episodes this week will be the slides I'm prepping for my presentation. These were episodes I was going to run eventually; I'm just doing a little time travel. In Monday's episode, we had a rerun of Episode 8: Right Court, but slightly abbreviated and redrawn as a Sequence Diagram. Today, we see it redrawn yet again, but as a Communications Diagram. (Click the picture for a larger image.)

Episode 11

Whereas I find a Sequence Diagram to be almost self-explanatory, I find Communications Diagrams to be very difficult to read until you get comfortable with them. In this diagram, lines between two Actors and/or Objects indicate allowed paths of communications. The arrows (known as Messages) indicate one Actor or Object asking another to do work. The numbers indicate the order of the Messages. Since Judge controls the courtroom, his messages have whole numbers. Then the decimal indexed Messages follow the major Messages as a response or answer.

And if you're having trouble reading this, that's nothing compared to the trouble I had drawing it! Oy, vey... The easiest way to start drawing Communications Diagrams is to start with a Sequence Diagram, rearrange all the Actors and Objects, and redraw the Messages with numbers for ordering. Seriously! That's exactly how I drew this diagram. Let me repeat Monday's diagram so you can compare:

Episode 10

And to me, that's so much more readable, there's no comparison. In fact, Communications Diagrams were the last UML diagram type for which I found a use.

So why am I showing you a diagram I personally find so difficult? Multiple reasons, but two in particular:

  • Just because I find them difficult doesn't mean you will. In a decade of teaching UML, I have had one student look at a Sequence Diagram and say "I don't get it" but look at the corresponding Communication Diagram and say, "Oh, now I get it!"
  • If you focus on the communication lines as allowed paths of communications, these become a great diagram for defining and enforcing architectural boundaries. If A needs information from C and there's no path between them, then A has to work through B to get what it needs. B may need to change to pass along this information. Or we may need to add a path from A to C. The diagram doesn't give you the right architecture, but it lets you discuss architectural decisions.

The second reason is important enough to turn me into a big proponent of Communication Diagrams. We'll see how I use them in system architecture in later episodes.

Posted on Saturday, November 15, 2008 4:56 PM Ulterior Motive Lounge | Back to top


Comments on this post: Ulterior Motive Lounge Episode 11: It Doesn't Look Like Feb. 2...

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Martin L. Shoemaker | Powered by: GeeksWithBlogs.net