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.

In our last Episode, Apathetic Coder and The UML Guy derived code from Sequence Diagrams. Today, the Lounge has a pair of unexpected visitors. (Click picture for a larger image. UPDATE: The larger image is broken somehow. I probably can fix that later tonight.)

Episode 22

This Episode is a hodgepodge of obscure references:

If you don't know all of these references, this Episode can be completely baffling.

Kinda like the arrows can be in UML, until you get used to them.

To me, the UML arrows are natural. They're "right". They're what I learned, and they make sense.

But to people skilled in ERDs and DFDs, the arrows are precisely backwards. In those notations, arrows indicate the direction that data moves: in other words, from provider to client. UML's arrows run from client to provider.

For that difference, I can only apologize. The notation is what it is. It took me two years of teaching UML before some student had the guts to raise a hand and ask "Why are the arrows backwards?" Now at least I'm aware of the issue, and (usually) remember to bring it up early so that you can grapple with it.

At the same time, what's the client and what's the provider isn't necessarily cut and dried. In fact, it can be an arbitrary implementation decision. Does a book refer to its chapters, or does a chapter refer to its book? Or both? And if the answer is both, is that one association, or two? In code, it almost has to be two; and in UML, we would model that as two arrows. But if it's a single association, we model that as just a line, not an arrow. That's also a common way to model the association when we haven't yet decided what's the client and what's the provider.

So if the arrows are confusing, I apologize. I'll do my best to make really clear examples.

This Episode is for Harry and Scott, who demanded it. Now, they didn't hold me at gunpoint, but they got really close...

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

Comments on this post: Ulterior Motive Lounge Episode 22: Time's Arrow

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

Copyright © Martin L. Shoemaker | Powered by: