05 ai uml_illik_students_part_2_eng

48
1. 1 Ambit Wissen macht ambitionierte Geschäftsziele erreichbar. Wir liefern Wissen und schaffen Werte. Weltweit. Knowledge enables your business ambitions. We deliver knowledge and create value. Worldwide. UML 2.x Part 2 Einführung Fort. / Introduction cont. J. Anton Illik

description

English language version of part 2 of 3 parts UML introduction

Transcript of 05 ai uml_illik_students_part_2_eng

Page 1: 05 ai uml_illik_students_part_2_eng

1. 1Ambit

Wissen macht ambitionierte Geschäftsziele erreichbar. Wir liefern Wissen und schaffen Werte. Weltweit.

Knowledge enables your businessambitions.We deliver knowledge and create value.Worldwide.

UML 2.xPart 2Einführung Fort. / Introduction cont.

J. Anton Illik

Page 2: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de2

• 5. Component Diagram(Komponentendiagramm)

• 6. Deployment Diagram (Verteilungsdiagramm)

• 7. Use Case Diagram (Use-Case-Diagramm)

• 8. Activity Diagram (Aktivitätsdiagramm)

• 9. State Machine(Zustandsautomat)

Att

en

tio

n:

Seq

uen

ceca

nch

ange!

The

arr

angem

ent

of

the

chap

ters

as w

ell!

• 10. Sequence Diagram (Sequenzdiagramm)

• 11. Communication Diagram (Kommuniaktionsdiagramm)

• 12. Timing Diagram (Timingdiagramm)

• 13. Interaction OverviewDiagram (Interaktionsübersichtsdia-gramm)

UML intro & overview

Content

Page 3: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de3

5. Component Diagram(Komponentendiagramm)

Cha

pte r

3

• Component diagrams are similar to Classdiagrams.

• Focused on higher level abstraction of subsystems(Components, Interfaces and their relations).

• The component diagram gives the possibility to showthe structure of a system at runtime. The representation refers and depends on component structure.

Page 4: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de4

5. Component Diagram(Komponentendiagramm)• Notation elements

– Component (physical part of the System; different types; see next page)

– Artefacts• E.g. a compiled object file• A piece of source code• Shared Library• Enterprise JavaBean (EJB), • Et cetera; • „Entity of the world of application“ as well)

Cha

pter

3

Page 5: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de5

Cha

pte r 5. Component Diagram

(Komponentendiagramm)

3

• UML-Standard-Stereotypes offer the followingTypes of Components– document– entity– executable– file– library– process– service– specification– subsystem– table

Page 6: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de6

5. Component Diagram(Komponentendiagramm)

<<component>>

Komponente1

Komplexer Port Implementierte Schnittstelle

<<component>>Komponente2

Bestandteil3

Bestandteil4

Klasse

<<spezifcation>>specDoc

Bestandteil2Bestandteil1

AllgemeineAbhängigkeitsbeziehung

<<compontent>>Komponente4

<<subsystem>>Komponente3

Realisierungsbeziehung

Port<<artifact>>Artefakt1

Bestandteil einer Komponente

<<artifact>>Komponente6

Implementierungsbeziehung

<<manifest>>

Cha

pter

3

Kompositionskonektor

Komponente

Verwendungs-Beziehung<<use>>

Delegationskonnektor

Benötigte Schnittstelle

Page 7: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de7

6. Deployment Diagram (Verteilungsdiagramm)

Cha

pte r

3

• Deployment Diagrams show classification of artefacts on Hardware components, named nodes.

• In other words: Deployment Diagrams show thenodes, on which the System is running. Nodes arephysical Entities ( = Hardware)

• Besides that, Deployment Diagrams form communicaiton relations and dependenciesbetween nodes.

Page 8: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de8

6. Deployment Diagram (Verteilungsdiagramm)apte

r3C

h

• Artefacts– Artefacts model physical information about a System

• besides Hardware,• User guides• Training material• Password files and• jar-Archive• Can be modeled as an Artefact.

– Artefacts express the terms/ideas/concepts of a modeled System

Page 9: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de9

6. Deployment Diagram (Verteilungsdiagramm)apte

r3C

h

• Artefacts– An Example Artefact: a Java-jar-Archive

– Artefacts can have attributes (like other UML-Classifiers)

MessageFramework.jar

MessageFramework.jar

Reentrant: booleannumLoggers: int = 1

Page 10: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de10

6. Depolyment Diagram (Verteilungsdiagramm)

Cha

pte r

3

• Notation elements– nodes

• Conventional Node-Stereotypes:– client– server– database– backup server

– communication path– distribution relationship– application specification

Page 11: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de11

6. Depolyment Diagram (Verteilungsdiagramm)

Cha

pte r

3

node 2<<device>>

node 3<<executionenvironment>>

communication pathnode 1<<device>>

execution: threadTransaction: false

Deployment spezifikation

Deployment relationship

Artefact

Page 12: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de12

6. Deployment Diagram (Verteilungsdiagramm)

apte

r3C

h

ServerOne Node

A Node with a couple of compartments

Server<<components>>Buchungssystem.jarComon.jar

Page 13: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de13

6. Deployment Diagram (Verteilungsdiagramm)apte

r3C

h

A Node with distributed Components

Server

Buchungssytem.jar Common.jar

<<deploy>> <<deploy>>

Page 14: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de14

6. Deployment Diagram (Verteilungsdiagramm)apte

r3C

h

Several Nodes and their Connection

Client

BuchungsserverDatenbankserver

<<LAN>>

<<Internet>>

Page 15: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de15

Deployment Diagram (Verteilungsdiagramm)apte

r3C

h

•CaseStudyDeployment Diagram:Deployment of a windscreenwiper service unit

Page 16: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de16

Fourth Diagram Type

Cha

pte r

3

Behaviour Modelling[Verhaltensmodellierung]

[Rupp et.a] S. 225-236

Page 17: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de17

7. Use-Case-Diagram (Use Case Diagramm)

Cha

pte r

3

• Use-Case-Diagrams give an overview of all therequirements on a system from the users point of view

• Use-Cases often have the following Connections– Generalization ( )– Extension (<<extends>>) and– Inclusion (<<include>>)

to other Use-Cases of the System

Page 18: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de18

7. Use-Case-Diagram (Use Case Diagramm)

Cha

pte r

3

• Notation elements– use case– system (subject)– actor (Part of the User)– <<include>> - relationship

• Use-Case can include behaviour of another Use-Case. The included Use-Case is not used autonomous, butpart of a bigger Use-Case.

– <<extend>> - relationship• Not part of the normal, fundamental development.• Generalization relation

Page 19: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de19

Drahtlos synchronisieren

Seriellsynchronisieren

Datensynchronisieren

Use Case Generalization

Datenkopplung

7. Use-Case-Diagram (Use Case Diagramm)

Cha

pte r

3

Page 20: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de20

7. Use-Case-Diagram (Use Case Diagramm)

Cha

pte r

3

Akteur 1

AnwendungsfallDebug-Infoaufzeichnen

MitverwendeterAnwendungsfall

<<include>>

<<extend>>

Systemname

Rechnungswesen

Additionally, there must be a Use Case document, describing the functionality. Maybe prosa, Word-File. -> technically seen, not a part of UML.Typical Content: short description (WHAT?),precondition, basic function

Akteur 2

Bankkunde

Akteur 3

Page 21: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de21

Use-Case-Diagram

Cha

pte r

3

•CaseStudyUse-Case-Diagram:Modelling an Online-Banking-System

Page 22: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de22

8. Activity Diagram (Aktivitätsdiagramm)

Cha

pte r

3

• Using Activity Diagrams, – complex processes, as well as– parallel processes and – alternative processescan be modeled and described.

• Aktivity Diagrams give – like State machines do – an Impression of the Behaviour development, – However they are concentrated on Transitions

(separate Steps)– They are not concentrated on their Activator

Page 23: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de23

8. Activity Diagram (Aktivitätsdiagramm)

Cha

pte r

3

• Notation elements– action– activity– objectnodes– links– Controll elements– start nodes– end nodes– branch connection node– synchronization – and parallelization knode– control data

– interuption area– exeption handler– activity area– structured nodes– quantity processing area– loop node– decision node

Page 24: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de24

8. Activity Diagram (Aktivitätsdiagramm)

get invitation

Invitation Check date

Check interestin invitation

AnnounceparticipationCancel invitation

[no time]

[time available]

[no interest]

[interest]

Activity name

possible order

activity

object node

action

link

condition

end node

Cha

pter

Start node

control node / decision node

3

Page 25: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de25

8. Activity Diagram (Aktivitätsdiagramm)

Cha

pte r

3

Wrapping a gift

Adress the Label

Put it under a tree

[Recipient lives far away]

Wrap the giftChristmas present

[Recipient lives near by]

A branch node / Decision in the Activity Diagram

Page 26: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de26

8. Activity Diagram (Aktivitätsdiagramm)

Cha

pte r

3

Parallelize something and bring it back together

…….

…….

…….

Page 27: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de27

9. Finite State Machine (Zustandsautomat)

Cha

pte r

3

Using state machines you get the possibility to modelthe behavior of any classifier. - State machines specify the behaviour of a classifier,

using states,- transitions between states, - transitions between states are initiated by inner or

external events.State Machines show different states, an entity canpass.

Page 28: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de28

9. Finite State Machine (Zustandsautomat)• Notation elements

– simple state– transition– start state– end state– pseudo states– crossing– decision– terminator– assembled state– substatemachine states

– entrance/ exit point– region– history– specialization– protocol state machine

Cha

pter

3

Page 29: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de29

9. State Machine (Zustandsautomat)

ticket machine

waiting GeldaufnahmeDo[enter coins]/ value heighten

cancel

Entry / valueexpend

Berechnung

do / pricecalculate

Output ricket

Entry / ticketexpend output

change

do / changeexpend

value heighten[enter coins]

[value<price]

[value>price]

ticket selectively

Cancel voted

After(Timeout)

[value = price]

stopppressed

State machine nameTrigger Guard

Crossing point

entrance behaviour

TimeTrigger

Cha

pter

3

Start stateAction Labels:entryexitdoinclude

state

Transition

State behavior

Page 30: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de30

10. Sequence Diagram (Sequenzdiagramm)

Cha

pte r

3

• Sequence Diagrams are the most used Interaction Diagrams.

• They show a chronological view of the messageexchange between Elements/Entities

• Sequence diagrams show the dynamic flowbetween objects in dependence of chronology.

Page 31: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de31

10. Sequence Diagram (Sequenzdiagramm)

Cha

pte r

3

• Notation elements– interaction / interaction frame– life line– news– state invariant– combined fragment– key relation– interaction reference– link point– defragmentation of life lines

Page 32: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de32

10. Sequence Diagram (Sequenzdiagramm)

object1 object2

Aktionssequenz /Action sequence

Cha

pter

3

(a-b<2 sec.) a

b

message()

answerZusicherung /assertion

Rekursion /recursion

Steuerungs-Fokus /

Control focus

life line

[x>0] message1()

object1 object2

[x<=0] message2()

answer1

answer2

Page 33: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de33

10. Sequence Diagram (Sequenzdiagramm)

Cha

pte r

3

object1

object2new()

answer

object1 object2

Iterationmessage()

*message()

Objektkonstruktion and -dekonstruktion

destroy()

answer

Page 34: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de34

Activitydiagram

Cha

pte r

3

•CaseStudyAktivitätsdiagramme:

Modelling a party

Page 35: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de35

11. Communication Diagram (Kommunikationsdiagramm)

Cha

pte r

3

• Closely related to the Sequence Diagram / Alternative to the Sequence Diagram.

• More important who is communicating with eachother. Chronology is less important.

• Communication diagrams show the dynamic flowand ist logic process in the collaboration of objects. (Interaction to realize a use case.)

Page 36: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de36

11. Communication Diagramm (Communication Diagram)• Notation elements:

– interaction / interaction frame– Life line– message

Cha

pter

3

Page 37: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de37

11. Communication Diagram (Kommunikationsdiagramm)

Cha

pte r

3

Time-dependend

sequential

Object:class

Object:class

Object:class

[Condition] 1.2:answer:=message(arg.)

1.1.*.message(arguments)Startmessage()

Sequence

synchronize

restricted

asyncron

Messages are displayed with lines between communication partners.

Page 38: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de38

12. Timing Diagram (Timingdiagramm)

Cha

pte r

3

• Timing Diagrams show the chronology of Classifiers in a System

• Most important is the real chronology of messages.

Page 39: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de39

12. Timing Diagram (Timingdiagramm)

Cha

pte r

3

• Notation elements:– interaction / interaction frame– live line– time line– message– branch mark– value line– key relation

Page 40: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de40

12. Timing Diagram (Timingdiagramm)

Traffic light

diagram name Duration condition

:han

ging

lam

p:p

rede

stria

ngreen

red

operable

active

waiting

{d…6*d}

Sek.0 1 2 3

d

activate

gostop

Time line

message

Cha

pter

3

Life lines

conditiontime scale

Page 41: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de41

13. Interaction Overview Diagram(Interaktionsübersichtsdiagramm)

Cha

pte r

3

• Interaction Overview Diagrams show the cooperationof different actions by displaying flows/ processes of interactions with a variant/ alternative of the activitydiagram.

• Refined by– Sequence Diagrams– Communication Diagrams– Timing Diagrams

Page 42: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de42

13. Interaction Overview Diagram (Interaktionsübersichtsdiagramm)

Cha

pte r

3

• Notation elements– interaction / interaction reference– control elements

Page 43: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de43

13. Interaction Overview Diagram (Interaktionsübersichtsdiagramm)

Cha

pte r

3

Geldautomat

ref

ref

ref

ref

ref

sd

KarteneinschubPIN Eingabe

Geldtransaktionabwickeln

Kartenauswurf

Karteneinzug:Authentifizierungs-

system :Display

Anzeigen („Karte wird eingezogen“)

{0..10} ZeiteinheitMinuten

[Dauer > 10]

[else]

[PIN Eingabe== 0]

[PIN Eingabe== fehlgeschlagen]

Interaktionsreferenz

Verzweigungsknoten

Verbindungsknoten

Paralellisierungsknoten

Startknoten

EndknotenKante Synchronisationsknoten

Page 44: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de44

State Machine (Zustandsautomat)

Cha

pte r

3

•CaseStudyState Machines: Modelling a ticket machine

Page 45: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de45

4 UML Model Development

Cha

pte r

4

Chapter 4

Page 46: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de46

How would you manage model development? Simple chronology of modelling process?

UML Exercise

Cha

pte r

4

Page 47: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de47

Literature

Cha

pte r

4

Literature

Page 48: 05 ai uml_illik_students_part_2_eng

www.ambit.de

www.ambit.de48

UML used and continuingLiterature

Cha

pte r

4

• Wolfgang Zuser, Thomas Greching, Monika Köhle: „Software Engineering mit UML und UnifiedProcess“; Pearson Studium, München, 2004

• Chris Rupp, Jürgen Hahn, Stefan Queins, Mario Jeckle, Barbara Zengler: „UML 2 glasklar“; Hanser, München, 2005

• Heide Balzert: „UML 2 kompakt“; Spektrum, Heidelberg, 2005