Review Of UML
Summary
- OMT
- Review of UML
- UML Diagram Types
- Class Model Diagram
- Object Diagram
- Composite Structure Diagram
- Component Diagram
- Deployment Diagram
- Packages
- Profile Design
- Structural Definitions
- Use Case Diagram
- Context Diagram
- Sequence Diagram
- Communication Diagram
- Activity Diagram
- Interaction Overview Diagram
- State Diagram
- Behavioral diagram definitions
- Object Constraint Language
- UML Metamodel
OMT
Object Management Technique was developed by James Rumbaugh at GE. It uses (at least) three diagrams:
- Class model diagram
- Structural aspects
- Statechart diagram
- Behavioral aspects
- Dataflow diagram
- Functional aspects
OMT was the precursor to UML
Review of UML
Unified Modeling Language is standardized by the Object Management Group.
It is supported by CASE tools.
Three main architects:
- Rumbaugh
- Booch
- Jacobson
Used for design and analysis
UML Diagram Types
Two main categories:
- Structural
- Give you the pieces of the system that are always there, and the relationships among them
- Behavioral
- Concerned with the execution of the system
- One diagram may only represent one execution
Class Model Diagram
Classic, most popular
Also called static models
Details structural properties
Classes and relationships
Contains:
- Name
- Attributes
- Operations
Relationships
Three main relationships:
- Dependency
- “X uses Y”
- dashed, directed line
- Association
- “X affects Y”
- Solid, undirected line
- Generalization
- “X is a kind of Y”
- Solid line, with large open arrowhead
Object Diagram
Almost the same thing as class diagram, except it details instances, not classes.
Conveys objects and links instead of classes and relationships
Describes use of classes from class diagram
Composite Structure Diagram
Conveys internal structure of a class
Describes what provides an interface and what requires an interface
Component Diagram
Static implementation view
Component := a physical, replaceable part of a system that packages implementation and conforms to and provides the realization of a set of interfaces.
UML Reference Manual
Used to model code entities (i.e. binaries)
Used to convey architecture
Deployment Diagram
Configuration of run-time processing nodes and the component instances and objects that live on them.
Packages
General purpose organizing mechanism
Provides namespace scoping
System is the top-level package
Dependency arrows between packages indicate the existence of dependencies between constituents
Profile Design
Higher level
Properties of diagrams, not models
Profiles allow you to extend the basic UML notation
Structural Definitions
Class is the components and structural properties
Composite Structure is the internal structure and possible interactions
Component is the organization of physical software
Deployment is the physical system resources and how they map to hardware
Object is the static structure at a particular time
Package is the logical groupings and dependencies
Profile are extensions to the UML meta model
Use Case Diagram
Behavioral diagram
A use case is a sequence of user-visible actions along with system responses.
Useful for eliciting requirements
Depict the relationships among system actors and use cases
Two annotations
<<extends>>
<<uses>>
Use cases can be unstructured text or table
Actor | Action | Object |
---|---|---|
Foster | browses | Amazon website |
Foster | selects | book |
Amazon | verifies | credit information |
Context Diagram
Not part of UML
Dataflow Diagrams (DFDs) depict processes, actors, and dataflows among them
Context Diagram is the top-level DFD
Sequence Diagram
Used to convey a single use case
Communication Diagram
Semantically equivalent to Sequence diagram
Object diagram annotated with ordered interactions instead of links
Activity Diagram
Deals with synchronization
Variant of a state machine in which states may be simultaneously active
Transitions are triggered by activity completion
Used to model workflows, process synchronization, concurrency
Interaction Overview Diagram
Overview of interaction diagrams
State Diagram
Most powerful and most complex
Extend Finite State Machines (FSMs)
Behavioral diagram definitions
Activity is a flow of control from activity to activity
Sequence is a interaction of classes of message exchange
Communication is object interaction of numbered messages
Interaction Overview is the synthesis of lower-level activity diagrams
Timing rotated sequence diagram
Use Case is a system functionality provided to external actors
State is the dynamic behavior in response to stimuli
Object Constraint Language
Textual extension to UML’s visual notation, in order to provide more precise specification
Applicable to Class and State diagrams
First-order predicate logic + diagram navigation + collection classes
-- Add amount to balance
context Account::deposit(Real : amount)
pre: amount > 0
post: balance = balance@pre + amount
UML Metamodel
UML defined in terms of UML
Extended by profiles