Sunday, May 17, 2009

Sequence Diagrams – the best tool for creating them

I have been using Visio to create my Sequence Diagrams and the problems with Visio are plenty:

  1. It doesnt have many constructs (eg: loops, conditions, etc).
  2. Its a pain to draw, as you have to remain cognizant of how the overall diagram looks. This typically involves, resizing the page, moving around objects and changing spacing.
  3. If you realize that you missed something, then you have to spend time repositioning objects so as to insert what you missed.

Today I came across a really cool tool that allows you to describe the activity and automatically generates the Sequence diagram. To me this is a lot more powerful, because it lets you concentrate on correctly describing the sequence of activities and the diagramming is left to the algorithms at WebSequenceDiagrams. From my initial testing – I love Web Sequence Diagrams. If you are a software engineer, you definitely need to give it a try.

Here is a simple example:

The sequence diagram is based on the example on the Agile Modeling website: http://www.agilemodeling.com/artifacts/sequenceDiagram.htm

I converted figure 3 on that page to the following description:

Student->Seminar:enrollStudent 
activate Seminar 
Seminar->Course:isStudentEligible 
activate Course 
Course->Student:getSeminarHistory 
Student-->Course:seminarHistory 
Course-->Seminar:eligibiltyStatus 
deactivate Course 
Seminar-->Student:enrollmentStatus 
deactivate 
Seminar Student->Student:updateRecords

image

With a simple Combo box selection you can easily change the sequence diagram format to a variety of other ones:

Of which the Napkin format is one of my favorite:

image

Check out the web-based Sequence Diagramming tool at http://www.websequencediagrams.com/

No comments: