I’ve had this kicking around in my bookmarks for ages, but I thought I’d share…

Have you ever had to diagram in UML using Visio? It’s a painful process. The UML add-in for Visio has a number of deficiencies:

  • Doesn’t support the latest spec (UML 2.0)
  • Even with the spec it supports, it gets some things wrong (e.g. Completely valid UML will show up with red errors around it.)
  • Using it to really design a software system downright hurts*

* Try the following: Create a sequence diagram. Add some objects and method calls between those objects. Realize that you forgot a step. Marquee and move all the method calls down a notch so that you can insert the forgotten method. Guess what? Visio just forgot all the method names previously entered. You have to manually wire-up the method names again. When actually designing a software system, you are constantly re-ordering methods, removing methods, inserting methods, etc. The team that maintains the Visio UML Add-in should really use their own tool for designing version N+1.

You can’t fault Visio completely. It’s a diagraming tool, not a software engineering tool. So how do you stop Visio from pretending to be a software engineering tool and force it to do what it’s good at (being a diagraming tool)? You grab Pavel Hruby‘s UML 2.0 Stencil for Visio. Thank you, Pavel! You’ve made my time with Visio that much more tolerable.

P.S. Some of you might ask, “Why don’t you use a real UML tool like [insert favourite UML tool here]?” I’m a consultant. As a consultant, it’s often hard to convince a client to buy tools and Visio comes free with many versions of Visual Studio. Typically I’ll need to give my client soft copies of any design artifacts in a file format that they can read. Typically that also means Visio. So like it or hate it, Visio is often the lowest common denominator that all developers on a team can use or have access to.

P.P.S. Some of you might be wondering, given my choice, what my favourite UML tool is? Rational Rose, Borland Together, Sparx Systems’ Enterprise Architect, … I’ve tried a lot of different UML tools over the years and while Borland Together is my favourite UML software package, the best UML designer I’ve ever worked with is definitely a large whiteboard and a digital camera. Honestly, if you can’t design good UML on a whiteboard, the software packages aren’t going to help you much.