Tải bản đầy đủ - 0 (trang)
Chapter 1.  Fundamentals of UML

Chapter 1.  Fundamentals of UML

Tải bản đầy đủ - 0trang

www.it-ebooks.info



UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

1.1. Getting

Started

...............................................

Publisher:O'Reilly

Date:

June

2005be sure to read this chapter all the way through to get

If you're new toPub

UML,

you

should

0-596-00795-7

acquainted withISBN:

the basic

terminology used throughout the book. If you are a developer, class

Pages:

234simplest diagrams to start with because they map closely to code.

diagrams tend to

be the

Pick a program or domain you know well, and try to capture the entities involved using

classes. Once you're convinced you've modeled the relationships between your entities

Table of Contents

correctly,

pick| Index

a piece of functionality and try to model that using a sequence diagram and

your classes.



IfSystem

you're developers

more of a process

person

(business

or otherwise),

you to

may

be more

comfortable

have used

modeling

languages

for decades

specify,

visualize,

starting

with

andocument

activity diagram.

Chapter

9 shows

examples

of modeling

construct,

and

systems.

The Unified

Modeling

Language

(UML) business

is one of processes

those

with

different

groups

(Human

Resources,

IT,members

etc.) and to

progresses

to by

modeling

parallel

languages.

UML

makes

it possible

for team

collaborate

providing

a common

processes

different

language over

that applies

togeographic

a multituderegions.

of different systems. Essentially, it enables you to

communicate solutions in a consistent, tool-supported language.



Today, UML has become the standard method for modeling software systems, which means

you're probably confronting this rich and expressive language more than ever before. And

even though you may not write UML diagrams yourself, you'll still need to interpret

diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



www.it-ebooks.info



UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

1.2. Background

...............................................

Publisher:O'Reilly

Pub

Date:

UML has become

the

de June

facto 2005

standard for modeling software applications and is growing in

ISBN:0-596-00795-7

popularity in modeling

other domains. Its roots go back to three distinct methods: the Booch

Pages:

234 the Object Modeling Technique coauthored by James Rumbaugh, and

Method by Grady

Booch,

Objectory by Ivar Jacobson. Known as the Three Amigos, Booch, Rumbaugh, and Jacobson

kicked off what became the first version of UML, in 1994. In 1997, UML was accepted by the

Table of Contents

| Index

Object

Management

Group (OMG) and released as UML v1.1.



Since then, UML has gone through several revisions and refinements leading up to the current

2.0

release.

Each revision

has tried

to address

problems

and shortcomings

identified in the

System

developers

have used

modeling

languages

for decades

to specify, visualize,

previous

versions,

leading systems.

to an interesting

expansion

andLanguage

contraction

of the

language.

UML

construct,

and document

The Unified

Modeling

(UML)

is one

of those

2.0

is by far UML

the largest

specification

in members

terms of page

count (theby

superstructure

alone is

languages.

makes UML

it possible

for team

to collaborate

providing a common

over

600 pages),

but itto

represents

theofcleanest,

compact

version it

ofenables

UML yet.

language

that applies

a multitude

differentmost

systems.

Essentially,

you to

communicate solutions in a consistent, tool-supported language.



Today, UML has become the standard method for modeling software systems, which means

you're probably confronting this rich and expressive language more than ever before. And

even though you may not write UML diagrams yourself, you'll still need to interpret

diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



www.it-ebooks.info



UML 2.0 in a Nutshell

Dan Pilone,Neil Pitman

1.3. UML By

Basics

...............................................

Publisher:O'Reilly

Pub Date: June 2005

ISBN:

First and foremost,

it0-596-00795-7

is important to understand that UML is a language . This means it has

234

both syntax andPages:

semantics.

When you model a concept in UML, there are rules regarding how



the elements can be put together and what it means when they are organized in a certain

way. UML is intended not only to be a pictorial representation of a concept, but also to tell you

Table of Contents

| Index

something

about

its context. How does widget 1 relate to widget 2? When a customer orders

something from you, how should the transaction be handled? How does the system support

fault tolerance and security?

System developers have used modeling languages for decades to specify, visualize,

You

can apply

in any systems.

number ofThe

ways,

but common

include:

construct,

andUML

document

Unified

Modeling uses

Language

(UML) is one of those

languages. UML makes it possible for team members to collaborate by providing a common

language that applies to a multitude of different systems. Essentially, it enables you to

Designing software

communicate solutions in a consistent, tool-supported language.

Communicating software or business processes

Today, UML has become the standard method for modeling software systems, which means

you're

probablydetails

confronting

rich and

language

more than ever before. And

Capturing

about this

a system

for expressive

requirements

or analysis

even though you may not write UML diagrams yourself, you'll still need to interpret

diagrams

written by

Documenting

anothers.

existing system, process, or organization



UML has

2.0 been

in a Nutshell

from

O'Reillydomains,

feels yourincluding:

pain. It's been crafted for professionals like

UML

applied to

countless

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

Banking and investment sectors

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

Health

care

types,

it also

explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Defense

Topics include:

Distributed computing

Embedded systems

The role and value of UML in projects

Retail sales and supply

The object-oriented paradigm and its relation to the UML

The basic building block of UML is a diagram. There are several types, some with very specific

An integrated approach to UML diagrams

purposes (timing diagrams) and some with more generic uses (class diagrams). The following

sections

touch

some of

the

major

ways UML

has been employed.

TheActivity,

diagrams

mentioned

Class

andon

Object,

Use

Case,

Sequence,

Collaboration,

Statechart,

Component,

in each

section

are by no

means confined to that section. If a particular diagram helps you

and

Deployment

Diagrams

convey your message you should use it; this is one of the basic tenants of UML modeling.

Extension Mechanisms



Object Constraint

Language (OCL)

1.3.1.The

Designing

Software

Because UML grew out of the software development domain, it's not surprising that's where it

still

finds its

greatest

When with

applied

to software,

UML

attempts

to bridge

thetogap

between

If you're

new

to UML,use.

a tutorial

realistic

examples

has

even been

included

help

you

the

original

idea foryourself

a piece with

of software

and its implementation. UML provides a way to

quickly

familiarize

the system.

capture and discuss requirements at the requirements level (use case diagrams), sometimes

a novel concept for developers. There are diagrams to capture what parts of the software

realize certain requirements (collaboration diagrams). There are diagrams to capture exactly

how those parts of the system realize their requirements (sequence and statechart diagrams).

Finally there are diagrams to show how everything fits together and executes (component and



www.it-ebooks.info



deployment diagrams).

Books describing previous versions of UML made a point to emphasize that UML was not a

UML 2.0

in a Nutshell

visual programming

language;

you couldn't execute your model. However, UML 2.0 changes

the rules somewhat.

the

major motivations for the move from UML 1.5 to UML 2.0 was

ByDan One

Pilone,of

Neil

Pitman

to add the ability

for modelers to capture more system behavior and increase tool

...............................................

automation. A relatively

new technique called Model Driven Architecture (MDA) offers the

Publisher:O'Reilly

Pub Date:

June 2005

potential to develop

executable

models that tools can link together and to raise the level of

ISBN:

0-596-00795-7

abstraction above

traditional

programming languages. UML 2.0 is central to the MDA effort.

Pages:234



It is important to realize the UML is not a software process. It is meant to be used within a

software process and has facets clearly intended to be part of an iterative development

Table of Contents | Index

approach.

While UML was designed to accommodate automated design tools, it wasn't intended only for

tools.

Professional

were kept

in mind for

when

UML was

designed,

so the language

System

developerswhiteboarders

have used modeling

languages

decades

to specify,

visualize,

lends

itself

to

quick

sketches

and

capturing

"back

of

the

napkin"

type

designs.

construct, and document systems. The Unified Modeling Language (UML) is one of those



languages. UML makes it possible for team members to collaborate by providing a common

language that applies to a multitude of different systems. Essentially, it enables you to

communicate

solutions

in a consistent,

tool-supported language.

1.3.2.

Business

Process

Modeling

Today, UML has become the standard method for modeling software systems, which means

you're

confronting

this rich

and expressive

language

more than

before.

And

UML

hasprobably

an extensive

vocabulary

for capturing

behavior

and process

flow.ever

Activity

diagrams

even

though

you

may

not

write

UML

diagrams

yourself,

you'll

still

need

to

interpret

and statecharts can be used to capture business processes involving individuals, internal

diagrams

by others.

groups,

or written

even entire

organizations. UML 2.0 has notation that helps model geographic

boundaries (activity partitions), worker responsibilities (swim lanes), and complex

UML 2.0 in a (statechart

Nutshell from

O'Reilly feels your pain. It's been crafted for professionals like

transactions

diagrams).

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



www.it-ebooks.info



UML 2.0 in a Nutshell

Dan Pilone,Neil Pitman

1.4. UML By

Specifications

...............................................

Publisher:O'Reilly

June

2005

Physically, UML Pub

is aDate:

set of

specifications

from the OMG. UML 2.0 is distributed as four

ISBN:

0-596-00795-7

specifications: the

Diagram

Interchange Specification, the UML Infrastructure, the UML

234Object Constraint Language (OCL). All of these specifications are

Superstructure,Pages:

and the

available from the OMG web site, http://www.omg.org.

Table of

Contents |Interchange

Index

The

Diagram

Specification was written to provide a way to share UML models

between different modeling tools. Previous versions of UML defined an XML schema for

capturing what elements were used in a UML diagram, but did not capture any information

about

how

a diagramhave

was used

laid out.

To address

this, for

the decades

Diagramto

Interchange

Specification

System

developers

modeling

languages

specify, visualize,

was

developed

with systems.

a mapping

from

a new

XML schema

to a Scalable

construct,

and along

document

The

Unified

Modeling

Language

(UML) is Vector

one of Graphics

those

(SVG)

representation.

Typically

thefor

Diagram

Interchange

Specification

used only

by tool

languages.

UML makes

it possible

team members

to collaborate

byisproviding

a common

vendors,

the OMG

an effort

to include

"whiteboard

tools."

languagethough

that applies

to amakes

multitude

of different

systems.

Essentially,

it enables you to

communicate solutions in a consistent, tool-supported language.

The UML Infrastructure defines the fundamental, low-level, core, bottom-most concepts in

UML;

theUML

infrastructure

is the

a metamodel

that is used

to produce

the rest

of UML.which

The means

Today,

has become

standard method

for modeling

software

systems,

infrastructure

isn't

typically used

by an

end

user, but language

it providesmore

the foundation

for the And

UML

you're probably

confronting

this rich

and

expressive

than ever before.

Superstructure.

even though you may not write UML diagrams yourself, you'll still need to interpret

diagrams written by others.

The UML Superstructure is the formal definition of the elements of UML, and it weighs in at

over

pages.

This isfrom

the authority

on all

thatpain.

is UML,

least

as farfor

as professionals

the OMG is like

UML 600

2.0 in

a Nutshell

O'Reilly feels

your

It's at

been

crafted

concerned.

The read,

superstructure

documentation

is typically

usedexpressed

by tool vendors

and those

you who must

create, and

understand system

artifacts

using UML.

writing

books on

some effort

hasversion

been made

make

it human readable.

Furthermore,

it'sUML,

beenthough

fully revised

to cover

2.0 oftothe

language.



The OCL specification defines a simple language for writing constraints and expressions for

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

elements in a model. The OCL is often brought into play when you specify UML for a particular

types, it also explains key concepts in a way that appeals to readers already familiar with

domain and need to restrict the allowable values for a parameter or object. Appendix B is an

UML or object-oriented programming concepts.

overview of the OCL.



Topics include:

It is important to realize that while the specification is the definitive source of the formal

definition of UML, it is by no means the be-all and end-all of UML. UML is designed to be

extended

depending

on the domain, user, and specific application. There is

The and

role interpreted

and value of

UML in projects

enough wiggle room in the specification to fit a data center through it... this is intentional. For

example,

are typically

two or more

ways

to represent

a UML concept depending on what

The there

object-oriented

paradigm

and its

relation

to the UML

looks best in your diagram or what part of a concept you wish to emphasize. You may choose

to represent

a particular

element

using

an in-house notation; this is perfectly acceptable as

An integrated

approach

to UML

diagrams

far as UML is concerned. However, you must be careful when using nonstandard notation

Class

Object,

Usefor

Case,

Sequence,

Collaboration,

Activity, Component,

because

partand

of the

reason

using

UML in the

first place is Statechart,

to have a common

and Deployment

Diagrams with other users.

representation

when collaborating

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



www.it-ebooks.info



UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

1.5. Putting

UML to Work

...............................................

Publisher:O'Reilly

Pub Date: June 2005

ISBN:0-596-00795-7

A UML model provides

a view of a systemoften just one of many views needed to actually

Pages:

build or document

the234

complete system. Users new to UML can fall into the trap of trying to



model everything about their system with a single diagram and end up missing critical

information. Or, at the other extreme, they may try to incorporate every possible UML

Table of Contents

Index model, thereby overcomplicating things and creating a maintenance

diagram

into |their

nightmare.

Becoming

proficient have

with UML

understanding

what

each diagram

hasvisualize,

to offer and

System developers

usedmeans

modeling

languages for

decades

to specify,

knowing

when

to

apply

it.

There

will

be

many

times

when

a

concept

could

be

expressed

construct, and document systems. The Unified Modeling Language (UML) is one

of thoseusing

any

number UML

of diagrams;

the one(s)

that

will mean

most to by

your

users. a common

languages.

makes it pick

possible

for team

members

to the

collaborate

providing

language that applies to a multitude of different systems. Essentially, it enables you to

Each

chapter ofsolutions

this book

a type

of diagram and

gives examples of its use. There

communicate

indescribes

a consistent,

tool-supported

language.

are times when you may need to have more than one diagram to capture all the relevant

details

a single

part of the

your

system.method

For example,

you may

need asystems,

statechart

diagram

to

Today,for

UML

has become

standard

for modeling

software

which

means

show

how

an embedded

controller

processes

input from

a user more

as well

as aever

timing

diagram

you're

probably

confronting

this rich

and expressive

language

than

before.

And to

show

the you

controller

interacts

withdiagrams

the rest of

the system

a result

of that

input.

even how

though

may not

write UML

yourself,

you'llasstill

need to

interpret



diagrams written by others.

You should also consider your audience when creating models. A test engineer may not care

about the low-level implementation (sequence diagram) of a component, only the external

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

interfaces it offers (component diagram). Be sure to consider who will be using each diagram

you who must read, create, and understand system artifacts expressed using UML.

you produce and make it meaningful to that person.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram



types, itUML

also explains

key concepts in a way that appeals to readers already familiar with

1.5.1.

Profiles

UML or object-oriented programming concepts.



Topics

include:

In

addition

to a variety of diagram types, UML is designed to be extended. You can informally

extend UML by adding constraints, stereotypes, tagged values, and notes to your models, or

you can use the formal UML extension and define a full UML profile . A UML profile is a

The of

role

and value and

of UML

in projects

collection

stereotypes

constraints

on elements that map the otherwise generic UML to

a specific problem domain or implementation. For example, there are profiles for CORBA,

The object-oriented paradigm and its relation to the UML

Enterprise Application Integration (EAI), fault tolerance, database modeling, and testing. See

Chapter

for moreapproach

information

on UML

2.0 Profiles.

An11

integrated

to UML

diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



www.it-ebooks.info



UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

1.6. Modeling

...............................................

Publisher:O'Reilly

Pub Date:

June

2005

It should go without

saying

that

the focus of UML is modeling. However, what that means,

0-596-00795-7

exactly, can be ISBN:

an open-ended

question. Modeling is a means to capture ideas, relationships,

Pages:234

decisions, and requirements

in a well-defined notation that can be applied to many different

domains. Modeling not only means different things to different people, but also it can use

different pieces of UML depending on what you are trying to convey.

Table of Contents | Index



In general a UML model is made up of one or more diagrams . A diagram graphically

represents things, and the relationships between these things. These things can be

representations

of real-world

pure

softwarefor

constructs,

or specify,

a description

of the

System developers

have usedobjects,

modeling

languages

decades to

visualize,

behavior

of and

some

other object.

It is The

common

forModeling

an individual

thing (UML)

to show

construct,

document

systems.

Unified

Language

is up

oneon

ofmultiple

those

diagrams;

a particular

interest,

or view , of by

theproviding

thing being

modeled.

languages.each

UMLdiagram

makes itrepresents

possible for

team members

to collaborate

a common

language that applies to a multitude of different systems. Essentially, it enables you to

communicate solutions in a consistent, tool-supported language.



1.6.1. Diagrams



Today, UML has become the standard method for modeling software systems, which means

you're probably confronting this rich and expressive language more than ever before. And

even though you may not write UML diagrams yourself, you'll still need to interpret

UML 2.0 divides diagrams into two categories: structural diagrams and behavioral diagrams .

diagrams written by others.

Structural diagrams are used to capture the physical organization of the things in your

systemi.e., how one object relates to another. There are several structural diagrams in UML

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

2.0:

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive

new edition not only provides a quick-reference to all UML 2.0 diagram

Class

diagrams

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or

object-oriented

concepts. to capture details about the entities that

Class

diagrams useprogramming

classes and interfaces

make up your system and the static relationships between them. Class diagrams are

Topicsone

include:

of the most commonly used UML diagrams, and they vary in detail from fully

fleshed-out and able to generate source code to quick sketches on whiteboards and

napkins. Class diagrams are discussed in Chapter 2.

The role and value of UML in projects

The object-oriented

paradigm and its relation to the UML

Component

diagrams

An integrated

approach

to UML

Component

diagrams

show

the diagrams

organization and dependencies involved in the

implementation of a system. They can group smaller elements, such as classes, into

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

larger, deployable pieces. How much detail you use in component diagrams varies

and Deployment Diagrams

depending on what you are trying to show. Some people simply show the final,

deployable

version of a system, and others show what functionality is provided by a

Extension Mechanisms

particular component and how it realizes its functionality internally. Component

diagrams

discussedLanguage

in Chapter

5.

The Objectare

Constraint

(OCL)

Composite structure diagrams

If you're new to UML, a tutorial with realistic examples has even been included to help you

Composite

structure

new to UML 2.0. As systems become more complex,

quickly

familiarize

yourselfdiagrams

with the are

system.

the relationships between elements grow in complexity as well. Conceptually, composite

structure diagrams link class diagrams and component diagrams; they don't emphasize

the design detail that class diagrams do or the implementation detail that composite

structures do. Instead, composite structures show how elements in the system combine

to realize complex patterns. Composite structures are discussed in Chapter 4.



www.it-ebooks.info



Deployment diagrams

UML 2.0 in a Nutshell



Deployment

diagrams

ByDan

Pilone,Neilshow

Pitmanhow your system is actually executed and assigned to

various pieces

of hardware. You typically use deployment diagrams to show how

...............................................

components

are configured

at runtime. Deployment diagrams are discussed in Chapter

Publisher:

O'Reilly

6.

Pub Date: June 2005

ISBN:0-596-00795-7

Pages:234



Package diagrams

Package

diagrams

Table of Contents

| Index



are really special types of class diagrams. They use the same

notation but their focus is on how classes and interfaces are grouped together. Package

diagrams are discussed in Chapter 3.



System developers have used modeling languages for decades to specify, visualize,

construct, and document systems. The Unified Modeling Language (UML) is one of those

Object diagrams

languages. UML makes it possible for team members to collaborate by providing a common

language

that

applies to

a the

multitude

of different

systems.

Essentially,

it enables

youinstances

to

Object

diagrams

use

same syntax

as class

diagrams

and show

how actual

communicate

solutions

in

a

consistent,

tool-supported

language.

of classes are related at a specific instance of time. You use object diagrams to show

snapshots of the relationships in your system at runtime. Object diagrams are discussed

Today,

become

the standard

method

asUML

parthas

of class

diagrams

in Chapter

2. for modeling software systems, which means

you're probably confronting this rich and expressive language more than ever before. And

even though

you may

not on

write

diagrams

yourself,inyou'll

still need

interpret

Behavioral

diagrams

focus

theUML

behavior

of elements

a system.

For to

example,

you can use

diagrams

written

by

others.

behavioral diagrams to capture requirements, operations, and internal state changes for

elements. The behavioral diagrams are:

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

Activity diagrams

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

capture

the flow

one appeals

behaviortoorreaders

activity already

, to the familiar

next. They

types,Activity

it also diagrams

explains key

concepts

in a from

way that

withare

similar

in concept to

a classic flowchart,

but are much more expressive. Activity

UML or

object-oriented

programming

concepts.

diagrams are discussed in Chapter 9.

Topics include:

Communication diagrams

The role and value of UML in projects

Communication diagrams are a type of interaction diagram that focuses on the

The object-oriented

andbehavior

its relation

the messages

UML

elements

involved inparadigm

a particular

andtowhat

they pass back and

forth. Communication diagrams emphasize the objects involved more than the order

An integrated

approach

to UML

diagramsCommunication diagrams are discussed as part

and

nature of the

messages

exchanged.

of interaction diagrams in Chapter 10.

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Interaction overview diagrams

Extension Mechanisms

Interaction overview diagrams are simplified versions of activity diagrams. Instead of

The Object Constraint

Language

emphasizing

the activity

at each (OCL)

step, interaction overview diagrams emphasize which

element or elements are involved in performing that activity. The UML specification

describes interaction diagrams as emphasizing who has the focus of control throughout

the execution of a system. Interaction overview diagrams are discussed as part of

If you're new to UML, a tutorial with realistic examples has even been included to help you

interaction diagrams in Chapter 10.

quickly familiarize yourself with the system.

Sequence diagrams

Sequence diagrams are a type of interaction diagram that emphasize the type and

order of messages passed between elements during execution. Sequence diagrams are



www.it-ebooks.info



the most common type of interaction diagram and are very intuitive to new users of

UML. Sequence diagrams are discussed as part of interaction diagrams in Chapter 10.

UML 2.0 in a Nutshell



State machine diagrams

ByDan Pilone,Neil Pitman

...............................................



State machine

diagrams

Publisher:

O'Reillycapture the internal state transitions of an element. The

element could

be as

small

as a single class or as large as the entire system. State

Pub Date:

June

2005

machine diagrams

are commonly used to model embedded systems and protocol

ISBN:0-596-00795-7

Pages:

specifications

or234

implementations. State machine diagrams are discussed in Chapter 8.



Timing

diagrams

Table of Contents

| Index

Timing diagrams are a type of interaction diagram that emphasize detailed timing

specifications

messages.

They are

often used

to modelto

real-time

System

developers for

have

used modeling

languages

for decades

specify, systems

visualize,such as

satellite

communication

or

hardware

handshaking.

They

have

specific

to

construct, and document systems. The Unified Modeling Language (UML) is notation

one of those

indicate

how

long a

process

or respond

to messages,

and howa external

languages.

UML

makes

it system

possiblehas

for to

team

members

to collaborate

by providing

common

interruptions

are to

factored

into execution.

diagrams

are discussed

asyou

parttoof

language

that applies

a multitude

of differentTiming

systems.

Essentially,

it enables

interaction

diagrams

in

Chapter

10.

communicate solutions in a consistent, tool-supported language.



Today, UML has become the standard method for modeling software systems, which means

Use case diagrams

you're probably confronting this rich and expressive language more than ever before. And

even Use

though

may not

write UML

diagrams

yourself, you'll

needThey

to interpret

caseyou

diagrams

capture

functional

requirements

for a still

system.

provide an

diagrams

written

by

others.

implementation-independent view of what a system is supposed to do and allow the

modeler to focus on user needs rather than realization details. Use case diagrams are

UML 2.0

in a Nutshell

from7.

O'Reilly feels your pain. It's been crafted for professionals like

discussed

in Chapter

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.



1.6.2.

Views

This comprehensive

new edition not only provides a quick-reference to all UML 2.0 diagram

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

While not strictly part of UML itself, the concept of views of a system helps the modeler

choose

Topics diagrams

include: that help convey the correct information depending on his goals.

Specifically, models are often divided into what is called the 4+1 views of a system. The 4+1

notation represents four distinct views of a system and one overview of how everything fits

The The

rolefour

and views

value are:

of UML in projects

together.

The object-oriented paradigm and its relation to the UML

integrated approach to UML diagrams

DesignAn

view

Classdesign

and Object,

Use Case,

Collaboration,

Statechart,

The

view captures

theSequence,

classes, interfaces,

and patterns

thatActivity,

describeComponent,

the

and Deployment

representation

of Diagrams

the problem domain and how the software will be built to address it.

The design view almost always uses class diagrams, object diagrams, activity diagrams,

Extension Mechanisms

composite

structure diagrams, and sequence diagrams to convey the design of a

system. The design view typically doesn't address how the system will be implemented

The Object Constraint Language (OCL)

or executed.



Deployment view

If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.

The deployment view captures how a system is configured, installed, and executed. It

often consists of component diagrams, deployment diagrams, and interaction diagrams.

The deployment view captures how the physical layout of the hardware communicates

to execute the system, and can be used to show failover, redundancy, and network

topology.



www.it-ebooks.info



Implementation view

The implementation

view emphasizes the components, files, and resources used by a

UML 2.0 in a Nutshell

system. Typically

the

implementation view focuses on the configuration management of

ByDan Pilone,Neil Pitman

a system; what components depend on what, what source files implement what classes,

...............................................

etc. Implementation

views almost always use one or more component diagrams and

Publisher:O'Reilly

may include

diagrams, statechart diagrams, and composite structure

Pub interaction

Date: June 2005

diagrams.ISBN:0-596-00795-7

Pages:234



Process view

Table of Contents | Index



The process view of a system is intended to capture concurrency, performance, and

scalability information. Process views often use some form of interaction diagrams and

activity diagrams to show how a system actually behaves at runtime.

System developers have used modeling languages for decades to specify, visualize,

construct,

and document

Thebrought

Unified Modeling

Language

(UML)

is one of those

The

four distinct

views of asystems.

system are

together with

the final

view:

languages. UML makes it possible for team members to collaborate by providing a common

language that applies to a multitude of different systems. Essentially, it enables you to

communicate solutions in a consistent, tool-supported language.

Use case view

Today, UML has become the standard method for modeling software systems, which means

use case

view captures

the and

functionality

required

by the

end

users.

concept

you'reThe

probably

confronting

this rich

expressive

language

more

than

everThe

before.

Andof

users

is may

deliberately

broad

the use yourself,

case view;

theystill

include

primary

even end

though

you

not write

UML in

diagrams

you'll

need the

to interpret

stakeholders,

system administrator, the testers, and potentially the developers

diagrams

written bythe

others.

themselves. The use case view is often broken down into collaborations that link a use

case

one or from

moreO'Reilly

of the four

Thebeen

use case

view

use case

UML 2.0

in with

a Nutshell

feelsbasic

yourviews.

pain. It's

crafted

forincludes

professionals

like

diagrams

and typically

usesunderstand

several interaction

diagramsexpressed

to show use

case

details.

you who

must read,

create, and

system artifacts

using

UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.



This comprehensive

new edition not only provides a quick-reference to all UML 2.0 diagram

1.6.3.

Notes

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.



UML provides a catchall element, or note, for adding information to your diagram. The note

Topics include:

symbol is a dog-eared rectangle with an optional dashed line to link it to some element.

Figure 1-1 shows a simple note.



The role and value of UML in projects

The object-oriented paradigm and its relation to the UML



Figure 1-1. A simple note

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

In

general,

you canyourself

use notes

to the

capture

just about anything in your diagram. Notes are often

quickly

familiarize

with

system.

used to express additional information that either doesn't have its own notation or would

clutter a diagram if you drew it right on the element. Some tools allow you to embed URL

links in notes, providing an easy way to navigate from one diagram to the next, or to HTML

documents, etc.



www.it-ebooks.info



1.6.4. Classifiers and Adornments

UML 2.0

in a Nutshell

The basic modeling

element

in UML is the classifier . A classifier represents a group of things

with common properties.

at the level of classifier, we are discussing UML itself,

ByDan Pilone,Remember,

Neil Pitman

not a particular ...............................................

system. So, when we say a class is a classifier, we mean that classes are

things that havePublisher:

common

properties: methods, attributes, exceptions, visibility, etc. A specific

O'Reilly

class, such as Automobile

, isn't

a UML classifier; it's an instance of a classifier, or a class.

Pub Date: June

2005

ISBN:0-596-00795-7

Pages:234



Table of Contents



For the truly self-abusing, this is a glimpse into the UML meta-model .

The full metamodel is quite complex and begins with the UML

| Index

infrastructure specification.



System developers have used modeling languages for decades to specify, visualize,

document

systems.

The Unified

Language

is one of to

those

Aconstruct,

classifier'sand

generic

notation

is a rectangle

thatModeling

can be divided

into (UML)

compartments

show

languages. UML makes

it possible

team members

to collaborate

providingHowever,

a common

classifier-specific

information,

such for

as operations,

attributes,

or stateby

activities.

language

appliessuch

to aas

multitude

of different

systems.

Essentially,

it enables

youtotohelp

many

UML that

classifiers

states, activities,

objects,

etc.,

have custom

notations

communicate

solutions

in a consistent, tool-supported language.

distinguish

them

visually.

AToday,

classifier

can

have

several

of extra

information

attached

to it via

a UML which

mechanism

UML

has

become

thetypes

standard

method

for modeling

software

systems,

means

called

adornments

. For example,

can have restrictions

placed

onever

the values

you're

probably confronting

this classifiers

rich and expressive

language more

than

before.aAnd

feature

of the you

classifier

canwrite

take.UML

In general,

constraints

written

neartothe

classifier or in an

even though

may not

diagrams

yourself, are

you'll

still need

interpret

attached

Seeby

the

specific diagram types for details on what notation to use for a

diagramsnote.

written

others.

constraint when writing it near the classifier.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

Another

of read,

adornment

a stereotype

. Just

as you

would expressed

expect, a stereotype

you whotype

must

create,isand

understand

system

artifacts

using UML.is intended

to

give the reader

a general

of what

a particular

classifier

Furthermore,

it's been

fully idea

revised

to cover

version 2.0

of therepresents.

language. Stereotypes are

usually associated with implementation concepts, such as «TRansactional» or «singleton»,

though

that isn't required

by the UML

specification.

This comprehensive

new edition

not only

provides a quick-reference to all UML 2.0 diagram



types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 1.  Fundamentals of UML

Tải bản đầy đủ ngay(0 tr)

×