Chapter 1

advertisement
Quick Tour
•
•
•
•
•
•
Why do we model?
What is the UML?
Foundation elements
Unifying concepts
Language architecture
Relation to other OMG
technologies
1
Introduction to UML
Why model?
• Do engineers start building a
bridge without blueprints?
2
Introduction to UML
Some Answers
• Provide structure for problem solving
• Experiment to explore multiple solutions
• Furnish abstractions to manage
complexity
• Reduce time-to-market for business
problem solutions
• Decrease development costs
• Manage the risk of mistakes
3
Introduction to UML
Why do we model
graphically?
• Graphics reveal data.
– Edward Tufte
The Visual Display of Quantitative
Information, 1983
– “A picture is worth a thousand words”
4
Introduction to UML
Quick Tour
• The UML is a graphical language for
– specifying
– visualizing
– constructing
– documenting
the artifacts of software systems
• Added to the list of OMG adopted technologies in
November 1997 as UML 1.1
• Next minor revision was UML 1.3, adopted in
November 1999
• Next minor revision was UML 1.4
• Next major revision was UML 2.0
5
Introduction to UML
UML Goals
• Define an easy-to-learn but
semantically rich visual modeling
language
• Unify the Booch, OMT, and Objectory
modeling languages
• Include ideas from other modeling
languages
• Incorporate industry best practices
• Address contemporary software
development issues
– scale, distribution, concurrency,
executability, etc.
• Provide flexibility for applying different
processes
• Enable
model interchange and define
6
Introduction to UML
repository interfaces
OMG UML Contributors
Aonix
Colorado State University
Computer Associates
Concept Five
Data Access
EDS
Enea Data
Hewlett-Packard
IBM
I-Logix
InLine Software
Intellicorp
Kabira Technologies
Klasse Objecten
Lockheed Martin
Microsoft
ObjecTime
Oracle
Ptech
OAO Technology Solutions
Rational Software
Reich
SAP
Softeam
Sterling Software
Sun
Taskon
Telelogic
Unisys
…
7
Introduction to UML
UML
Grady Booch,
Ivar Jacobson,
and Jim Rumbaugh – historically
and fondly known in the UML
community as The Three Amigos –
are often credited with the dominant
contribution to the Unified Modeling
Language
©2007 · Georges Merx and Ronald J. Norman
Slide 8
Rational®
• Rational Software
Corporation, now a division of
IBM® Corporation, is a
dominant provider of Unified
Process and UML technology,
tools, and services
• UML is standardized by the
Object Management Group
– www.uml.org and www.omg.org
Slide 9
Learning Layout
Slide 10
UML Diagram Types
• Behavior Diagrams
– Illustrate the dynamic interactions between
elements (over time)
– Activity Diagram, State Machine Diagram, Use
Case Diagram, and the four interaction
diagrams
• Interaction Diagrams
– A subset of behavior diagrams which
emphasize object interactions
– Communication Diagram, Interaction
Overview Diagram, Sequence Diagram, and
Timing Diagram
• Structure Diagrams
– Show the static relationships between design
elements, irrespective of time
– Class Diagram, Composite Structure
Diagram, Object Diagram, Component
Diagram, Deployment Diagram, and Package
Diagram
©2007 · Georges Merx and Ronald J. Norman
Slide 11
Summary of UML Diagrams (1)
•
Activity Diagram
–
•
Class Diagram
–
•
Depicts the components that compose an application, system, or
enterprise. The components, their interrelationships, interactions,
and their public interfaces are depicted
Composite Structure Diagram
–
•
Shows instances of classes, their interrelationships, and the
message flow between them. Communication diagrams typically
focus on the structural organization of objects that send and
receive messages. Formerly called a Collaboration Diagram
Component Diagram
–
•
Shows a collection of static model elements such as classes and
types, their contents, and their relationships
Communication Diagram
–
•
Depicts high-level business processes, including data flow, or to
model the logic of complex logic within a system
Depicts the internal structure of a classifier (such as a class,
component, or use case), including the interaction points of the
classifier to other parts of the system
Deployment Diagram
–
Shows the execution architecture of systems. This includes
nodes, either hardware or software execution environments, as
well as the middleware connecting them
©2007 · Georges Merx and Ronald J. Norman
Slide 12
Summary of UML Diagrams (2)
•
Interaction Overview Diagram
–
•
Object Diagram
–
•
Describes the states an object or interaction may be in, as well as the
transitions between states. Formerly referred to as a state diagram,
state chart diagram, or a state-transition diagram. A behavioral state
machine examines the behavior of a class; a protocol state machine
illustrates the dependencies among the different interfaces of a class
Timing Diagram
–
•
Models the sequential logic, in effect the time ordering of messages
between classifiers
State Machine Diagrams – Behavioral and Protocol
–
•
Shows how model elements are organized into packages as well as
the dependencies between packages
Sequence Diagram
–
•
Depicts objects and their relationships at a point in time, typically a
special case of either a class diagram or a communication diagram
Package Diagram
–
•
A variant of an activity diagram which overviews the control flow within
a system or business process. Each node/activity within the diagram
can represent another interaction diagram
Depicts the change in state or condition of a classifier instance or role
over time. Typically used to show the change in state of an object
over time in response to external events
Use Case Diagram
–
Shows use cases, actors, and their interrelationships
©2007 · Georges Merx and Ronald J. Norman
Slide 13
Sample Class Diagram
©2007 · Georges Merx and Ronald J. Norman
Slide 14
Sample Object Diagram
©2007 · Georges Merx and Ronald J. Norman
Slide 15
Sample Use Case Diagram
©2007 · Georges Merx and Ronald J. Norman
Slide 16
Activity Diagram Notations
©2007 · Georges Merx and Ronald J. Norman
Slide 17
Sample Activity Diagram
©2007 · Georges Merx and Ronald J. Norman
Slide 18
Sample Sequence Diagram
©2007 · Georges Merx and Ronald J. Norman
Slide 19
Sample Communication
Diagram
©2007 · Georges Merx and Ronald J. Norman
Slide 20
Sample State Machine Diagram
©2007 · Georges Merx and Ronald J. Norman
Slide 21
Sample Deployment Diagram
©2007 · Georges Merx and Ronald J. Norman
Slide 22
©2007 · Georges Merx and Ronald J. Norman
Slide 23
Download