One thing that has been bothering me a little as of late is the misguided dislike of UML I have observed amongst some XP users. As an example, at work the other day I was reading through Object Design: Roles, Responsibilities, and Collaborations (an excellent book by the way), one of my co-workers (who just started) asked me about it, and noticed the page I was on showed a nice sequence diagram and commented he likes interaction diagrams, but they assume that you have the rest of the system fleshed out in UML.

Of course, I noted that’s not really the case, yet when another co-worker joined our discussion, he glanced at it and instantly focused on the “UML sequence diagram” portion under the illustration and instantly replied “Oh, that uses UML. UML is generally frowned upon in XP”.

And how wrong that is! When I’m trying to convey the sequence of events in a system to someone, I find it very helpful to draw out a sequence diagram that illustrates what’s going on. And for this I don’t need the system fleshed out in a class diagram, I don’t even really need to use class names … simply referring to roles in the system can be adequate. One can convey the same information on a whiteboard without using UML, I just find it convenient to use UML because it provides a common vocabulary. Likewise, I might use a class diagram to quickly sketch out the hierarchy of a system, but omitting unimportant details (and usually a throw away sketch or whiteboard drawing).

But, back to the question… why the hatred against UML by some agile developers? I think the reason behind this is that UML is occasionally associated BDUF (Big Design Up Front), a big no no in XP. BDUF implies that you do EVERYTHING (class diagrams, sequence diagrams, entity relationships, documentation, etc) up front before writing a single line of code, and then even worse generate your code from the model you designed. The reason this is bad is because it’s a lot less agile … it almost locks out changes in requirements and when requirements do change (as they are destined to do) they become more expensive to implement. I would guess those that have experienced BDUF would have quite an aversion to it because of the results it tends to yield. ;)

Of course, what it all boils down to is how to best communicate your ideas to others. While clear cut sequence and entity diagrams are in my opinion the best way quickly flesh something out, a majority of the time quickly scribbled words, boxes, arrows, and stick figures (which exist in UML anyway, hehehe) with someone telling a story describing what is going on can be good enough. Which is what really matters … that which is good enough to convey information correctly in a format that others can easily understand while keeping the nasty technical details to a minimum.

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!