Few years back everybody in our shop was crazy with UML. Now everybody seems to have cooled off.
I am curious if there is still widespread use of UML in software projects.
If so, is this usage limited to whiteboarding? Do you use it for documentation? Do you use tools to generate code from it?
We still use UML. Like others here, I find that they greatly aid in communication. It's a lot easier for people to communicate when they have visual aids (enter the popularity of PowerPoint). This is especially true in the initial phases of a project where scenarios like firebird84 explained happen a lot. The painstaking side to UML is the upkeep of the diagrams once the developers on the project start coding.
We don't generate code off of them though and I've yet to personally speak to someone that has used UML to that extent.
I actually use UML to help me visualize and think through problems. For this purpose, sequence diagrams, activity diagrams and object diagrams are very useful.
Component diagrams are good when you're trying to communicate the software layers.
Deployment diagrams are very useful for figuring out packaging and deployment, as well as inter-node communication paths.
Class diagrams I find least useful, since most IDEs can give you the as-built class hierarchy quite easily.
I have always used UML (or UML ispired) graphics as supporting documentation. The documents provide a slice in time such as "this was our original concept of a user". Keeping documents up to date is hard and would only be done if we need to change the our definition. Then we have another snap shot in time. UML was not the design but part of the design process.
I have used some code generating tools that used UML but only to generate initial stubs. Usually once the code was generated, it evolved seperately from the diagram.
One problem with UML was that in many cases arguements broke out about proper UML syntax/style instead of concentrating on whether the drawing helped the customer, analyst or developer understand the concept. I know syntax is important when code generating, but I found UML is best used to understand a concept.
I've seen generated UML used to help new hires get a handle on what was a very involved and complex system. Since the UML was automatically generated from the code it was always up-to-date and some people found it helpful.
Depends on the audience and purpose of what you're drawing (assuming you're using UML as a visual modelling language rather than its less common more abstract form).
If you're communicating sequence of control, or class hierarchy, with other engineers, the UML diagrams are ideal.
Communicating macro application architecture to customers or senior tech managers, you'd probably find powerpoint, however much you may have to hold your nose, more effective
See Documenting Software Architectures for a good summary of the weaknesses in UML for some commonly required diagrams of architectural views.
One other tip - use a textual tool such as the excellent PlantUml - there's a very simple DSL to learn, and then you can concentrate on the meaning rather than coercing Visio into drawing straight lines or wielding an enormous overengineered CASE tool. Check in the PlantUml models to source control, and set up a CI job to automatically build and publish the SVG or PNGs.
I find ULM useless for me, it harms my creativity. I generate UML only as a documententation, if the customer wants it. But I don't use it to model classes. Architecture is an evolving process, where I think over and over again and got new ideas everywhere I am, not only in the office. I am constantly refactoring to get closer to the optimum, first in mind then in code. Hope I you understand what I mean.