Mediums for Modeling

Looking back on my first real-world project, I remember applying a lot of different agile and iterative practices, trying to get a feel for what worked and what didn’t work. Among those practices was the use of modeling UML diagrams (domain models, class and sequence diagrams) prior to actually writing the code.

What I discovered is that this task in itself can be applied using a variety of ways, from hand-sketching UML diagrams to whiteboarding to using a professional software tool. And each of these methods are better than others in the right setting.

Hand-Drawing (or Sketching)

First, let us look at hand-drawn, or sketched, diagramming. Hand-drawn diagrams are simple and can be created and changed quickly and easily (unless you don’t own an eraser or you are using a pen…).

On the other hand, given that sketches are done quickly, they are often done on notebook or scratch paper so they are unprofessional and are not usually good for long-term documentation. In addition, if you are working on a design in a group, it can be difficult to see a design in-progress with more than one or two people sitting around a table unless another type of medium is used, such as a projector.

I tend to hand-draw diagrams if it is only myself working on the design, and I don’t need to keep the design after I implement the code. Otherwise, I tend to use one of the two other methods discussed below.

Whiteboarding

A second, quite popular, form of diagramming is “whiteboarding” (drawing designs on a whiteboard (preferably dry-eraseable). Whiteboarding is good for designing in a group or team setting, where multiple people are working together on a design, but it can also be done in individual settings (as I myself often do). Whiteboarding is also easy to create and modify, in my opinion, more easily than modifying a hand-drawn diagram.

However, whiteboards often don’t fit in a design document and are therefore most useful as short-term aids until a design can be implemented in code. I have heard of some groups using a whiteboard that can transmit an image of the whiteboard sketch to a computer for more long-term use. However, depending on your documentation audience, whiteboard design may or may not be professional enough to use.

Again, I tend to use whiteboarding for short-term design work, where I will eventually erase it after I’ve implemented (and documented) the code.

Using a Software Tool

There are many software tools out there for diagramming UML on the computer. Some are free, others cost money. And each tool has its own features. Some are strictly for design while others are intended to take a UML diagram (such as a class diagram) and generate the appropriate skeleton code.

This is the most professional form of diagramming, but also the most time-consuming. Therefore, I usually limit this form of diagramming to long-term documentation purposes, such as for use in a Design document.

My preferred tool is Microsoft Visio, but with a custom UML stencil I downloaded since I do not take advantage of Visio’s code generation features.

There are many mediums with which to diagram, each with its own pros and cons. Hopefully this has shed some insight for those new to UML and provided some new perspectives for the veterans.

2 thoughts on “Mediums for Modeling

  1. Harold

    When I saw the price of Visio I was totally stunt. Is Microsoft kiddnig or is this just a typo?! Really, is this software really worth over $500 while other superior packages are cheaper?I think Microsoft Visio is one of the most over-priced office applications. The entire MS Office is cheaper than Visio. There are better and truly more intelligent flow-charting or charting applications around. The new Visio 2010 does not truly add any new functionality except the ribbon. For existing users it is a new learning curve, for new customers it is probably a good starting point. But do you really want to drop that much money for that?Before you decide to upgrade or get a full release, do your research, even if your company pays for it and the money does not come out your precious pocket. Unless you really really have to have it try alternatives. One of the charting applications that is superior to Visio is AllClear made by Proquis. It has a very simple scripting which turns it into a flowchart without wasting any time on drawing boxes. If you want to draw boxes you can do that too and it creates the script for you to make easy changes later. You can even automatically trace your charts to make sure that they are correct. There are other applications too, including on-line versions like Lucidchart, […]. So do your research before you buy, save money.

Leave a Reply

Your email address will not be published. Required fields are marked *