Random DevTools Entry #017
In software development, it’s incredibly useful to be able to visualize your code interactions using sequence diagrams and data flow diagrams and what not. Not only is the visualization a plus, the act of generating one helps tremendously in terms of working out the outline of the logic that you need to implement. One of the biggest problems I’ve come across in this area are the tools: they’re simply too heavy and too complex for general diagram drawing tasks in addition to being generally rigid as well.
Today, as I was about to download and install Visio, I decided to spend a few minutes checking to see if there was a web alternative. Enter websequencediagrams. This is an all around awesome little tool to add to your toolbox. Not only is it free (free is always awesome), it’s text based. At first blush, this seems terrible; there’s a whole syntax to learn and lots of typing. But the syntax is incredibly easy and simple while powerful and easy to understand.
Here’s an example (I’ve bolded the syntax to make it easier to distinguish):
Service–>App: (return results)
note right of App:
render URL with
keyword in query string.
Browser–>Office: click: http://../name.docx?term=keyword
AddIn->AddIn: Check for search term
note left of AddIn:
contain the query string. This
can be extracted with a regular
AddIn->AddIn: Execute find
And here is the result:
There are also a variety of pre-defined styles you can choose to render your diagram. It’s all sorts of awesome and a real time-saver compared to traditional tools. I personally love that it’s text based; I’ve found that when working with Visio (and other such tools), more than half of my time is spent arranging things just to get them to line up. A text based approach works well for sequence diagrams and gets rid of that layer of unnecessary complexity.