Learning UML 2.0

Book description

"Since its original introduction in 1997, the Unified Modeling Language has revolutionized software development. Every integrated software development environment in the world--open-source, standards-based, and proprietary--now supports UML and, more importantly, the model-driven approach to software development. This makes learning the newest UML standard, UML 2.0, critical for all software developers--and there isn't a better choice than this clear, step-by-step guide to learning the language."
--Richard Mark Soley, Chairman and CEO, OMG

If you're like most software developers, you're building systems that are increasingly complex. Whether you're creating a desktop application or an enterprise system, complexity is the big hairy monster you must manage.



The Unified Modeling Language (UML) helps you manage this complexity. Whether you're looking to use UML as a blueprint language, a sketch tool, or as a programming language, this book will give you the need-to-know information on how to apply UML to your project. While there are plenty of books available that describe UML, Learning UML 2.0 will show you how to use it. Topics covered include:



  • Capturing your system's requirements in your model to help you ensure that your designs meet your users' needs


  • Modeling the parts of your system and their relationships


  • Modeling how the parts of your system work together to meet your system's requirements


  • Modeling how your system moves into the real world, capturing how your system will be deployed


Engaging and accessible, this book shows you how to use UML to craft and communicate your project's design. Russ Miles and Kim Hamilton have written a pragmatic introduction to UML based on hard-earned practice, not theory. Regardless of the software process or methodology you use, this book is the one source you need to get up and running with UML 2.0. Additional information including exercises can be found at www.learninguml2.com.



Russ Miles is a software engineer for General Dynamics UK, where he works with Java and Distributed Systems, although his passion at the moment is Aspect Orientation and, in particular, AspectJ. Kim Hamilton is a senior software engineer at Northrop Grumman, where she's designed and implemented a variety of systems including web applications and distributed systems, with frequent detours into algorithms development.

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Audience
    2. About This Book
    3. Assumptions This Book Makes
    4. Conventions Used in This Book
    5. Using Code Examples
    6. Safari® Enabled
    7. How to Contact Us
    8. Acknowledgments
      1. From the Authors
      2. From Russ Miles
      3. From Kim Hamilton
  2. 1. Introduction
    1. 1.1. What’s in a Modeling Language?
      1. 1.1.1. Detail Overload: Modeling with Code
      2. 1.1.2. Verbosity, Ambiguity, Confusion: Modeling with Informal Languages
      3. 1.1.3. Getting the Balance Right: Formal Languages
    2. 1.2. Why UML 2.0?
    3. 1.3. Models and Diagrams
    4. 1.4. “Degrees” of UML
    5. 1.5. UML and the Software Development Process
    6. 1.6. Views of Your Model
    7. 1.7. A First Taste of UML
      1. 1.7.1. Notes
      2. 1.7.2. Stereotypes
        1. 1.7.2.1. Stereotype applied to classes (see Chapters 4 and 5)
        2. 1.7.2.2. Stereotypes applied to components (see Chapter 12)
        3. 1.7.2.3. Stereotypes applied to artifacts (see Chapter 15)
        4. 1.7.2.4. Tagged values
    8. 1.8. Want More Information?
  3. 2. Modeling Requirements: Use Cases
    1. 2.1. Capturing a System Requirement
      1. 2.1.1. Outside Your System: Actors
        1. 2.1.1.1. Tricky actors
        2. 2.1.1.2. Refining actors
      2. 2.1.2. Use Cases
      3. 2.1.3. Communication Lines
      4. 2.1.4. System Boundaries
      5. 2.1.5. Use Case Descriptions
    2. 2.2. Use Case Relationships
      1. 2.2.1. The <<include>> Relationship
      2. 2.2.2. Special Cases
      3. 2.2.3. The <<extend>> Relationship
    3. 2.3. Use Case Overview Diagrams
    4. 2.4. What’s Next?
  4. 3. Modeling System Workflows: Activity Diagrams
    1. 3.1. Activity Diagram Essentials
    2. 3.2. Activities and Actions
    3. 3.3. Decisions and Merges
    4. 3.4. Doing Multiple Tasks at the Same Time
    5. 3.5. Time Events
    6. 3.6. Calling Other Activities
    7. 3.7. Objects
      1. 3.7.1. Showing Objects Passed Between Actions
      2. 3.7.2. Showing Action Inputs and Outputs
      3. 3.7.3. Showing How Objects Change State During an Activity
      4. 3.7.4. Showing Input to and Output from an Activity
    8. 3.8. Sending and Receiving Signals
    9. 3.9. Starting an Activity
    10. 3.10. Ending Activities and Flows
      1. 3.10.1. Interrupting an Activity
      2. 3.10.2. Ending a Flow
    11. 3.11. Partitions (or Swimlanes)
    12. 3.12. Managing Complex Activity Diagrams
      1. 3.12.1. Connectors
      2. 3.12.2. Expansion Regions
    13. 3.13. What’s Next?
  5. 4. Modeling a System’s Logical Structure: Introducing Classes and Class Diagrams
    1. 4.1. What Is a Class?
      1. 4.1.1. Abstraction
      2. 4.1.2. Encapsulation
    2. 4.2. Getting Started with Classes in UML
    3. 4.3. Visibility
      1. 4.3.1. Public Visibility
      2. 4.3.2. Protected Visibility
      3. 4.3.3. Package Visibility
      4. 4.3.4. Private Visibility
    4. 4.4. Class State: Attributes
      1. 4.4.1. Name and Type
      2. 4.4.2. Multiplicity
      3. 4.4.3. Attribute Properties
      4. 4.4.4. Inline Attributes Versus Attributes by Association
    5. 4.5. Class Behavior: Operations
      1. 4.5.1. Parameters
      2. 4.5.2. Return Types
    6. 4.6. Static Parts of Your Classes
    7. 4.7. What’s Next
  6. 5. Modeling a System’s Logical Structure: Advanced Class Diagrams
    1. 5.1. Class Relationships
      1. 5.1.1. Dependency
      2. 5.1.2. Association
        1. 5.1.2.1. Association classes
      3. 5.1.3. Aggregation
      4. 5.1.4. Composition
      5. 5.1.5. Generalization (Otherwise Known as Inheritance)
        1. 5.1.5.1. Generalization and implementation reuse
        2. 5.1.5.2. Multiple inheritance
    2. 5.2. Constraints
    3. 5.3. Abstract Classes
    4. 5.4. Interfaces
    5. 5.5. Templates
    6. 5.6. What’s Next
  7. 6. Bringing Your Classes to Life: Object Diagrams
    1. 6.1. Object Instances
    2. 6.2. Links
      1. 6.2.1. Links and Constraints
    3. 6.3. Binding Class Templates
    4. 6.4. What’s Next?
  8. 7. Modeling Ordered Interactions: Sequence Diagrams
    1. 7.1. Participants in a Sequence Diagram
      1. 7.1.1. Participant Names
    2. 7.2. Time
    3. 7.3. Events, Signals, and Messages
      1. 7.3.1. Message Signatures
    4. 7.4. Activation Bars
    5. 7.5. Nested Messages
    6. 7.6. Message Arrows
      1. 7.6.1. Synchronous Messages
      2. 7.6.2. Asynchronous Messages
      3. 7.6.3. The Return Message
      4. 7.6.4. Participant Creation and Destruction Messages
    7. 7.7. Bringing a Use Case to Life with a Sequence Diagram
      1. 7.7.1. A Top-Level Sequence Diagram
      2. 7.7.2. Breaking an Interaction into Separate Participants
      3. 7.7.3. Applying Participant Creation
      4. 7.7.4. Applying Participant Deletion
      5. 7.7.5. Applying Asynchronous Messages
    8. 7.8. Managing Complex Interactions with Sequence Fragments
      1. 7.8.1. Using a Sequence Fragment: The ref Fragment
      2. 7.8.2. A Brief Overview of UML 2.0’s Fragment Types
    9. 7.9. What’s Next?
  9. 8. Focusing on Interaction Links: Communication Diagrams
    1. 8.1. Participants, Links, and Messages
      1. 8.1.1. Messages Occurring at the Same Time
      2. 8.1.2. Invoking a Message Multiple Times
      3. 8.1.3. Sending a Message Based on a Condition
      4. 8.1.4. When a Participant Sends a Message to Itself
    2. 8.2. Fleshing out an Interaction with a Communication Diagram
    3. 8.3. Communication Diagrams Versus Sequence Diagrams
      1. 8.3.1. How the Fight Shapes Up
      2. 8.3.2. The Main Event
    4. 8.4. What’s Next?
  10. 9. Focusing on Interaction Timing: Timing Diagrams
    1. 9.1. What Do Timing Diagrams Look Like?
    2. 9.2. Building a Timing Diagram from a Sequence Diagram
      1. 9.2.1. Timing Constraints in System Requirements
    3. 9.3. Applying Participants to a Timing Diagram
    4. 9.4. States
    5. 9.5. Time
      1. 9.5.1. Exact Time Measurements and Relative Time Indicators
    6. 9.6. A Participant’s State-Line
    7. 9.7. Events and Messages
    8. 9.8. Timing Constraints
      1. 9.8.1. Timing Constraint Formats
      2. 9.8.2. Applying Timing Constraints to States and Events
    9. 9.9. Organizing Participants on a Timing Diagram
    10. 9.10. An Alternate Notation
    11. 9.11. What’s Next?
  11. 10. Completing the Interaction Picture: Interaction Overview Diagrams
    1. 10.1. The Parts of an Interaction Overview Diagram
    2. 10.2. Modeling a Use Case Using an Interaction Overview
      1. 10.2.1. Pulling Together the Interactions
      2. 10.2.2. Gluing the Interactions Together
    3. 10.3. What’s Next?
  12. 11. Modeling a Class’s Internal Structure: Composite Structures
    1. 11.1. Internal Structure
      1. 11.1.1. When Class Diagrams Won’t Work
      2. 11.1.2. Parts of a Class
      3. 11.1.3. Connectors
      4. 11.1.4. Alternate Multiplicity Notations
      5. 11.1.5. Properties
      6. 11.1.6. Showing Complex Relationships Between Contained Items
      7. 11.1.7. Internal Structure Instances
    2. 11.2. Showing How a Class Is Used
    3. 11.3. Showing Patterns with Collaborations
    4. 11.4. What’s Next?
  13. 12. Managing and Reusing Your System’s Parts: Component Diagrams
    1. 12.1. What Is a Component?
    2. 12.2. A Basic Component in UML
    3. 12.3. Provided and Required Interfaces of a Component
      1. 12.3.1. Ball and Socket Notation for Interfaces
      2. 12.3.2. Stereotype Notation for Interfaces
      3. 12.3.3. Listing Component Interfaces
    4. 12.4. Showing Components Working Together
    5. 12.5. Classes That Realize a Component
    6. 12.6. Ports and Internal Structure
      1. 12.6.1. Delegation Connectors
      2. 12.6.2. Assembly Connectors
    7. 12.7. Black-Box and White-Box Component Views
    8. 12.8. What’s Next?
  14. 13. Organizing Your Model: Packages
    1. 13.1. Packages
      1. 13.1.1. Contents of a Package
      2. 13.1.2. UML Tool Variation
    2. 13.2. Namespaces and Classes Referring to Each Other
    3. 13.3. Element Visibility
    4. 13.4. Package Dependency
    5. 13.5. Importing and Accessing Packages
    6. 13.6. Managing Package Dependencies
    7. 13.7. Using Packages to Organize Use Cases
    8. 13.8. What’s Next?
  15. 14. Modeling an Object’s State: State Machine Diagrams
    1. 14.1. Essentials
    2. 14.2. States
    3. 14.3. Transitions
      1. 14.3.1. Transition Variations
    4. 14.4. States in Software
    5. 14.5. Advanced State Behavior
      1. 14.5.1. Internal Behavior
      2. 14.5.2. Internal Transitions
    6. 14.6. Composite States
    7. 14.7. Advanced Pseudostates
    8. 14.8. Signals
    9. 14.9. Protocol State Machines
    10. 14.10. What’s Next?
  16. 15. Modeling Your Deployed System: Deployment Diagrams
    1. 15.1. Deploying a Simple System
    2. 15.2. Deployed Software: Artifacts
      1. 15.2.1. Deploying an Artifact to a Node
      2. 15.2.2. Tying Software to Artifacts
    3. 15.3. What Is a Node?
    4. 15.4. Hardware and Execution Environment Nodes
      1. 15.4.1. Showing Node Instances
    5. 15.5. Communication Between Nodes
    6. 15.6. Deployment Specifications
    7. 15.7. When to Use a Deployment Diagram
    8. 15.8. What’s Next?
  17. A. Object Constraint Language
    1. A.1. Building OCL Expressions
    2. A.2. Types
    3. A.3. Operators
    4. A.4. Pulling It Together
    5. A.5. Context
    6. A.6. Types of Constraints
    7. A.7. OCL Automation
  18. B. Adapting UML: Profiles
    1. B.1. What Is a Profile?
    2. B.2. Stereotypes
    3. B.3. Tagged Values
    4. B.4. Constraints
    5. B.5. Creating a Profile
    6. B.6. Working with the Meta-Model
    7. B.7. Using a Profile
    8. B.8. Why Bother with Profiles?
  19. C. A History of UML
    1. C.1. Take One Part OOAD...
    2. C.2. ...with a Sprinkling of OOSE...
    3. C.3. ...Add a Dash of OMT...
    4. C.4. ...and Bake for 10 to 15 Years
  20. Index
  21. About the Authors
  22. Colophon
  23. Copyright

Product information

  • Title: Learning UML 2.0
  • Author(s): Russ Miles, Kim Hamilton
  • Release date: April 2006
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9780596009823