Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 39 ยท Getting Started

What Is UML and Why Model Software?

Learn what UML is, where it came from, why teams draw models before and while they code, and how much modeling is actually worth doing on a real project.

Software is invisible. You cannot walk around a program the way you walk around a building, so teams invent ways to make its structure and behavior visible: whiteboard sketches, boxes and arrows, napkin diagrams. The Unified Modeling Language (UML) is a standard vocabulary for those drawings. It tells you which box shape means "class", which arrow means "inherits from", and which line means "sends a message to".

UML is not a programming language and it does not run. It is a notation for describing systems so that people can discuss, review and plan them. This lesson explains what UML is, why it exists, and what level of modeling pays off. The rest of the track teaches the individual diagrams.

A short history

In the early 1990s there were dozens of competing object-oriented notations. Three of the best known, from Grady Booch, Ivar Jacobson and James Rumbaugh, were merged at Rational Software, and the result was released as UML 1.0 in 1997. It was handed to the Object Management Group (OMG), which still maintains it. UML 2.0 (2005) reorganized the language and added the diagrams you see today; the current 2.5.x specification is a cleanup of that version. It is also an ISO standard (ISO/IEC 19505).

The practical consequence: a class diagram drawn in Tokyo is read the same way in Lisbon. That shared meaning is the whole point.

What a model is

A model is a simplified description of something real, built for a purpose. A subway map leaves out real distances and street names because its purpose is route planning. Software models work the same way: they leave out detail on purpose.

  • A class diagram ignores what methods do and shows only structure.
  • A sequence diagram ignores data types and shows only who calls whom, in what order.
  • A state diagram ignores everything except how one object's status changes.

Every diagram is a view, and no single view is "the model". The value comes from choosing the view that answers the question in front of you.

Python A model is data you can query

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The output shows that Order is the hub of this little design. You found that out by looking at relationships, not code. That is what a model is for.

Why teams model

  1. Communication. A diagram lets a developer, a tester and a product owner point at the same thing. It is faster than ten paragraphs of text.
  2. Thinking before building. Drawing a design exposes holes: "who creates the invoice?" is easier to ask over a diagram than after two weeks of coding.
  3. Documentation. Onboarding a new developer with one overview diagram beats reading fifty files.
  4. Analysis. Models can be checked: does every use case have an actor, does every state have an exit?
  5. Generation. Some tools generate code skeletons from models or models from code. You will see this in From Models to Code.

How much modeling is enough

Martin Fowler describes three ways people use UML, and they are a useful map:

Mode What it means Typical lifetime
Sketch Informal drawings to discuss one problem Minutes to days, then thrown away
Blueprint Detailed models that developers must follow Whole project, kept in sync
Programming language Models that are compiled into the product Whole project

Most teams in everyday practice work in sketch mode: draw just enough to agree on a design, then write code. Blueprint mode appears in regulated or safety-critical work. Executable UML is rare. Knowing the modes stops two classic arguments: "UML is useless bureaucracy" (true for blueprint everything) and "we must model everything first" (rarely true).

Draw the smallest diagram that settles the question. If a diagram has not answered anything after ten minutes, it is too detailed or it is the wrong diagram type.

The shape of the language

UML 2 defines 14 diagram types in two families: structure diagrams (what exists) and behavior diagrams (what happens). The next lesson walks through all of them. Most real projects use four or five regularly: class, sequence, use case, activity and state diagrams. This track covers every one.

UML in one minute

A notation Standard shapes and arrows.
A way to think Plan before you code.
A shared language Teams read it the same way.

UML does not run. It describes.

1 / 2

Common mistakes

  • Modeling everything. A diagram with 60 classes helps nobody. Model one slice per diagram.
  • Drawing once and never updating. An outdated diagram is worse than none, because it lies. Keep diagrams small and close to the code, or accept that they are snapshots.
  • Mixing levels of detail. Do not put database columns and business use cases on the same picture.
  • Treating UML as a goal. The deliverable is working software and shared understanding, not pretty diagrams.
Python Which view answers which question?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What best describes UML?

    UML is a modeling notation maintained by the OMG. It describes systems and does not execute.
  2. 2. Why does a model deliberately leave details out?

    A model is a purposeful simplification, like a subway map.
  3. 3. In which mode do most teams use UML day to day?

    Sketching just enough to agree on a design is the most common and cost-effective use.
  4. 4. How many diagram types does UML 2 define?

    UML 2.x defines 14 diagram types: 7 structure and 7 behavior diagrams.

Summary

  • UML is a standard notation for describing software; it does not execute.
  • A model is a purposeful simplification; each diagram is one view.
  • Models improve communication, early design thinking, documentation and analysis.
  • Most teams sketch: draw the smallest useful diagram, then code.
  • Avoid giant diagrams, stale diagrams and mixed levels of detail.

Next: The 14 UML Diagram Types