Maintaining an Analysis Model in synch with Multiple

Download Report

Transcript Maintaining an Analysis Model in synch with Multiple

UML – Unified Modelling Language
For Effective OO Development
Yves Holvoet
(say Eve Olvoot)
Rational Software Corporation
Agenda
 Modelling
 Why?
 Levels of Abstraction
 5 Views and 2 dimensions of System
Architecture
 UML
 History
 10 diagrams
 Summary
The Importance of Modeling
What Is a Model?
 A model is a simplification (abstraction) of reality.
Abstraction
 Is conceptual and captures the essential
characteristics of an entity that distinguish it
from all other kinds of entities.
 Defines a boundary relative to the perspective
of the viewer.
BankAccount
- balance : Money
- uniqueId : Id
+ withDraw(amount : Money)
Instance
 Is an actual entity instance of the conceptual
abstraction.
 All instances of a given abstraction share a
common structure (data and behavior as
described in the Abstraction).
myAccount :
BankAccount
yourAccount :
BankAccount
Levels of Abstraction
Scenario
High Level
object
object
Use Case
Is an instance of
Class
Is an abstraction for
object
Source
Process
Low Level
Processor Type
Processor
Modeling Process
Business
Business Use Cases - Activities
High Level
Use Cases
Scenarios
Classes
System
Objects
Abstraction
Instance
Sources
Processes
Processors
Low Level
UML 1 + 2 * 2 Views
Layers
Use Cases
Packages
Scenarios
Logical
View
Classes
Use
Case View
Objects
Software
Sources
Implementation
View
Tasks View
Process
Packages
Processes
Layers
Hardware
Systems
ProcessorsView
Deployment
4 + 1 = 1 + 2 * 2 Views
Logical View
Use Case View
Logical View
Implementation View
Use Case View
Implementation View
Process View
Deployment View
Process View
Deployment View
 The Use-Case view describes the behavior of
the system in term of use-cases and scenarios
 The Logical view packages the classes of the
system and their relationships
 The Implementation view describes the
mapping of the logical classes to components
of the target environment
 The Process view deals with concurrency and
synchronization
 The Deployment view describes the mapping
of the software on the hardware
Use-Case View
 3 Main Benefits
Specification
Abstraction for many scenarios
message instance
of operation
Class
link instance
of association
Validation
object instance
of class
Development Plan
Use Case View: Main Benefits
 Specification
 in terms of use cases
 Development plan
 lists iterations
 assign scenarios to iterations according to their risk levels
 Validation of classes
 the necessary objects for the whole system are collectively all
the objects participating in all scenarios
 the messages between objects drive class relationships
Logical View
 3 Main Benefits
Terminology
Logical grouping of classes
Strong inner coupling (cohesive classes)
Weak outer coupling (for reuse, resilience)
Object
Validation
Development Teams
Logical View: Main Benefits
 Terminology
 it provides vocabulary for common unambiguous
understanding of the problem domain
 Development Teams
 they are derived from packages
 packages are created to minimize the coupling
 Validation of objects
 the objects, links and messages must be in synch with class,
relationships and operations
2 Dimensions for Software Architecture
Logical packages
form horizontal layers
where layers can only
access what is below
and not what is above
Rational Unified Process is:
Architecture Centric
Use Case Driven
Scenarios form vertical slices
where each slice traverses all
layers but only “hits” a small
sub-set of the classes
Agenda
 Modelling
 Why?
 Levels of Abstraction
 5 Views and 2 dimensions of System
Architecture
 UML
 History
 10 diagrams
 Summary
History of the UML
Nov ‘97
UML approved by the OMG
UML Concepts
 The UML may be used to visually model:
 The interaction of your application with the outside world
• Use Case Diagram
 The behavior of your system
• Interaction Diagram
 The structure of your system
• Class Diagram
• Package Diagram
 The components in your system
• Component Diagram
• Deployment Diagram
10 UML Diagrams
Activity Diagram
Sequence Diagram
Use Case Diagram
Interaction Diagram (Scenarios)
Collaboration Diagram
Class Diagram (static part of class)
State-Transition Diagram (behavioral part of class)
Object Diagram
Component Diagram (Sources & Processes)
Deployment Diagram (Processors)
Use Case Diagram
 Use case diagrams are created to visualize the
interaction of your system with the outside world
Request Course Roster
Professor
Student
Register for Courses
Billing System
Maintain Course Information
Registrar
Sequence Diagram
 A sequence diagram shows step-by-step what has to
happen to accomplish a piece of functionality provided
by the system
registration
form
: Student
registration
manager
math 101
math 101
section 1
1: fill in info
2: submit
3: add course(joe, math 01)
4: add(Joe)
5: are you open?
6: add (Joe)
Collaboration Diagram
 A collaboration diagram displays object interactions
organized around objects and their links to one another
1: set course info
2: process
course form :
CourseForm
3: add course
: Registrar
theManager :
CurriculumManager
aCourse :
Course
4: new course
Class Diagram
 A class diagram shows the structure of your software
RegistrationUser
Student
major
3..10
Professor
4
1
0..4
CourseOffering
2 Main Relationships:
Inheritance vs. Association
Person
Food
<<deferred>> eat(Food)
Vegan
Vegetarian
Omnivore
eat(Food)
eat(Food)
eat(Food)
pre-condition of eat() is:
-Food parameter must be a
Vegetable
pre-condition of eat() is:
-Food parameter must be either a
Vegetable or Derived from Animal
No pre-condition at all for
eat()
The Physical World
 Component diagrams illustrate the organization and
dependencies among software components
Register.exe
Billing.exe
Billing
System
People.dll
Course.dll
Course
User
Deploying the System
 The deployment diagram visualizes the distribution of
components across the enterprise.
Registration
Database
Main
Building
Library
Dorm
Summary
 Visual modeling can be used to:





Define business process
Communicate
Manage complexity
Define software architecture
Promote reuse
 The UML is the standard language for visualizing,
specifying, constructing, and documenting the artifacts
of a software-intensive system
Questions?