An Overview of UML

One of the most effective ways to discuss the architecture and design of software systems is to use graphical notations, since source code itself is a bit too detailed of a notation to make such discussions easy. The UML is the most common graphical modeling language in use in the software industry today.

What is It?

UML, also known as The UML is a graphical modeling language that helps people design, describe, and discuss software systems.

Prior to the introduction of the UML (in 1997) there were tons of software development methods out in the world, each using their own modeling languages, including: Booch, OMT (Rumbaugh), OOSE (Jacobson), Fusion (HP), OOA/OOD (Coad/Yourdon), Recursive Design (Shlaer/Mellor), CRC (Beck/Cunningham), Responsibility Driven Design (Wirfs-Brock), and Odell. The "three amigos" Booch, Rumbaugh and Jacobson decided to put together the best parts of their work, and add other stuff, to make UML. The 'U' stands for "Unified".

The UML is still evolving. It has gone through several versions (the complete list of versions is maintained at the OMG site); some milestones are listed here:

What is it for?

UML can model just about any kind of computing system. The system is modeled with a collection of diagrams. Each diagram represents some aspect of some part of the system. You choose how many diagrams you want to make, and even the level of detail of the diagram. The diagrams are really there to help you talk about your system with others.

UML can help you in:

Fowler's three modes of using the UML

The latter two require sophisticated tools. Be careful with them. Blueprinting shouldn't go "all the way down to statements of code." Skecthes are fine: even if they are informal, they are still useful.

Diagram Types

Formally the UML defines a graphical notation and a meta-model. The notation is what most users care most about, and the most visible part of the notation is the collection of 13 diagram types.

For an explanation of the UML diagram types with detailed examples, you can see:

Exercise: After learning about each of the diagram types, give a UML class diagram for the diagram types.

Diagram Elements

Some of the graphical constructs from which diagrams are made are:

Types vs. Instances

A type is like a generic descriptor for a concept and an instance is an item described by a type. Where possible, UML indicates this distinction by underlining the name for instances. Examples:

Extension Mechanisms

Comment

Arbitrary descriptive text within a note symbol. The note symbol is attached to another model element with a dashed line. The comment is not "executable" but should mean something to a reader.

Constraint

Semantic relationship among model elements that must hold for the model to be valid. Shown as a text string in braces

company.gif

Property

A property is any value attached to a model element. These values are generally non-visual. Some properties are predefined but users can invent their own. Examples

{author="Joe" deadline="1998-11-26" status=draft}
{abstract}
   same as {abstract=true}

Stereotype

A new class of modeling element introduced at modeling time: a subclass of an existing modeling element with the same form but a specific new intent (a usage distinction). Shown as a keyword (enclosed within "«" and "»") and appears above or to the left of the name of the modeling element being described. Can also appear in a list in which case it describes what follows.

You can invent new icons for stereotypes and collapse the elements (with the usual warning that inventing too many special icons may impede readability and portability).

pentracker.gif