Object Oriented Analysis & Design & UML (Unified Modeling

Download Report

Transcript Object Oriented Analysis & Design & UML (Unified Modeling

Part I: Definition
What is UML?
What is the Unified Process?

18.07.2015
Object Oriented Analysis & Design & UML (Unified Modeling Language)
1
What is UML?

UML is

a modeling language



a general purpose visual modeling tool
Incorporates practices in


modeling and software engineering
UP (Unified Process) is

18.07.2015
not a methodology
the methodology
Object Oriented Analysis & Design & UML (Unified Modeling Language)
2
Objects and UML

The Premise of UML:

Software and other systems can be modeled as


Object:



A cohesive cluster of data and behavior
Contains data and perform functions
Aspects of UML to describe a model:

Static Structure



Object types
and how they are related
Dynamic behavior


18.07.2015
collection of collaborating objects
Object life cycles
and their collaboration
Object Oriented Analysis & Design & UML (Unified Modeling Language)
3
UML Structure

The structure of UML:

Building blocks




Common mechanisms


UML ways to achieve specific goals
Architecture

18.07.2015
Basic UML modeling elements
Relationships
Diagrams
The view of system architecture
Object Oriented Analysis & Design & UML (Unified Modeling Language)
4
UML Building Blocks

Things


Relationships


modeling elements
how things are semantically related
Diagrams




Views of models
Show collection of things
What system do (analysis level diagrams)
How it will do (design level diagrams)
Things
18.07.2015
Relationships
Diagrams
Object Oriented Analysis & Design & UML (Unified Modeling Language)
5
UML Things

Structural things

The nouns of a UML model:








Behavioral Things

The verbs of a UML model :




Package:

to group semantically related elements
Annotation Things


18.07.2015
interactions,
state changes
etc
Grouping Things


classes,
interfaces,
collaboration,
use case,
active class,
component,
node
The note to explain the diagrams
like a yellow sticky note
Object Oriented Analysis & Design & UML (Unified Modeling Language)
6
UML Relationships

To show on a model



How two or more things are related
To capture meaningful connections between things
Type of relationships

Association


Dependency



Aggregation – “whole-part” relationship
Composition – “ comprise/contains” – relationship
Realization


18.07.2015
Change to one object affects behavior of another object
Generalization


Links between classifiers
One classifier specifies a contract
the other classifier to carry out
Object Oriented Analysis & Design & UML (Unified Modeling Language)
7
UML Relationships
Relationships
Association
Dependency
Generalization
Realization
UML Relationships and their graphical representation
18.07.2015
Object Oriented Analysis & Design & UML (Unified Modeling Language)
8
UML Diagrams


Views or windows into the model
Static Model


Captures the static relationships
UML’s static diagrams:




Dynamic Model



Captures how things interact
to generate the behavior of the SW
UML’s dynamic diagrams:





18.07.2015
Class diagram
Component diagram
Deployment diagram
Object
UC: Usecase Diagram
Sequence / collaboration
State
Activity
Object Oriented Analysis & Design & UML (Unified Modeling Language)
9
UML Diagrams
Static model
(system structure)
Diagrams
Dynamic model
(system behavior)
Class Diagram
Object Diagram
Component Diagram
Use case Diagram
Deployment Diagram
Sequence Diagram
Collaboration Diagram
Statechart Diagram
Activity Diagram
UML Diagrams
18.07.2015
Object Oriented Analysis & Design & UML (Unified Modeling Language)
10
Common Mechanisms


Strategies applied for approaching object modeling
Common mechanisms in UML:




18.07.2015
Specifications
 Graphical and textual descriptions of semantics
Adornments
 Added information on diagrams
Common divisions
 Classifier and instance (abstract and concrete)
 Interface and implementation (separate what and How)
Extensibility mechanisms
 Constraints (extend semantics)
 Stereotypes (adds new UML elements)
 Tagged values ( extends an elements specs)
Object Oriented Analysis & Design & UML (Unified Modeling Language)
11
UML Common Mechanisms
Common Divisions
Specifications
Adornments
Extensibility
Mechanisms
UML Common Mechanism Types
18.07.2015
Object Oriented Analysis & Design & UML (Unified Modeling Language)
12
Common Mechanisms:
Specifications

The “meat” of the model



Maintained using a CASE tool



Hold the model together
Give meaning to the model
CASE: Computer Aided Software Engineering
Provides ways to enter, view, and modify specifications
Models may be

Elided



Incomplete


Model may contain contradictions
To construct software

drive in modeling to evolve into


18.07.2015
Some elements may be missing
Inconsistent


Elements are present in backplane
Hidden in diagram to simplify the view
consistent models
complete models
Object Oriented Analysis & Design & UML (Unified Modeling Language)
13
Specifications provide the semantic
Semantic Backplane
BankAccount
Class Specification
name
accountNumber
deposit()
withdraw()
calculateIntereset()
Deposit
Usecase Specification
Dependency Specification
Modeling Element
18.07.2015
Semantic Backplane
Object Oriented Analysis & Design & UML (Unified Modeling Language)
14
Common Mechanisms:
Adornments

To provide more information


Start model construction with




High level models
Use just the basic symbols
Add one or two adornments
Refine the model over time



when needed on diagrams
Add more and more adornments
Until the model sufficiently detailed
Show the adornments only


18.07.2015
to increase the clarity and readability
to highlight some important features
Window
Unadorned element
Window
(author=jim, status=tested
+size: Area = (100,100)
#visibility:Boolean=false
+defaultSoze: Rectangle
#maximumSize: Rectangle
-xptr:Xwindow*
+create()
+hide()
+display(location: Point)
-attachXWindow(xwin: Xwindow*)
Element with Adornments
Object Oriented Analysis & Design & UML (Unified Modeling Language)
15
Common Mechanisms:
Extensibility Mechanisms


To extend the model when UML is not sufficient
Constraints


A text string in braces “{}”
Specifies some conditions or rules


Stereotypes




The modeling element must maintain
Represents a variation of an existing models element.
Allow to introduce new modeling elements
Append the stereotype in guilemots “« »”
Tagged values


To add own properties to modeling elements
Example:

18.07.2015
{tag1=value1, tag2=value2,.., tagN=valueN}
Object Oriented Analysis & Design & UML (Unified Modeling Language)
16
Common Mechanisms:
Common Divisions


Describe ways of thinking about the world
Two types:


18.07.2015
Classifier and instance
Interface and implementation
Object Oriented Analysis & Design & UML (Unified Modeling Language)
17
Common Divisions-1

Classifier and instance

Classifier:



Instance:


18.07.2015
Abstract notion of type
Example: bank account
Specific, concrete things
Example: “my bank account”
Object Oriented Analysis & Design & UML (Unified Modeling Language)
18
UML Classifiers
Classifier
Semantics
Actor
A role played by an outside user of the system to whom the
system delivers some value
Class
A description of a set of objects that share the same features
Classifier Role
A classifier restricted to a particular role in a collaboration
Component
A physical and replaceable part of a system that conforms to and
realizes one or more interfaces
Datatype
A type whose values have no identity such as the primitive types,
int, float, and char.
Interface
A collection of operations that are used to specify a servide offered
by a class or component
Node
A physical, run-time element that represents a computational
resource
Signal
An asynchronous message passed between objects
Subsystem
A grouping of elements – some of these may specify the behavior
offered by contained elements
Usecase
A description of a sequence of actions that a subsytem performs to
yield a value to a user
18.07.2015
Object Oriented Analysis & Design & UML (Unified Modeling Language)
19
Common Divisions-2

Interface and implementation



To separate what something does (interface)
From how it does (implementation)
Interface:

A contract


Implementation:


18.07.2015
to guarantee implementation must adhere
The actual specification
to show how the functionality obtained
Object Oriented Analysis & Design & UML (Unified Modeling Language)
20
Architecture


4 + 1 view of the system
Logical view

System functionality and vocabulary




Process view

Performance, scalability and throughput



Assembly and configuration management

Topology, distribution, delivery and installation

Deployment diagrams
Use Case


18.07.2015
Component diagrams
Deployment view


Class diagrams
Object diagrams
Implementation view


Class diagrams
Statechart diagrams
Object diagrams
Use case diagrams
Interaction diagrams
Object Oriented Analysis & Design & UML (Unified Modeling Language)
21
What is Unified Process (UP)

UP is


a Software Engineering Process (SEP)
the industry standard process


Process


18.07.2015
for UML-based projects
defines who, what, when and how
to turns the requirements into software
Object Oriented Analysis & Design & UML (Unified Modeling Language)
22
Instantiating UP


Every software project is different
Instantiate the process defining & incorporating:



In-house standards
Document templates
Tools



compilers, management tools, etc.
Databases
Life cycle modifications

Safety critical projects:


Simple projects:

18.07.2015
complex quality control measures
Simplification some of the activities
Object Oriented Analysis & Design & UML (Unified Modeling Language)
23
UP Axioms

Three basic Axioms




UP is

18.07.2015
Use Case and Risk driven
Architecture Centric
Iterative and incremental
driven by user requirements and Risk!
Object Oriented Analysis & Design & UML (Unified Modeling Language)
24
UP Structure

Four phases






One or more iterations in each phase
Five core workflows in each iteration


Inception
Elaboration
Construction
Transition
Requirements, Analysis, Design, Implementation, Test
Each iteration last 2 to 3 months
Phases
Inception
Iterations
Workflows
Requirements
Elaboration
Analysis
Construction
Design
Transition
Implementation
Testing
18.07.2015
Object Oriented Analysis & Design & UML (Unified Modeling Language)
25
Phases, Iterations and Workflows
18.07.2015
Object Oriented Analysis & Design & UML (Unified Modeling Language)
26
UP Iteration Workflows

5 core Workflows of UP







Each iteration generates a “baseline”
Baseline is

18.07.2015
Requirements
Analysis
Design
Implementation
Test
a set of iteration artifacts
Object Oriented Analysis & Design & UML (Unified Modeling Language)
27
UP Iterations
UP specific five core workflows
Requirements
Analysis
Design
Implementatio
n
Test
An Iteration
Planning
Assessment
Project
Specific…
Other workflows
18.07.2015
Object Oriented Analysis & Design & UML (Unified Modeling Language)
28
Inception

Establish feasibility

Prototyping to validate



Create business case





To demonstrate
the project will deliver quantifiable business benefits
Capture essential requirements
Identify risks
Focus:


18.07.2015
technology decisions
business requirements
requirements and analysis workflows
some design
Object Oriented Analysis & Design & UML (Unified Modeling Language)
29
Elaboration






Create an architectural baseline
Refine risk assessment
Define quality attributes
Capture use cases
Create construction plan
Develop resource requirements

18.07.2015
time, equipment, staff, cost
Object Oriented Analysis & Design & UML (Unified Modeling Language)
30
Construction





18.07.2015
Uncover missed requirements
Finish analysis model
Finish design model
Build initial operational release
Test initial release
Object Oriented Analysis & Design & UML (Unified Modeling Language)
31
Transition






18.07.2015
Correct defects
Prepare user site
Tailor software for user site
Create user manuals
Customize software to user environment
Conduct post project review
Object Oriented Analysis & Design & UML (Unified Modeling Language)
32
End of Chapter
18.07.2015
Object Oriented Analysis & Design & UML (Unified Modeling Language)
33