Applying UML in Different Levels of Usage

Three Levels of Details

UML can be used as much or as little as you like. Martin Fowler describes three common ways that people tend to use UML:

  1. UML as a sketch — Use UML to make brief sketches to convey key points. These are throwaway sketches they could be written on a whiteboard or even a beer coaster in a crunch. In the early stages of development, using UML as a sketch is highly effective and can be used as a collaborative tool where the developers can brainstorm about the system design.
  2. UML as a blueprint — Provide a detailed specification of a system with UML diagrams. These diagrams would not be disposable but would be generated with a UML tool. UML can be used as a blueprint, and developers can follow it to produce code. Using simple sketches wouldn’t be enough for them, because it would require them to fill in the blanks. This approach is generally associated with software systems and usually involves using forward and reverse engineering to keep the model synchronized with the code.
  3. UML as a programming language — This goes directly from a UML model to executable code (not just portions of the code as with forward engineering), meaning that every aspect of the system is modeled. Theoretically, you can keep your model indefinitely and use transformations and code generation to deploy to different environments. Fowler believes that productivity of UML as a programming language today is not better than productivity of using any other language, thus it will be difficult for UML to go mainstream. He also believes that highly detailed blueprints are not effective because they are difficult to do and it would slow development.

Summary

The approach used depends on the type of application you’re building, how rigorously the design will be reviewed, whether you are developing a software system, and, if it is software, the software development process you’re using.

In certain industries, such as medical and defense, software projects tend to lean toward UML as a blueprint because a high level of quality is demanded. Software design is heavily reviewed since it could be mission-critical: you don’t want your heart monitoring machine to suddenly display the “blue screen of death.”

Some projects can get away with less modeling. In fact, some commercial industries find that too much modeling is cumbersome and slows down productivity. For such projects, it makes sense to use UML as a sketch and have your model contain some architectural diagrams and a few class and sequence diagrams to illustrate key points.

Recommended UML References

Leave a Reply

Your email address will not be published.