Uml PDF
Uml PDF
What is UML?
• Unified Modelling Language (UML) is a general purpose
visual modelling language
– Can support all existing lifecycles
– Intended to be supported by CASE tools
• Unifies past modelling techniques and experience
• Incorporates current best practice in software
engineering
• UML is not a methodology!
– UML is a visual language
– UP is a methodology
1
1.3
UML history
Prehistory Fusion UML
Schlaer st
1 unification Object
UML proposal
/ attempt Management UML 1.x UML 2.0
work begins accepted by
Mellor OMT, Booch, Group RFP
CRC
OMG
Booch
Rumba
ugh 1995
(OMT) Jacobs 1994 1996 1997 2003 2004
on
(Object Booch &
Jacobson UML
ory) Rumbaug Ongoing UML
Coad/ (Objector becomes
Yourdo h development
y) an
n (OMT)
joins industry
join
Rational standard
Rational
2
Goals of UML as stated by the designers are
-To model systems using OO concepts
-To establish an explicit coupling to conceptual
as well as executable artifacts
-To address the issues of scale inherent in
complex, mission-critical systems
-To create a modeling language usable by
humans and machine
To model systems using OO concepts
Specifying the structure and behavior of a
system
Visualizing a system as it is or as we want
it to be
Constructing a system from the template
provided by the model
Documenting the decisions made
State
State
Diagrams
Class
Use Case Diagrams
Diagrams
Use Case State
Use Case Diagrams
Use Case
State
Use Case Diagrams
Diagrams Diagrams
Object
Sequence Diagrams
Diagrams Diagrams
Diagram
Diagrams
s
Scenario State
Scenario State
Diagrams
Collaboration Diagrams
Component
Diagrams
Diagrams Diagrams
Diagrams
Models
Scenario Component
Scenario Component
Diagrams
Deployment
Diagrams
Statechart
Diagrams
Diagrams
Diagrams Diagrams
Activity
Diagrams
Three part of system’s model
1. Functional model
-Use case diagram
2. Object model
-Class diagram
3.Dynamic model
-sequence, Activity, State
1.6
UML Structure
• Structure consists of
10
Use case
Elements
Actor
State
Name
Class
Attributes
Method
11
Use case
12
1.8
13
1.8.1
Things
• Structural things – nouns of a UML model
– Class, interface, collaboration, use case, active class,
component, node
• Behavioural things – verbs of a UML model
– Interactions, state machine
• Grouping things
packag
– Package e
• Annotational things
– Notes
Some Information
about a thing
14
1.8.2
Relationships
relationship UML syntax brief semantics
aggregation
A relationship between classifiers where one classifier
realization specifies a contract that the other classifier
guarantees
to carry out
15
1.8.3
• Structure diagrams model the structure of the system (the static model)
• Behavior diagrams model the dynamic behavior of the system (the dynamic
model)
• Each type of diagram gives a different type of view of the model
16
1.9
17
1.9.1
Specifications
BankAccount
semantic backplane
name
icon or accountNumber
modeling deposit()
Class specification
element withdraw()
calculateInterest(
)
Dependency specification
Adornments
• Every UML modelling
Window
element starts with a basic
symbol to which can be Window
added a number of {author = Jim, status = tested}
Common divisions
• Classifier and instance
– A classifier is an abstraction, an instance is a concrete
manifestation of that abstraction BankAccount
LibraryItem
20
1.9.4
Extensibility mechanisms
note «entity» stereotype
constraint Ticket
{version = 1.1}
{ each Ticket tagged value
has a unique id } id
• Constraints
– Extends the semantics of an element by allowing us to add new rules about the element
– Written as { some constraint }
• Stereotypes
– A stereotype allows us to define a new UML modelling element based on an existing one
– We define the semantics of the stereotype ourselves
– Stereotypes add new elements to the UML metamodel
– Written as «stereotypeName»
– << >> called as guillemots
• Tagged values
– Allows us to add new, ad-hoc information to an element’s specification
– Written as { tag1 = value1, tag2 = value2 … }
21
1.9.4.2
<<class
>>
23
1.9.4.4
UML profiles
• A profile customizes UML for a specific purposes
• A UML profile is a collection of stereotypes, tagged
values and constraints
– The tagged values and constraints are associated with
stereotypes
• Stereotypes extend one of the UML meta-model
elements (e.g. Class, Association)
– Any element that gets the stereotype also gets the
associated tagged values and constraints
24
1.10
Architecture
system assembly
vocabulary
configuration
functionality
management
Implementation
Design view
view
25
Model Driven Architecture
• The Model-Driven Architecture (MDA) is a
software design approach that was officially
launched in 2001 by its sponsor, the Object
Management Group (OMG).
• MDA is intended to support model-driven
engineering of software systems. The MDA is a
specification that provides a set of guidelines for
structuring specifications expressed as models
• Model-Driven Engineering (or MDE) refers to the
systematic use of models as primary engineering
artifacts throughout the engineering lifecycle.
26
Model-Driven Architecture (MDA)
In MDA, platform-independent models (PIMs) are
initially expressed in a platform-independent
modeling language, such as UML.
The platform-independent model is subsequently
translated to a platform-specific model (PSM) by
mapping the PIM to some implementation language
or platform (e.g., Java) using formal rules
MDA
Platform
map Platform generate Code
Independen
Specific
t
Model
Model
deplo
y
27
28
1.11
Summary
• The UML is composed of building blocks:
– Things
– Relationships
– Diagrams
• The UML has four common mechanisms:
– Specifications
– Adornments
– Common divisions
– Extensibility mechanisms
• The UML is based on a 4+1 view of system architecture
29