UML Overview
(Free Web Tutorials)
by Michael Thomas
UML Home Page
On the UML Home page, you can download
the whole UML site (all content, tutorials & examples) !!!
Prerequisites
Objectives
- Get a broad over view of UML and the work product diagrams.
Definition of UML
- Unified Modeling Language ( UML ) is a graphical language for the
modeling and developing of software systems. The UML diagrams become a
common work product developers use to discuss all phases of software
development from requirements analysis, design and implementation. The
goal here is to model the software system before you build it.
- Quote: "The Unified Modeling Language (UML) is a family of graphical
notations, backed by single meta-model, that help in describing and
designing software systems, particularly software systems built using the
object-oriented (OO) style." [Martin Fowler - UML Distilled] pg 1.
History of UML
- By the mid 1990's the "Three Amigos" (Grady Booch, Ivar Jacobson and
James Rumbaugh) decided to unify their modeling methodologies which had
become popular at that time. Their effort was started under the
"Rational Software Company" and then moved the effort to a UML consortium to
attract the support of several major software organizations. In 1997
UML 1.0 was then given to the OMG (Object Management Group -
www.omg.com ) to define and maintain the
UML specifications.
- Historical Info: "Three Amigos" original methodologies and info:
- Grady Booch (Rational Software Co) - "Booch Method" - strengths in
design and construction phases of projects
- Ivar Jacobson (Objectory Co) - "Object-Oriented Software Engineering
(OOSE)" - strengths in support for use cases to capture requirements.
- James Rumbaugh (General Electric Co) - "Object Modeling Technique (OMT)"
- strengths in analysis and data-intensive information systems.
- Release Dates
- 1995 - UML 0.8
- 1996 - UML 0.9 - Three Amigos
- 1997 - OMG takes over.
- 1997 - OMG UML 1.1
- 1998 - OMG UML 1.2
- 1999 - OMG UML 1.3
- 2001 - OMG UML 1.4
- 2003 - OMG UML 1.5
- 2003 - OMG UML 2.0 - Adopted
- 2005 - OMG UML 2.0 - Final
- 2006 - OMG UML 2.1
- UML2.1.2 (11/04/07 ) - Current version as of 05/27/08
What is UML?
- UML is a visual modeling language and not a visual programming language.
Although some modeling tools have code generators and some can reverse
engineer models from code.
- UML is intended to create diagrams that can support the software
development process, however, UML is NOT a software development process or
development method. Therefore UML is process independent.
- UML is a standard language for creating software blueprints.
- UML is a communication tool.
- UML is a language for documenting requirements, architecture, tests,
project planning, etc...
- UML is intended for software systems but can model other systems.
- UML is intended to support the object-oriented development process.
- UML can capture both static structures and dynamic behavior of a system.
- UML diagrams can help stakeholders understand, discuss and agree on the
requirements.
- UML diagrams can help abstract complicated processes to a level that is
easier to understand.
- UML diagrams help facilitate problem solving.
UML "gotchas"
- Paralysis by analysis - be conscious of the scope of your task.
- Pick the UML diagrams that support your development process and scope of
your task.
- Remember the business you are in.
- Choose UML tools that support your development process.
How Do I Create UML Diagrams?
- White Board - use a white board paper (free-form diagram) to draw out your diagrams
then capture with a digital camera if you want to capture it in digital
form.
- Word Processor - use a word processor for text and if your
creative you can use some of the it's graphic capabilities.
- Microsoft Visio - this is a very popular tool.
- UML Tools
- EclipseUML by Omondo - this product runs in Eclipse and can create
most of the UML2 diagrams. On our "UML Tutorial Home Page" there
is a link to an "EclipseUML First Steps Tutorial" (installation and
creation of your first UML Class Diagram).
- UML Tools/Products (Resources) - web page
with a list of vendors.
When Do I Create UML Diagrams?
- First, I believe that the code and database is the final and most
important artifact. Make sure you comment in the code very well.
- Create UML diagrams when you feel it will bring enough business value
per effort to benefit your development team.
- Use UML diagrams that will match your Software Development Methodology
or your organizations requirements.
- Consider using reverse engineering tools to create certain UML diagrams
(ie: Class Diagram) from existing code.
UML 1 had 9 Diagrams
- Four (4) Structure Type diagrams - Class Diagram, Object Diagram,
Component Diagram, Deployment Diagram
- Three (3) Behavior Type diagrams - Use Case Diagram, Activity
Diagram, State Diagram
- Two (2) Interaction Type diagrams - Sequence Diagram,
Collaboration Diagram (aka UML2's Communication Diagram)
UML 2 has 13 Diagrams
** = new to UML2
- Six (6) Structure Type diagrams - Class Diagram, Object Diagram, Component Diagram, Composite Structure Diagram**, Package Diagram**, Deployment Diagram
- Three (3) Behavior Type diagrams - Use Case Diagram, Activity Diagram, State Diagram
- Four (4) Interaction Type diagrams - Sequence Diagram,
Communication Diagram, Timing Diagram**, Interaction Overview Diagram**
UML 2 Diagram Description & Examples
- Structure Type Diagrams - static (nouns) parts of the model
- Class Diagram - diagram of the static structure of the system's
classes and interfaces and their relationships or associations
(including inheritance, aggregation, and association) including the
operations and attributes of the classes. Presentation modes are:
Association, Inheritance, Dependency. This is a very common diagram in
UML.
-
Example - (created with EclipseUML - May of 2008) - Class Diagram
for objects associated with a company.
-
Example - (created with Rational Software Modeler v6.0 - Sept of 2005) -
Class Diagram of an online order system.
- Object Diagram - is a diagram of a static structure of a system at a
specific time or situation (snap shot) illustrating a relationship in a
system.
- Component Diagram - is a diagram that describes the organization and
dependencies of components within the system.
- Composite Structure Diagram - is a diagram that explores
run-time instances of interconnected instances collaborating over
communications links.
- Package Diagram - is a diagram that depicts how a system is
split up into logical groupings and what dependencies may exist among
these groupings.
- Deployment Diagram - is a diagram the describes how distributable
physical units (deployable software components, applications, servers,
applications, hardware etc...) make up the distributed system
architecture.
- Behavior Type Diagrams
- behavioral (verbs) parts of the model.
- Use Case Diagram - diagram of the use cases (software
functions/services) and the role of the actors (users - both humans or
systems). This diagram is from the user's perspective.
-
Example -
(created with EclipseUML - May of 2008) - Use Case Diagram
for a high level view of a Hotel Reservation system.
- Example - (created with Rational Software Modeler v6.0 - Sept of 2005) -
Use Case of an online order system.
- Activity Diagram - is a diagram of the dynamic nature of a
system by modeling the flow of control from activity to activity. Diagram how a system (ie: object/class)
responds to an internal event. (note: external events are
described by an State Diagram). For business process modeling you
can use this diagram to model the logic of a use case or business rule.
- State Diagram (aka Statechart Diagram, State Machine Diagram) - is a diagram of how a
system (ie: object/class) responds to an external event.
(note: internal events are described by an Activity Diagram).
- Example
- (created with Rational Software Modeler v6.0 - Sept of 2005) - State
Chart of an online order system.
- Interaction Type Diagrams - interactions of the organizational parts of the model.
- Sequence Diagram - is a diagram of the
interaction and flow of messages among objects and the relative time
ordering of the messages.
-
Example -
(created with EclipseUML - May of 2008) - a very general
Sequence Diagram between an actor (the Customer) and a system (online
reservation for a Hotel) to give you a flow of the interactions to make a
reservation via the web.
- Example - (created with Rational Software Modeler v6.0 - Sept of
2005) - Sequence Diagram of an online order system.
- Communication Diagram (aka UML1's Collaboration Diagrams ) -
is a diagram of how systems collaborate together to perform a task and
the associates that must exist between the systems. The
collaboration diagram is a result of taking the Sequence diagram and
describing it's interaction with the Class Diagram. In summary,
this diagram shows the message flow between objects and the basic
associations (relationships) between classes.
- Timing Diagram - is a diagram that explores the
behaviors of one or more objects throughout a given period of time.
- Interaction Overview Diagram - is a diagram of the
interaction and flow control between the interaction diagrams (sequence
diagram, communication diagram, timing diagram, interaction overview
diagram).
Other Types of Diagrams
Between the differences of OOAD Methodologies & the evolution of UML
standards the names of diagrams and their functions may evolve over time.
Here are some examples of diagrams and/or work products that may or may not be
apart of UML1 or UML2 but could be used in OOAD Methodologies:
- System Context Diagram
- Example - (created with Rational Software Modeler v6.0 - Sept of
2005) - System Context of an online order system.
- Entity Relationship Diagram (similar to Class Diagram)
-
Example - (created with Rational Software Modeler v6.0 - Sept of
2005) - Entity Relationship of an online order system.
- Robustness Analysis
- Logical Data Model
Bibliography
- [Martin Fowler - UML Distilled]
Martin Fowler, UML Distilled 3rd Edition, Addison Wesley, 2004