Instructional Module U11

UML as a Tool for Systems Analysis

Overview

  1. U11-bk: Background of UML
  2. U11-oo: UML and Object Oriented Design
  3. U11-dg: Diagrams of UML
  4. U11-sa: UML for Systems Analysis
Link to Top

to Top Overview

Overview

People analyzing and designing software systems have used many diagramming tools over the years, including flowcharts, entity-relation diagrams, and data flow diagrams. In the mid-1990s, the Unified Modeling Language (UML) was introduced primarily as a tool for object-oriented programming (OOP) design.

Because OOP has become the primary approach to software design, many developer tools are available that integrate UML with OOP. It is natural that systems analysts would want to make use of these tools to better integrate with the software development process.

In addition to analysts using Object Oriented Analysis (OOA) methodology, analysts using other approaches (such as classic "waterfall" SDLC, Joint Application Development, Rapid Application Development, or Agile methodology) may find it advantageous to use UML for modeling current and proposed systems. This is because UML diagrams are widely understood, as well as because of the development tools available.

This module gives an overview of UML tools from the perspective of systems analysis, independent of methodology.

 

Link to Top

Background of UML

UML is the Unified Modeling Language. It was designed to unify object-oriented visualization methodologies, and version 1.1 was standardized by the Object Management Group in 1997. The considerably expanded and debugged version 2.0 was standardized in 2004.

Learn more about UML's background in:

 

UML and Object Oriented Design

In a Nutshell:

UML was designed to provide visual modeling tools for object-oriented analysis and design.

Learn more in this section about how UML handles object-oriented concepts.

 

What is "Object Orientation"?

An object is any entity - person, place, event, or thing - that we want to model in software. Object Oriented Programming (OOP) is based on the idea that large programs work better if they are written as a collection of objects. These objects are kept relatively independent of one another, and can share characteristics in a way that makes programming quicker and more reliable.

Objected Oriented Programming is the most widespread methodology in use today. OOP languages include ActionScript (for Flash), C#, C++, Java, JavaScript, Objective-C, Perl, PHP, Python, Ruby, Smalltalk, Squeak, VB.Net, Visual FoxPro, and many others. However, the concept of OOP didn't gain adherents until the 1990s, so only a few languages designed before 1990 include object-oriented capability (notable exceptions being C++ and Smalltalk, which pioneered the technique).

Why Use OO?

The primary motivation for using OO Programming is to get control of complexity. Increasingly large and involved software projects in the mid to late 20th century resulted in longer development time and less reliability.

The central idea of OO, that software code modules should be kept relatively independent of one another, is an embodiment of the age-old "divide and conquer" philosophy. By keeping software "objects" small and isolated, they become easier to design, easier to test, and easier to fix or update.

Can the benefits of OOP be transfered to Object Oriented Analysis (OOA) and Design (OOD)?

  • Object Oriented Design: Certainly. OOD is a logical and necessary precursor to OOP.
  • Object Oriented Analysis: Partially. OO principles give the analyst a lens with which to view an existing system; a sort of "yardstick" to help measure where things are going wrong. But since existing, problematic systems are generally not "object oriented" to begin with, analysts need a more flexible way of understanding existing systems.

The Defining Characteristics of OO

Object Oriented Programming is based on the concept of software code "objects" which:

  • Contain data and techniques that are private to most other software code. This means other code cannot alter the object's private data, and does not have access to the specific ways in which the object manipulates the data. This is known as encapsulation because the object is protected and enclosed.
    How does this help? One of the major challenges of writing large programs in non-orbject fashion is when code in one part of the program interferes with code in another part. This might be unintentional, or it might be a misguided attempt to save effort. Encapsulation protects against this interference.
  • Contact between the outside world and the software object is handled through messages passed between it and the external world. To query or manipulate data in an object, a request is sent in a message to the object, which then returns information or performs an action. This results in loose coupling.
    How does this help? Just like the modularization of automotive components, loose coupling makes it easier to swap malfunctioning components out without taking the system down (for long). It also makes it easier to re-use components in new systems.
  • Developers create classes of objects: models which serve as templates for creating instances of similar objects and classes. These objects are said to inherit characteristics of parent object classes.
    How does this help? It enables another way of re-using software - that is, taking a general implementation and making it work in many different specific contexts. It also encourages programmers to think about re-usability from the very start.

 

 

Diagrams of UML

In a Nutshell:

There are 12 main types of UML diagrams in version 2.0, which can be grouped into two classes:

  1. Structure Diagrams
  2. Behavior Diagrams
Learn more in this section about...
  • How do UML diagrams relate to one another?
  • What is each type of diagram, and what is it used for?

 

How are UML Diagrams Related?

This chart (which is itself a Component Diagram) illustrations the UML diagram types and their relation to one another:

 

UML Diagram Types, at Wikimedia

(at Wikimedia: http://en.wikipedia.org/wiki/Image:Uml_hierarchie_des_diagrammes.png)

Diagram Details

In this section, we'll briefly define and illustrate each type of UML diagram.

Most definitions and examples from Wikipedia (public domain or GPL) unless otherwise stated.

Use-Case Diagram

Probably the most widely used UML diagram, and arguably the starting place for modeling any system. "Use cases are stories about how someone or something uses the system to accomplish something useful." (Bittner & Spence 2002, Chapter 4)

Use-Case Diagram from Wikipedia

Class Diagram

A type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, and the relationships between the classes.

Class Diagram at Wikipedia

(See also Visual Paradigm's examples of Class Diagrams.)

Component Diagram
Depicts how a software system is split up into physical components and shows the dependencies among these components. Physical components could be, for example, files, headers, link libraries, modules, executables, or packages. Component diagrams can be used to model and document any system's architecture.

(No public domain or GPL example readily available. See Visual Paradigm's examples of Component Diagrams.)

Object Diagram

Shows a complete or partial view of the structure of a modeled system at a specific time. This snapshot focuses on some particular set of object instances and attributes, and the links between the instances.

Component Diagram from Wikipedia

Composite Structure Diagram

Shows the internal structure of a class and the collaborations that this structure makes possible. This can include internal parts, ports through which the parts interact with each other or through which instances of the class interact with the parts and with the outside world, and connectors between parts or ports. A composite structure is a set of interconnected elements that collaborate at runtime to achieve some purpose. Each element has some defined role in the collaboration.

Composite Structure Diagram from Wikipedia

(See also Visual Paradigm's examples of Composite Structure Diagrams.)

Deployment Diagram

Serves to model the hardware used in system implementations, the components deployed on the hardware, and the associations between those components. The elements used in deployment diagrams are nodes (shown as a cube), components (shown as a rectangular box, with two rectangles protruding from the left side) and associations.

(No public domain or GPL example readily available; see the Deployment Diagram at The Vinci Organization's UML Primer;
See also Visual Paradigm's examples of Deployment Diagrams.)

Package Diagram

Depicts how a system is split up into logical groupings by showing the dependencies among these groupings. As a package is typically thought of as a directory, package diagrams provide a logical hierarchical decomposition of a system.

Package Diagram from Wikipedia

Activity Diagram

Represents the business and operational step-by-step workflows of components in a system. An Activity Diagram shows the overall flow of control.

(No public domain or GPL example readily available. See Visual Paradigm's UML examples of Activity Diagrams.)

State Machine Diagram

Used to graphically represent finite state machines. They can describe a lot of things, from computer programs to business processes.

State Diagram from Wikipedia

(There are actually several types of "state diagram" used primarily by computer scientists and methematicians, in addition to the UML standard.)

(See also Visual Paradigm's examples of State Machine Diagrams.)

Interaction Diagrams
A subset of four behavior diagrams, which emphasize the flow of control and data among the things in the system being modeled. The last four types described below are the Interaction Diagram types.
Sequence Diagram

Shows, as parallel vertical lines, different processes or objects that live simultaneously, and, as horizontal arrows, the messages exchanged between them, in the order in which they occur. This allows the specification of simple runtime scenarios in a graphical manner.

Sequence Diagram from Wikipedia

(See also Visual Paradigm's examples of Sequence Diagrams.)

Interaction Overview Diagram

A variant of Activity Diagram focusing on the overall flow of control among interactions.

(No public domain or GPL example readily available. See Visual Paradigm's examples of Interaction Overview Diagrams.)

Communication Diagram

Models the interactions between objects or parts in terms of sequenced messages. Communication diagrams represent a combination of information taken from Class, Sequence, and Use-Case Diagrams describing both the static structure and dynamic behavior of a system.

Communication Diagram from California State University San Bernardino

(Courtesy of Dr. Richard J. Botting, California State University, San Bernardino)

(See also Visual Paradigm's examples of Communication Diagrams.)

Timing Diagram

Explore the behaviors of objects throughout a given period of time. A timing diagram is a special form of a sequence diagram. The differences between timing diagram and sequence diagram are the axes are reversed so that the time are increase from left to right and the lifelines are shown in separate compartments arranged vertically.

(No public domain or GPL example readily available. See Visual Paradigm's UML examples of Timing Diagrams.)

 

 

UML for Systems Analysis

In a Nutshell:

Object-Oriented Analysis (OOA) is an approach to systems analysis that sees a system as a collection of "objects" that act and interact to reach a specific goal or provide a desired result. UML can be used to capture current systems and plan new ones, primarily with Use-Case and Activity Diagrams.

Learn more in this section from the...

 

Analysis Perspective

 

General Analysis Phases

We can classify the various diagrams according to the phases of the analysis project in which they are useful. Recall that regardless of the methodology chosen ("waterfall", agile, object-oriented, etc.) analysis and design goes through four general types of activity:

  1. Physical analysis asks, how does the system actually work?
  2. Logical analysis tries to get to the logical pattern behind the current system
  3. Logical design tries to correct problems in the current system by creating a logical (abstract) system that will solve the problems of the current system and achieve new goals.
  4. Physical design takes the new abstract system and creates a physical system that makes it work as envisioned.
How UML Fits each Phase
 AnalysisDesign
Physical
  • Use-Case
  • Sequence
  • Collaboration
  • State
  • Activity
  • Component
  • Deployment
  • Use-Case
  • Class
  • Object
  • Sequence
  • Collaboration
  • State
  • Activity
  • Component
  • Deployment
Logical
  • Use-Case
  • Class
  • Object
  • Sequence
  • Collaboration
  • State
  • Activity
  • Use-Case
  • Class
  • Object
  • Sequence
  • Collaboration
  • State
  • Activity

(This chart is based on Marakas 2004.)

The primary UML diagram type used in analysis is the Use-Case Diagram.

Use Case Diagram from Wikipedia

The Use-Case Diagram is UML's MVP in Systems Analysis

Use-Case Diagrams are especially useful throughout all phases of a systems analysis and design project because:

  • they are very general
  • they are flexible enough to model systems that are not object oriented
  • they do not require a detailed knowledge of the system to get started
  • they can be used for analyzing current systems, and (with linked documentation) to specify new system requirements

More detail on Use-Case diagrams in systems analysis is in module U12.

UML Perspective

Here's a list of UML diagram types and their use in phases of analysis and design

DiagramAnalysisDesignImplement-
ation
Physical Logical Logical Physical
Class Maybe Yes Yes Yes  
Component Yes Maybe Maybe Yes  
Composite structure Yes Yes Yes Yes  
Deployment Yes Maybe Maybe Yes Yes
Object Maybe Yes Yes Yes  
Package Maybe Maybe Maybe Yes Yes
Use-Case Yes Yes Yes Yes  
Activity Yes Yes Yes Yes  
State Machine Yes Yes Yes Yes  
Communication Yes Yes Yes Yes  
Interaction overview Yes Yes Yes Yes Yes
Sequence Yes Yes Yes Yes Yes
Timing Yes Yes Yes Yes  

 

Reference:

Marakas 2004
Systems Analysis & Design: An Active Approach
by George M. Marakas
Publisher: McGraw-Hill Irwin; ISBN: 0072976071 Edition: 2nd


to Top About This Document
Audience
to Top

This module is for people who have an introductory acquaintance with systems analysis and design, and want an overview of how UML is applied to it.

Objectives

On successful completion of this module, you will be able to...

  1. Identify the diagram types used in UML 2.0 and earlier (U11-dg)
  2. Describe the diagram types most useful in general Systems Analysis (U11-sa)
  3. Link UML with the philosophy of object-oriented analysis and design (U11-oo)
Module U11: UML as a Tool for Systems Analysis
This document is part of a modular instruction series in Computer Instruction. For more information, see the overview or the list of modules in this series, U:Systems Analysis and UML . This document has been used in the following classes: CIS 288.
History
Original: 2007-03-19, by Laurence J. Krieg
Last modification: Monday, August 31, 2009
Copyright
Copyright © 2007, Laurence J. Krieg, Washtenaw Community College
Instructors: You may point to this file in your Web-based materials; however, its location may change without notice.
Students: You are welcome to make a copy for your personal use.
All other uses: Please contact the author, Laurence J. Krieg, for permission: krieg@ieee.org.