8-UML Building Blocks
8-UML Building Blocks
8-UML Building Blocks
Things
Structural Behavioral Grouping Annotational
Diagrams
Class Diagram Object Diagram Use Case Diagram Behaviour Diagram Implementation Diagram
Relationships
Dependency Association Generalisation Realization
Structural Things
The nouns of UML models; usually the static parts of the system in question.
Class - an abstraction of a set of things in the problemdomain that have similar properties and/or functionality. Notation:
customer
Notation:
Notation:
Notation:
DML_Parser.C
Notation:
Behavioral Things
The verbs of UML models; usually the dynamic parts of the system in question.
Notation:
Engine Idling
Grouping Things
The organisational part of the UML model; provides a higher level of abstraction (granularity).
Notation:
Accounts Department
Annotational Things
The explanatory part of the UML model; adds information/meaning to the model elements.
Notation:
Relationships
Articulates the meaning of the links between things.
Notation:
Relationships (contd.)
Generalisation - a relationship between a general thing
(called parent or superclass) and a more specific kind of that thing (called the child or subclass), such that the latter can substitute the former. Notation: (arrow-head points to the superclass)
Relationships (contd.)
Realization - a semantic relationship between two things
wherein one specifies the behaviour to be carried out, and the other carries out the behaviour. a collaboration realizes a Use Case the Use Case specifies the behaviour (functionality) to be carried out (provided), and the collaboration actually implements that behaviour. Notation: (arrow-head points to the thing being realized)
Diagrams
The graphical presentation of the model. Represented as a connected graph - vertices (things) connected by arcs (relationships). UML includes nine diagrams - each capturing a different dimension of a software-system architecture. Class Diagram Object Diagram Use Case Diagram Sequence Diagram Collaboration Diagram Statechart Diagram Activity Diagram Component Diagram Deployment Diagram
More on Diagrams...
Class Diagram - the most common diagram found in
OOAD, shows a set of classes, interfaces, collaborations and their relationships. Models the static view of the system.
More on Diagrams...
Sequence Diagram - models the flow of control by timeordering; depicts the interaction between various objects by of messages passed, with a temporal dimension to it.
More on Diagrams...
Activity Diagram - shows the flow from activity to
activity; an activity is an ongoing non-atomic execution within a state machine.
Dimensions...
. . .of Software Architecture
Structural Implementation View View Class Diagrams Object Diagrams Component Diagrams
User View
Sequence Diagrams Deployment Diagrams Collaboration Diagrams Statechart Diagrams Activity Diagrams Behavioral Environment View View Use Case Diagrams
Rules
Specify what a well-formed model should look like. The UML has semantic rules for
Names Scope Visibility Integrity Execution
Common Mechanisms
Mechanisms/elements that apply consistently throughout the language:
Specifications Adornments
(Notes)
Adornments
Adorn the model - i.e., enhance the model. Adds to the meaning and/or semantics of the element to which it pertains. Notes are the mechanism provided by UML for adorning a model:
graphical symbol to render constraints, comments, etc. a note that renders only a comment has no semantic impact on the element it is adorning; at most adds meaning to it and/or provides guidelines for implementation.
Stereotypes
Used to create new building blocks from existing blocks. New building blocks are domain-specific. A particular abstraction is marked as a stereotype and this stereotype is then used at other places in the model to denote the associated abstraction.
Notation: metaclass
Tagged Values
Used to add to the information of the element (not of its instances). Stereotypes help create new building blocks; tagged values help create new attributes. Commonly used to specify information relevant to code generation, configuration management, etc.
Notation: {version=1.4}
Constraints
Used to create rules for the model. Rules that impact the semantics of the model, and specify conditions that must be met. Can apply to any element in the model attributes of a class, relationship, etc.
Notation: { incomplete, disjoint }