Runar Ovesen Hjerpbakk

Software Philosopher

Easy Online UML Sequence Diagrams

Even though UML is not as hip as it once was, a couple of its diagrams are still useful, such as the UML sequence diagram. However, manually creating diagrams in a graphical tool has its drawbacks:

  • Creating them can be time consuming
  • Binary files, such as images, cannot be merged
  • The diagram's history cannot be easily be viewed in a source control system
  • Team members cannot edit the diagram without the appropriate tool

Plain text is the most portable file format in the world and it's exactly what websequencediagrams.com uses to generate sequence diagrams. The syntax is easy to write and is readable even without the generated diagram. Perfect for source control!

Heres an example:

title AsyncMethodCaller

participant "View Model" as vm
participant "Service" as service

vm -> service: CallMethodAndContinue
activate vm
activate service

alt Work completed
  service -> vm: continueWith
else Exception occurred
  service -> vm: failWith
end

deactivate service

Which generates the following diagram:

AsyncMethodCaller Sequence Diagram

Good stuff!