Using UML: The usefulness of UML diagrams

(This blog post was originally written in 2005.)

Following a speech two days ago, I’m struck by how little we use the Unified Modeling Language (UML) on our software projects. Occasionally I’ll create some activity diagrams to model how users get their tasks done, but that’s about it. Typically when we create a software requirements specification this is what we deliver:

  • Light use cases (or heavy user stories, take your pick)
  • Prototypes of the more complex screens
  • A detailed database design

I also perform a Function Point count at this time, but that’s not something I typically deliver to customers. I just use it for cost estimating.

After that — during development time — our developers just talk about the object model, but nobody uses UML diagrams. I think this is interesting, because I used to think using UML was very important.

Using UML as a training tool

At this point I mostly think UML diagrams are just good training tools. They help visually see what you’re designing or talking about, but then, once the concepts are in your brain, I don’t see many developers actually use UML in “the real world.”

I have on occasion reverse-engineered some source code into UML class diagrams just to see what they look like. There are many tools that support this capability now, and every once in a while this may be useful, but those occasions are surprisingly rare.

Using UML: From source code to Sequence Diagrams

There are a few UML tools that make a game effort of reverse engineering source code (typically Java source code) into UML sequence diagrams. I don't know how practical this is in problem solving, or in learning about a system, but it has been fun to play with. I've tried it on a few small projects, with some interesting results. One of the most interesting things is to see the code you've written by hand displayed visually in a sequence diagram, after you've created it. It even exposed a flaw in an algorithm one time. So I think this is the most worthy effort, and I hope those companies keep trying to improve their products.

These are all rambling thoughts from a tired brain. This speech took a lot of time to prepare, and took a lot out of me. A vacation is coming soon, and just in time.

Add new comment

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.