Sequence diagramming that's fit for purpose
Illustrate your point
Posted in Software, 22nd December 2007 01:02 GMT
Free whitepaper – PowerEdge M610 technical guidebook
Sequence diagramming in practice - test yourself
Continuing with our sample internet bookstore application, the following diagram shows an excerpt from a sequence diagram for the "Create New Book" use case. This use case is intended for bookstore staff, so that they can add new book titles to their online catalog. There are a couple of problems with this diagram excerpt - one of which is repeated many times in our diagram. See if you can find them both. Hint: the errors relate back to items one and seven in the top-10 list.
Hidden problems: flawed sequence diagram
Our next illustration highlights the parts of the sequence diagram that have gone wrong. The main issue is that the sequence diagram is being used as a flowchart, instead of for its primary purpose in life: to allocate behavior to classes.
Flowcharting on sequence diagrams isn't necessarily an evil thing in and of itself, and it is almost certainly better than not doing the sequence diagram at all. But we consider it to be (at best) a weak usage of a sequence diagram because it doesn't leverage the ability to assign operations to classes while drawing message arrows.
Since, in our opinion, this activity is pretty much the fundamental place where "real" object oriented design happens, we've flagged it as an error.
The second issue is that there’s no validation performed on the incoming form data - and therefore no error handling code for rejecting bad data. Either the validation steps were left out of the use case or the designer didn't draw the sequence diagram directly from the use case text.
Problems exposed in the sequence diagram
Free whitepaper – Power distribution systems for the Dell PowerEdge M1000e Modular Server Enclosure

Analyst Keynote: The Register Agile Data Center Summit
10 Strategies for Choosing a Midmarket ERP Solution
Enabling The Agile Data Center
Buyer's Guide: ERP Systems
Sun's surviving staff hit with 'motivation' missive
Ubuntu's Karmic Koala bares fangs at Windows 7
Change your views: OS X tags exploited
Sun preps cell-phone Java plan for netbooks