Академический Документы
Профессиональный Документы
Культура Документы
Фаулер м. Основы Uml
Фаулер м. Основы Uml
Books.Ru 3
ISBN 539328630603X,
UML. , 33 3 Books.Ru
3 . 3
, 3
. 3
, 3
3 (piracy@symbol.ru), .
UML Distilled
A Brief Guide to the Standard
Object Modeling Language
Third Edition
Martin Fowler
UML
&
2005
UML. , 3'
.
.
.
.
.
.
.
.
M.
UML. , 33 . . . : 3, 2004. 192 .,
.
ISBN 539328630603
UML. UML 2 3
, . 3
. , ,
UML.
UML 3
. UML, ,
3
. , , , , 3
, , , , , 3
, , .
UML, , UML
.
.
ISBN 5!93286!060!
ISBN 0!321!19368!7 ()
3, 2004
Original English language title: UML Distilled: A Brief Guide to the Standard Object
Modeling Language, Third Edition by Martin Fowler, Copyright 2004 by Pearson
Education, Inc. All Rights Reserved. Published by arrangement with the original pub3
lisher, Pearson Education, Inc., publishing as ADDISON WESLEY.
, 3
. 3
, , .
3. 199034, 3, 16 , 7,
. (812) 32435353, edit@symbol.ru. N 000054 25.12.98.
005393, 2; 953000 .
9.12.2004. 701001/16 . .
12 . . 2000 . N
199034, 3, 9 , 12.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
UML? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
UML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
UML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
UML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
UML? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
UML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
UML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
. . . . . . . . . . . . . . . . . . . . . . . . . 49
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Rational . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
UML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
3. : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
. . . . . . . . . . . . . . . . . . . 89
5. : . . . . . . . . . . . . . . . . . . . . . . 92
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Read3Only Frozen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
3 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
. . . . . . . . . . . . . . . . . . . . . 103
3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
( ) . . . . . . . . . . . . . . . . . . . . . . . . . . 108
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
. . . . . . . . . . . . . . . . . . . . . . . 122
9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
( ) . . . . . . . . . . . . . . . . . . . . . . . . . 128
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
. . . . . . . . . . . . . . . . . . . . . . . . . . . 137
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
. . . . . . . . . . . . . . . . . . . . . . . . 150
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
. . . . . . . . . . . . . . . . . . 154
13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
10
14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
. . . . . . . . . . . . . . . . . . . . . . . . . 160
15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
. . . . . . . . . . . . . . . 164
17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
. . . . . . . . . . . . . . . . . . . . . . . . . . . 167
A. UML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
. 1.1. UML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
. 1.2. UML . . . . . . . . . . . . . . . . . . . . . . . 39
. 1.3. . . . . . . . . . . . . . . . . . . . 42
. 3.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
. 3.2. . . . . . . . . . . . . . . 64
. 3.3. . . . . . . . . . . . . . 64
. 3.4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
. 3.5. . . . . . . . . . . . . . . . . . . 69
. 3.6.
. . . . . . . . . . . . . . . . . . . 73
. 3.7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
. 4.1.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
. 4.2.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
. 4.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
. 4.4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
. 4.5. . . . . . . . . . . . . . . . . . . . . 87
. 4.6. CRC3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
. 5.1. . . . . . . . . . . . 94
. 5.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
. 5.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
. 5.4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
. 5.5. . . . . . . . . . . . . . 96
. 5.6.
Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
. 5.7. 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
. 5.8.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
. 5.9.
. . . . . . . . . . . . 99
12
. 5.10. . . . . . . . . . . . . . . . . . . . . . . . . . 102
. 5.11. . . . . . . . . . . . . . . . . . . . . . . . . . . 104
. 5.12. 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
. 5.13. 3 . . . . . . . . . . . 105
. 5.14. 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
. 5.15. . . . . . . . . . . 107
. 5.16. temporal . . . . . . . . . . . . . . . . 107
. 5.17. 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
. 5.18. ( 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
. 5.19. ( 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
. 5.20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
. 5.21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
. 5.22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
. 6.1. ,
Party. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
. 6.2.
Party. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
. 7.1. . . . . . . . . . . . . . . 115
. 7.2. . . . . . . . 117
. 7.3. . 7.2 . . . . . . . . . . . . . . . . . . . . . . . . . 118
. 7.4. , . . . . . . . . . . . . . . . . . . 119
. 7.5.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
. 8.1. . . . . . . . . . . . . . . . . . . . . . . . . 122
. 9.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
. 9.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
. 10.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
. 10.2. ,
. . . . . . . . . . . . . . . . . . . . . . . . . . . 132
. 10.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
. 10.4. . . . . . . . . . . . 134
. 10.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
. 10.6. switch C#
. . . . . . . . . . . . . . . . . . . . . . . . 135
. 10.7. ,
. 10.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
. 11.1. . . . . . . . . . . . . . . . . . . . . . . . . . 140
. 11.2. . . . . . . . . . . . . . . . . . 142
13
. 11.3. . 11.1
. 11.2 . . . . . . . . . . . . . . . . . . . . . 142
. 11.4. . . . . . . . . . . . . 143
. 11.5. . . . . . . . . . . . . . . . . . . . . . . . 144
. 11.6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
. 11.7. . . . . . . . . . . . . . . . . . . . . . . 146
. 11.8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
. 11.9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
. 11.10.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
. 11.11. . . . . . . . . . . . . . . . . . . . . . . . . . 149
. 11.12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
. 12.1.
. . . . . . . . . . . . . . . . . . . . . . . . . . . 153
. 12.2.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
. 13.1. TV Viewer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
. 13.2. (,
) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
. 13.3. . . . . . . . . . . . . . . . . . . . . . . . 156
. 14.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
. 14.2. . . . . . . . . . . . . . . . . . . . . . . . . . 159
. 15.1. . . . . . . . . . . . . . . . . 161
. 15.2.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
. 15.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
. 15.4. JUnit . . . 163
. 16.1. . . . . . . . . . . . . . . . . . . . . . . . . 165
. 17.1. ,
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
. 17.2. ,
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
UML Distilled UML.
, 3
.
(Craig Larman),
Applying UML and Patterns
UML, 3
UML.
(Jim Rambaugh),
UML
UML Distilled
UML.
UML. , UML 3
, 3
. 3
UML. .
(Steve Cook), , Microsoft
UML , . 3
UML.
.
(Alistair Cockburn),
Humans and Technology
,
3
. UML,
.
(Andy Carmichael),
BetterSoftwareFaster, Ltd.
UML, .
(John Crupi), Sun Microsystems,
Core J2EE Patterns
, UML, UML, 3
UML UML3,
( ). ,
. , , ,
, .
(Jon Kern),
UML.
. (Scott W. Ambler),
Agile Modeling
UML , 3
, . 3
, .
(Stephen J. Mellor),
Executable UML
, UML, 3
UML . 3
, UML
, 3
UML.
. , .
, UML 3
3 .
(Pavel Hruby),
Microsoft Business Solutions
,
. ,
, UML, .
(Charles Ashbacher),
/CEO, Charles Ashbacher Technologies
, UML Distilled, 3
. UML, , 3
. 3
, 3
.
(Rob Purser), Purser Consulting, LLC.
3
. ,
( , ),
( ), :
, 3
. 3
, UNIX Small3
talk .
, , 3
, , 3
. , ,
.
. 3
,
UML (Unified Modeling Language 3
). 3
UML, . 3
3
, UML 1.1 2.0,
.
UML ,
3
. ,
,
.
, UML 2.0,
,
UML? , .
, 3
. 3
, 3
. , 3
, 3
17
UML . 3
, , 20%
UML, 80% . 3
!
, ,
, . 3
, 3
,
.
, ,
UML ,
. UML 3
, 3
, 3
. 3
.
. 3
3
, UML 2.0.
UML 2.0, .
, , 3
, , .
3
UML.
3
.
3
, ,
, , 3
UML 3
. , , , 3
3
.
(Cris Kobryn)
Chair, U2 Partners UML 2.0 Submission Team
Chief Technologist, Telelogic
3
(Unified Modeling Language, UML), ,
, 3
3
,
. , 3
3
3
. UML 3
3
.
UML 3
, 3
.
,
3 3
. UML, 3
,
.
.
UML , 3
3
, .
, 3
UML, ,
, .
3
UML, ,
UML . 3
3
, 123 3
.
19
UML 3
, 3
3
.
, 3
UML , 3
.
; 3
, , 3
, 1997
.
3 ()
3
(Unified Modeling Language, UML). UML 3
, 3
. , 3
UML, 3
.
, , ?
, . , 3
UML, 3
. 3
. 3
, . 3
, .
, , 3
,
. ( , 3
; 3
.)
, ,
UML. ,
. 3
,
User Guide [6] Reference Manual [40].
UML. ,
UML .
.
, , . 3
, . 3
21
, , , ,
3.
,
,
. ,
. (Craig Larman) [29].
, UML,
.
UML , 3
.
UML , 3
UML, ,
, , 3
UML3.
MDA (Model Driven Architecture)
, . ,
, UML, 3
MDA. , MDA ,
, 3
UML, , MDA.
UML,
, 3
3 , , 3
CRC3. UML , 3
, , 3
.
, , ,
UML , ,
. 3
3
UML. Java C#, 3
, .
, . 3
Smalltalk!
UML?
. , 3
. 3
, 3
. ,
3. 3 3
, 3
. ,
22
, , 3
.
,
.
, 3
, , . 3
UML 3
3
, 3 .
UML 3
3 ,
.
1 UML: 3
, ,
.
2 .
UML, , 3
, , UML. 3
, ,
3.
UML 3
. 3 4 UML
( ) 3
. , , , 3
, 3
. UML , UML .
5 , 3
. 6 8
, : 3
, .
9 11
: , ( 3
,
) . 12 17
,
, 3
.
3
. ,
. ,
.
23
, ,
, ,
.
UML 2. , 3
.
, 3
. ,
,
( !),
.
, ,
,
, , UML
. , 3
, .
, 3
. UML ,
. UML 2,
2003 . ,
, 3
, ,
UML 2 , . 3
3 http://marE
tinfowler.com.
. 3
(Carter Shanklin) 3
(Kendall Scott). 3
Addison3Wesley, . 3
,
.
3
, , 3
Addison3Wesley.
UML, .
.
3
,
.
24
, , UML
.
UML , .
, , ,
, .
, (Conrad Bock),
(Steve Cook), (Cris Kobryn), (Jim Odell),
(Guus Ramackers) (Jim Rumbaugh),
. 3
.
(Grady Booch), (Ivar Jacobson)
(Jim Rumbaugh) .
,
. , 3
.
, , 3
.
(Simmi Kochhar Bhargava),
(Grady Booch), (Eric Evans), (Tom
Hadfield), (Ivar Jacobson),
(Ronald E. Jeffries), (Joshua Kerievsky),
(Helen Klein), (Jim Odell), (Jim Rum3
baugh) (Vivek Salgar).
:
(Conrad Bock)
(Andy Carmichael)
(Alistair Cockburn)
(Steve Cook)
(Luke Hohmann)
(Pavel Hruby)
(Jon Kern)
(Cris Kobryn)
(Craig Larman)
(Steve Mellor)
(Jim Odell)
(Alan OCallaghan)
(Guus Ramackers)
(Jim Rumbaugh)
(Tim Seltzer)
,
.
. 3
. , 3
martinfowler.com.
25
, 3
UML, (Don Baisley),
(Morgan Bj rkander), (Conrad Bock), (Steve
Cook), (Philippe Desfray), (Nathan
Dykman), (Anders Ek), (David Frankel),
(Eran Gery), ( ystein Haugen),
(Sridhar Iyengar), (Cris Kobryn), 33
(Birger M ller3Pedersen), (James Odell),
(Gunnar vergaard), (Karin Palmkvist),
(Guus Ramackers), (Jim Rumbaugh),
(Bran Selic), (Thomas Weigert)
(Larry Williams). 3 .
(Pavel Hruby) 3
Visio, UML;
http://phruby.com.
3
. ,
.
SoftPro 3
, ,
, ,
UML. , .
(Mike
Hendrickson). (Kim Arney Mulcahy) 3
, . 3
Addison3Wesley ,
(Evelyn Pyle) (Rebecca Rider)
. .
, . 3
.
.
,
http://martinfowler.com
UML?
(UML) 3
, .
, 3
, 33
() . 3 . 3
UML . 3
,
, 3
. 3
UML .
3
.
, 3
, 3
.
,
.
UML.
UML , 3
OMG (Object Management Group
), .
OMG , 3
,
3 . , OMG 3
CORBA (Common Object Request Broker Architec3
ture ).
28
1.
UML 3
,
803 903 . 1997 , 3
, 3
.
UML
UML
, ,
.
,
UML.
, (Steve Mellor)
UML : ,
. , ,
, , 3
UML . 3
UML .
3
. (forwardEengineering) 3
, (reE
verseEengineering) ,
.
, , 3
.
, , 3
.
, . ,
, ,
,
, 3
. : 103 3
3
, .
, ,
. ,
,
, . 3
, .
, 3
, . 3
,
UML
29
UML. UML, ,
, . 3
, .
, UML 3
. ,
,
, 3
. 3
, 3
.
, , ,
,
.
, 3
, 3
.
3 .
, 3
, 3
.
3
,
, 3
.
, .
,
, 3
, . 3
CASE3 (computer3aided software engineering 3
)
, , 3
. 3
3
. 3
, 3
. ,
, ,
(roundEtrip).
3
, .
.
.
30
1.
, ,
,
, , 3
,
.
, ,
.
UML,
, 3
.
CASE3 , 3
. ,
, UML
UML E
. 3
, , UML 3
. , UML
. ( , 3
, UML
.)
, UML 3
, . UML 2
: 3
, .
. UML 3
,
, .
UML 3
3
.
UML
. UML
. , 3
, UML, 3
.
UML 3
.
,
.
.
,
.
, UML 3
. 3
. UML ,
UML
31
, ,
UML
UML, MDA (Model Driven Ar3
chitecture , ) [27]. 3
, MDA
UML ; 3
OMG, UML. 3
, MDA,
, MDA3 3
.
MDA, UML, MDA 3
UML . , 3
, MDA, UML.
MDA . 3
,
PIM (Platform Independent Model , 3
). PIM UML, 3 3
. PIM PSM
(Platform Specific Model , ). PSM
, 3
. PSM
. PSM UML, 3
.
3
MDA, PIM 3
. 3
J2EE .NET 3
3
PSM .
PIM PSM 3
,
UML . 3
, UML 3
.
(Steve Mellor) 3
E
UML (Executable UML) [32]. UML
MDA, .
, , 3
MDA3 PIM. 3
(Model Compiler),
UML3 3
; PSM .
, .
32
1.
3
. (archetype) 3
UML .
(J2EE .NET).
UML,
.
UML UML;
. 3
UML , .
, ?
, . 3, 3
: ,
. ; ,
, ,
.
UML . ,
UML ,
,
.
,
. UML ,
, 3
. UML 3
. ,
Smalltalk, 3
, . 3
Smalltalk 3
, ,
. Smalltalk, UML
, .
(asset pool)
,
.
(specification) (implementa3
tion). , 3
, , 3
.
, .
UML 3
, UML 3
UML
33
. UML
. , UML
, , 3
. ,
, , 3
(moron ).
UML.
3, UML,
, UML . UML
,
UML. .
, UML
.
, 3, UML,
. 3
, UML.
, .
UML . ,
UML , ,
, .
, 3
, , 3
. 3
, 3
,
.
, 3
. ,
; 3
, .
, UML
, , 3 3
. , 3
,
, , 3
.
,
, UML . ,
.
UML 3
, 3
, . 3
UML,
, 3
34
1.
. , ,
, .
UML
, .
. ,
. , , 3
, UML,
.
803 3
.
Smalltalk , 3
; C++. 3
3
.
3
1988 1992 . 3
(Grady Booch) [5]; (Pe3
ter Coad) [7], [8]; (Ivar Jacobson) (Objectory) [24];
(Jim Odell) [34]; (Jim Rumbaugh) (OMT) [38],
[39]; (Sally Shlaer) M (Steve Mellor) [41],
[42]; 3 (Rebecca Wirfs3Brock) (Responsibility Driven
Design) [44].
3
, . 3
, ,
.
,
.
, 3
. OMG
, 3
. ( . 3
: ? : 3
.)
, UML, 3
GE Rational (3
IBM). ,
/ 1 .
, ,
1
( ) , 3
, .
. .
UML
35
, ,
Microsoft.
3 .
OOPSLA 95
0.8
(Unified Method). 3
, , Rational Software Objectory
3
. Rational , 0.8.
(
; , .)
. OMG, 3
,
. Rational , 3
. , OMG 3
.
, OMG. 3
, , , 3
. , 3
OMG. OMG 3
. , 3
, Rational,
. 3
OMG
CASE3. , 3
OMG . 3
UML, CASE33
.
(Mary Loomis)
, .
, ,
, Rational.
1997
,
. Rational 3
1.0
UML ,
(Unified Modeling Language).
, 3
. OMG 3
1.1 OMG. 3
. 1.2 ,
1.3 . 1.4 3
, 1.5
.
36
1.
UML,
, .
(Three Amigos),
. 3
UML, ,
. UML 3
/.
OMG. 3
,
. , 3
UML UML.
UML 3
. 3
, ; 3
. , 3
, ,
.
, 3
, .
,
3
.
3
.
. 3
. 3
. 3
, ,
,
.
; ,
.
. 3
, 3 ,
.
3
, . 3
( , ), .
37
. 1.1 UML, 3
. ( 3
,
. 33
.)
0..1
{ordered}
. 1.1. UML
, 3
? ,
, .
; 3
. , UML 3
,
.
, UML, 3
, , 3
UML . 3
, , 3
.
UML, ,
, .
UML .
.
.
, , , , 3
.
.
38
1.
UML
UML 2 13 ,
. 1.1, . 1.2.
UML , UML 3
. 3
. 3
. UML 3
, 3
, .
1.1. UML
11
UML 1
3, 5
UML 1
12
3 3
;
UML 1
14
UML 1
13
UML 2
UML 1
16
3 UML 2
3
UML 1
3
UML 1
3 UML 1
; 3
10
UML 1
17
3 UML 2
;
3 UML 1
39
UML?
. 1.2. UML
UML?
, : UML
, .
.
40
1.
,
UML: . =
(prescriptive rules) ,
, ,
, 3
. (descriptive rules) ,
,
. 3
, 3
, , 3
, , 3
.
UML , ,
. UML 3
,
.
, 3
; 3
, . 3
, , , 3
, ; , 3
. UML
, 3.
UML, 3
, .
, , , 3
UML. UML,
, .
, 3 3
. , UML
UML, .
, UML
. UML
UML, . ,
UML 2,
, UML 1,
,
. UML ,
: , . 3
, 3
(conventional use), 3
, , , , 3
. 3 ,
(standard) (normative). (3
, 3
UML
41
, ,
. UML 3
, 3
UML.)
UML, ,
UML , 3
.
3
3 .
3 .
UML , [1] 3
, ,
, ,
.
, , 3
, , 3
.
UML, 3
.
,
UML, UML, . ,
,
, UML.
(, UML 3
, 3
!)
UML
UML , 3
UML,
, UML 3
UML.
, UML 3
. UML 3
, .
. 3
. 3
, , , 3
.
UML
UML 3
, ,
42
1.
, , ,
.
, ,
UML, UML, .
(. 1.3)
.
, , 3
. UML , 33
.
WelcomeVisitors
RecentChanges
!
*
Find Page
SomeWikiPage
Visual Tour
Edit Page
. 1.3. wiki
(http://c2.com/cgi/wiki)
. 1.2 . 3
3
. ,
, 3
. 3
,
. 1.2 : , 3
, .
43
,
.
1.2.
$150
$100
$70
$50
$80
$60
.
,
. , . 3
. ( , , UML.)
, UML, UML
. 3
UML.
, , 3
.
, , 3
3
. ,
.
, 3
3
. ,
. , 3
.
3
UML, 33
. ,
, , .
,
.
UML 3 .
44
1.
,
UML, . 2003 ,
, UML 2.0,
, 3 3
. , 3
, UML 2.
, 3
[29].
, 3
.
UML 3
, ,
. 3
[40].
33
,
[30].
,
. , ,
(. 54) 3
.
2
, UML 33
. 3
3
,
.
, UML , 3
, , 3
.
3
UML .
UML. , 3
. , 3
,
. UML
, .
, , 3
, UML. 3
3 ; 3
,
, , .
UML RUP (Rational
Unified Process ,
Rational). RUP , , 33
, UML. 3
Rational 3
, UML. UML
. RUP
; . 52.
46
2.
. 3
, , 3
, 3
.
, 3
.
,
. 3
, , 3
, , 3
. , 3
.
3
. ,
: ,
, . 3
,
,
, , .
3
. .
3
:
, , . 3
, 3
. 3
, , .
, ,
. ,
.
3
3 ,
. 3
, .
, , 3
. , ,
. 3
.
3
.
47
, 3
, ,
.
.
,
, 3
, ,
. 3
, , ,
.
,
, 3
. ,
; , 3
3
. ,
, .
3: , 3
, .
,
,
.
. 3 [31] 3
(staged delivery), 3
3
, ,
. 3
,
.
3
, 33
, 3
.
,
, 3 3
.
. 3
, ,
, , , 3
. 3
, , 3
, , .
. , 3
48
2.
, 3
.
3 3
, , ,
, , 3
UML, 3
. , ,
.
: 3
, ,
. :
, 3
, 3
, ,
, 3
. ,
.
, ,
,
.
(time boxing). , 3
. , 3
, ,
3
, . 3
, ,
, .
, 3
. 3
, 3
.
.
. 3
,
. 3
, , 3
.
49
, 3
. 3
, .
(automated regression
tests) ,
. xUnit
3
(unit tests). 3
JUnit http://junit.org, 3
(http://www.xprogramming.com/software.htm). 3
3
, .
(refactoring)
[20].
, 3
.
(http://www.refactoring.com).
(continuous integration)
, 3
, [18].
3
, ,
. 3
, , 3
. 3
3
, 3
.
Extreme Programming [2],
( ) , ,
XP (eXtreme Programming) 3 .
, ,
. ,
.
3
, ,
. , ,
. 3
(predictive planning)
50
2.
. ,
, , 3
.
.
.
, , .
,
.
,
.
. 3
. 3
(requirements
churn): 3
. . 3
, 3
, 3
, 3
.
.
3
. 3
, .
,
, 3
, 3
. , 3
, 3
, , 3
.
(adaptive planning) , 3
.
, 3
,
.
, 3
3
; , .
3
, . 3
, , 3
, 3
.
, . ,
51
;
, 3
, .
3
.
, ,
. 3
. 3
, 3
. , 3
,
, 3
.
.
, ,
. 3
, 3
.
, , 3
, . 3
.
1. ,
,
.
2. , 3
, .
. 3
. 3
,
, .
3
. (agile) ,
, 3
,
(Manifesto of Agile Software Development)
(http://agileManifesto.org). XP
(Extreme Programming ), Scrum
(), FDD (Feature Driven Development , 3
), Crystal () DSDM (Dynamic Systems
Development Method ).
52
2.
.
. , 3
3
.
, , 3
.
,
, 3
. ,
UML
. UML 3
.
.
.
, 3
.
(lightweight).
,
,
.
Rational
, Rational
(Rational Unified Process, RUP), UML, 3
. ,
.
RUP ,
, 3
. RUP 3
(development case) , 3
.
, ,
. 3
,
RUP, , RUP 3
. 3
,
.
RUP 3
. RUP,
, , 3
, RUP.
53
RUP3 .
1. (inception).
. , 3
.
2. (elaboration). 3
3
, 3
. 3
,
. , 3
.
3. (construction) 3
, 3
.
4. (transition) , 3
.
,
.
,
. 3
, 3
. 3 , 3
, ,
, .
RUP (Unified
Process, UP). , 3
RUP,
Rational Software.
RUP Rational, UP,
RUP UP . ,
.
. ,
,
: , 3
, , , 3
, . 3
, ,
.
, , 3
. , 3
,
54
2.
. ,
.
, , 3
. 3
. , 3
. 3
, , . 3
. ,
, 3
. , , ,
, , 3 .
UML , 3 .
, : .
, 3
, ,
.
,
,
. ,
3
.
. , 3
, , 3
, 3
. , 3
; , .
3
.
3
. ,
. 3
.
.
3
. 3
, , ,
, 3
. , 3
; ,
, , ,
.
55
903 .
,
. 3
.
,
, [21],
23 . 3
, ,
; , 3
, 3
.
, .
. ,
.
, , , 3
, , .
,
. 3
, , 3
3
. .
, ,
. , 3
, ?
.
,
. [21], [36], [37],
[13], [35] , , [16] [19]. ,
: http://www.hillE
side.net/patterns.
, ,
, . 3
,
.
=
(iteration retrospective), ,
, . 3
, .
:
1. : , , 3
.
2. : , .
3. : .
56
2.
, 3
.
, ;
, . ,
, , 3
.
(project retro3
spective), ; 3
http://www.retrospectives.com/ [26].
, 3
.
UML
. ,
, ,
3 , . 3
3
. , 703 803
, .
, ,
, , .
, 3
.
UML 3
CASE3.
,
. 3
UML:
, ,
.
, 3
3
.
, 3
,
.
,
.
UML
57
, ,
3
, .
, , 3
. 3
, UML .
3
, . 3
, .
, .
UML, 3
. 3
UML , , 3
. 3
, ;
.
.
.
:
.
.
. 3
, CRC3
,
.
, 3
.
, 3
.
. ,
,
.
()
. , 3
3 , 3
. UML 3
.
58
2.
UML
, .
,
. 3
. ,
, , 3
.
3
, . , 3
, 3
.
UML 3
.
.
,
,
.
,
. 3
, , ,
, .
. ,
,
. , ,
, ,
.
,
,
. , 3
.
UML , , 3
.
3
. , 3
, 3
. , 3
, .
3
UML. ,
UML . 3
UML
59
,
. [14]:
. <
, .
.
,
, , JavaDoc.
, 3
. 3
, 3
.
, ,
, UML, 3
. , 3
, , ,
, .
. 3
,
. (. 8), 3
,
.
.
, 3
,
.
.
,
. : ; , 3
.
3
, 3
( 10). 3
, , , .
, 3
.
, ( 11),
, .
, 3
(. 54).
, . ,
60
2.
3
.
UML 3
.
,
. 3
.
3
. 3
; 3
3
. ,
, 3
.
.
:
, .
, 3 , , 3
.
,
3
. ,
(,
, ,
).
. , 3
3 3
.
, , 3
(Manifesto
for Agile Software Development) .
3
(Extreme Programming),
.
61
3
,
.
[31].
3
.
, 3
, [9] [22].
UML [1].
XP (Extreme Programming ), 3
3 http://xprogramming.com http://
www.extremeprogramming.org. XP ,
.
[2].
[3] XP, 3
.
XP,
, .
Rational Unified Process
[28] .
3
:
3 :
UML?, ,
. UML, 3
, . 3
3
.
, 3
.
: ( ) ( 5).
, .
,
, 3
. UML (feature) 3
, , .
. 3.1 , ,
.
:
( ), . . 3.1 3
: .
. 3
.
, ,
.
, 3
: .
3,
.
63
Order
dateReceived: Date[0..1]
isPrepaid: Boolean[1]
number: String [1]
price: Money
Customer
name [1]
address [0..1]
getCreditRating(): String
dispatch
close
{ Order.customer.getCreditRating
"poor", Order.isPrepaid
true}
lineItems
{ordered}
Order Line
Corporate Customer
Personal Customer
contactName
creditRating
creditLimit
creditCardNumber
billForMonth(Integer)
remind()
quantity: Integer
price: Money
{getCreditRating() == "poor"}
*
salesRep
0..1
Employee
Product
. 3.1.
3
. :
: = { }
:
6 : String [1] = " " {readOnly}
.
, (+)
(public) (6) (private). 3
. 110.
64
3. :
, 3
.
.
. 65.
3
, .
{ }
. {readOnly},
. , , ,
.
.
. 3
, , 3
. . 3.2 3.3 , 3
.
Order
+ dateReceived: Date [0..1]
+ isPrepaid: Boolean [1]
+ lineItems: OrderLine [*] {ordered}
. 3.2.
Date
0..1
+ dateReceived
Order
+ isPrepaid
1
Boolean
lineItems
{ordered}
OrderLine
. 3.3.
, 3
. (
) .
65
, 3
. ,
. , 3
.
, :
?. , 3
, 3
, , (. 101),
, .
3
, 3
.
,
. 3
:
1 ( .)
0..1 ( , 3
.)
* ( , 3
. .)
, 2..4 .
, 3
* ( 3
). ,
; 1 1..1. 3
, * 0..*.
, 3
.
Optional () .
Mandatory () ,
1.
Single=valued () 3
1.
Multivalued () ,
1; *.
, 3
.
,
, 3
66
3. :
. ,
{ordered}.
, {nonunique}. (
, {un6
ordered} {unique}.) unordered, non3
unique, , {bag}.
UML 1 , 2,4 ( 2
4, , ).
, UML 2
.
[1]. 3
, , 3
, [1], 3
. 3
,
.
UML, 3
3. 3
. ,
Order Line ( ), . 3.1,
Java :
public class OrderLine...
private int quantity;
private Money price;
private Order order;
private Product product
, C#, , 3
:
public class OrderLine ...
public int Quantity;
public Money Price;
public Order Order;
public Product Product;
, (pub3
lic) , ,
(private) , .
( ). 3
( ) ( 3
). , ,
.
67
, 3
. , 3
, 3
, . Order Line
:
public class OrderLine...
private int quantity;
private Product product;
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public Money getPrice() {
return product.getPrice().multiply(quantity);
}
.
Order Line ,
. , ,
. 3
.
,
. Order ()
Order Line.
(ordered), (3
, List Java IList .NET). ,
, , ,
, 3
.
, UML
, 3
.
,
( Java):
class Order {
private Set lineItems = new HashSet();
public Set getLineItems() {
return Collections.unmodifiableSet(lineItems);
}
public void addLineItem (OrderItem arg) {
lineItems.add (arg);
}
public void removeLineItem (OrderItem arg) {
lineItems.remove(arg);
}
68
3. :
3
; (add)
(remove). Line
Items ( ),
; 3
. , 3
. 3
. ,
3,
.
,
. 3
.
, ,
. 33
,
.
, ,
, .
, UML 3
, . 3
, ,
.
,
, , 3
.
, ,
.
. 3
, , . 3.4.
, 3
. Car ()
Person
owner
0..1
. 3.4.
Car
69
Owns
0..1
Car
. 3.5. (own )
, 3
. C# 3
:
class Car...
public Person Owner {
get {return__owner;}
set {
if (_owner != null) __owner.friendCars().Remove(this);
__owner = value;
if (_owner != null)__owner.friendCars().Add(this);
70
3. :
}
}
private Person _owner;
...
class Person ...
public IList Cars {
get {return ArrayList.ReadOnly(_cars);}
}
public void AddCar(Car arg) {
arg.Owner = this;
}
private IList _cars = new ArrayList();
internal IList friendCars() {
// Car.Owner
return _cars;
}
....
, ( 3
) . 3
(Person)
.
,
, 3
. friend ()
C++, 3
. , 3
, ,
3
.
, 3
3 .
(operations) , 3
. 3
. 3
, ,
.
UML 3
:
( ) : { }
, (+)
(public) (6) (private); 3
. 110.
71
, .
,
.
,
. :
: =
, , .
, (in), 3
(out) (inout). 3
, in.
, :
+ balanceOn (date: Date) : Money
.
, ,
, CRC3 (. 89).
, , 3
, , . UML
,
, ; 3
, . 3
{query} (). 3
, , ,
.
,
, [33]. 3
, . ,
, , 3
, .
, 3
. , 3
, ,
, , . [33] 3
3.
, 3
, .
, ,
(getting methods)
72
3. :
(setting methods). 3
( ). =
(
). , 3
. 3
.
.
, 3
, . 3
, .
,
,
.
3
, .
(generalization) 3
3.
, .
Customer (, ),
Personal Customer ( ) Corpo6
rate Customer ( ) .
. 3
, 3
, 3
. ,
3
. : ,
(, , ),
.
:
. 33
3
.
3
.
,
, .
, ,
, .
73
, ,
. ( 3
Liskov Substitution Principle (LSP) (3
) [30]).
,
, 3
. :
Java 3
Vector (), 3 3
. ,
Vector, , 3
.
3
. 3
, , ,
. , 3
, , 3
. 3
.
, 3
.
(. 96)
[21].
.
3
, (. 3.6). 3
.
Car
. 3.6.
3
.
3
. 3
,
: 33.
74
3. :
, (de3
pendency), ()
(). 3
: 3
;
;
. , 3
, , .
. 3 3
, , 3
.
, 3 .
UML .
, ,
.
. 3.7 , 3
. Benefits Window ( )
, ,
Employee (). Employee
, ,
3. , Employee
, , , Benefits Window
.
Employee
Data Gateway
Benefits
Window
Employee
Benefits
Data Gateway
. 3.7.
,
.
, ,
Benefits Window, Employee
. ,
, 3
, , ,
.
75
: 3
Data Gateway ( ) Benefits Window.
, , ,
Employee. Employee,
, .
UML , 3
. ,
, , ,
. ,
(. 3.1).
3.1.
call ()
create ()
derive ()
instantiate
( )
. (
, ,
;
)
permit ()
realize ()
, (. 96)
refine ()
; ,
, 3
substitute ()
(. 72)
trace ()
, ,
3
use ()
. 3
. , ,
, , 3
, . ,
, , 3
3
, . 3.7.
76
3. :
UML .
Order Customer , Order Customer.
, .
,
. 3
, ,
.
.
,
, .
;
, .
,
, . 3
,
(. 114).
3
, , 3
. 3
parameter (), local () global
().
UML 1, ,
. UML 2.
, , 3
. 3
3
UML.
. . 3.1 , 3
(Order)
(Customer). , Line
Item ( ) :
40 , 40 40 , 120 3
. , 3
, .
,
, ,
.
3 ,
.
77
UML
. : 3
({}).
, 3
UML (Object Constraint Language, OCL) [43],
. 3
3
.
3 OCL .
, 3
, .
, ,
: { :
}.
UML, 3
.
, 3
5.
, , ,
, 3
. .
.
, : , , 3
, . 3
, 5, 3
.
,
. 3
,
.
,
.
,
,
.
, , 3
, 3
. , 3
, , 3
3 .
, , .
78
3. :
(Design by Contract) 3
, Eiffel.
, [33]. 3
Eiffel, 3
.
. (assertion) ,
. 3
3
.
, .
: , .
. 3
,
. ,
,
input = result * result, result
, input . 3
, ,
, . ,
.
,
. 3
input >= 0. , 3
3
.
,
,
3
. : 3
.
, 3
.
( , 3
), (
).
, ,
, , 3
79
.
. ,
, , 3
.
, 3
.
, ,
3
.
.
, Account () ,
, balance == sum(entries.amount()). 3
. 3
,
.
,
,
.
, 3
.
3
. , 3
, 3
.
. 3
. 3
, . ,
, .
,
. 3
3
,
. 3
, , , 3
.
1 UML
. 3
.
[30].
4
(interaction diagrams) 3
. UML
,
.
.
,
(use case).
, .
, ,
. (Order) 3
(Line Items)
,
(Order Line). , 3
, 3
.
. 4.1 , 3
. 3
,
(lifeline),
; .
, . ,
getQuantity
getProduct. , 3
getDiscountInfo 3
.
.
getQuantity, getProduct, getPricingDetails calculateBasePrice
,
calculateDiscounts . 3
81
an Order
calculatePrice
an Order Line
aCustomer
getQuantity
getProduct
aProduct
aProduct
getPricingDetails
calculateBasePrice
calculateDiscounts
getDiscountInfo
. 4.1.
, 3
, .
3
, UML 1.
UML 2 ,
. (partici3
pants), UML. UML
1 , 3
, UML 2 , 3
.
,
anOrder. . 3
: : , , ,
, . (
. 4.4.)
,
. 3
.
UML , 3
82
4.
. 3
, 3
.
. ,
getProduct aProduct, , 3
, , aProduct, 3
getPricingDetails. ,
3
. ,
,
; .
, ,
.
, ,
. =
(found message).
. 4.2.
,
. 3
(Price). 3
(Product); , 3
.
(Customer). 3
,
.
an Order
an Order Line
aProduct
aCustomer
calculatePrice
calculatePrice
getPrice(quantity: number)
discountedValue
. 4.2.
83
3, , 3
. 3
. ,
, 3
, .
3, ,
. . 4.1 =
(centralized control),
, .
. 4.2 (distributed control),
,
.
.
, 3 3
, 3
. , 3
; ,
.
, , 3
. 3
.
, , . 3
3 .
, 3
,
.
, 3
(Product)
.
, 3
, 3
, 3
. , 3
; 3
(paradigm shift) .
. , 3
3 . 3
, ,
. ,
, .
84
4.
3
(. 4.3).
, 3
. 3
, ,
new . 3
, ,
.
(X). 3
, X, , 3
; X , 3
.
,
, X ,
.
, , .
a Handler
new
a Query
Command
new
a Database
Statement
. 4.3.
85
,
,
.
, 3
.
. 3
, .
, .
, (inter3
action frames),
. . 4.4 ,
.
foreach (lineitem)
if (product.value > $10K)
careful.dispatch
else
regular.dispatch
end if
careful :
Distributor
:Order
regular :
Distributor
:Messenger
dispatch
loop
[ ]
alt
[ > $10000]
dispatch
[else]
dispatch
opt
[needsConfirmation]
. 4.4.
86
4.
end for
if (needsConfirmation) messenger.confirm
end procedure
3
, .
, . ( . 4.1
.)
loop
, . 3
alt
. ,
. opt.
4.1.
alt
(alternative); 3
, (. 4.4)
opt
(optional) ; ,
. alt (. 4.4)
par
(parallel); 3
loop
(loop); , 3
(. 4.4)
region
(critical region);
,
neg
(negative) ; 3
ref
(reference); ,
. ,
, . 3
sd
(sequence diagram);
,
UML 2. , 3
UML 2, ; ,
. . 4.5
.
UML 1 .
(iteration marker) *,
.
. (guard) 3
87
, ,
, .
UML 2, 3
.
3
, . 3
, , 3
, . 4.5. 3
,
.
, =
(pseudomessage)
. . 4.5
; 3
, ,
. 3
.
, .
careful :
Distributor
an Order
dispatch
!
*
* [
]
regular :
Distributor
:Messenger
dispatch
( UML 1.3 )
[needsConfirmation]
. 4.5.
88
4.
, 3
dispatch (), 3
,
. , 3
. 4.5, 3
.
UML
; 3
.
3
,
UML.
, 3
, 3
, 3 ,
, . , 3
, 3
, .
, , 3
. 3
UML 2.
,
.
(synchro3
nous message), ,
, .
(asynchronous message),
.
3
, .
, .
; 3
. , ,
UML 1.4, ,
,
. 4.5.
, .
, . 3
,
89
, , 3
.
, 3
. 3
, 3
.
, ( 10).
3
, ( 11).
3
, CRC3, 3
. 3
CRC3 ,
3
, .
3
, , 3
, .
CRC!
, 3
, ,
, 3
, . CRC3 (Class3Responsibility3Col3
laboration, 33),
(Ward Cunningham) 803 ,
3
(. 4.6). UML,
3
.
CRC3 3
.
, ,
, ,
.
, ;
, 3,
, .
90
4.
Order
Order Line
Customer
. 4.6. CRCE
CRC3 3
. (responsibility)
, : ,
, , ,
3 , .
, 3
.
.
C ( CRC) (collaboration):
,
. 3
, .
CRC3 ,
3
.
, ,
, ,
. , 3
3
. CRC3
, .
.
.
, 3
. 3
, ,
, .
91
, 3
3
. . 3
. ,
3
, .
, 3
3
. , , 3
, .
CRC , , 3
. CRC
, (Kent Beck) [4]. 3
CRC3 [44].
5
:
4
. 3
, 90%
.
. 3
, 3
. 3
, .
, 3
. : 3
.
, ,
.
, , 3
. UML
, .
, UML,
,
UML, , ,
.
. (interface) UML
(. 96) ,
. Java, COM (Component
Object Module) CORBA. ,
inter6
93
face. , 3
().
, 3
.
, {abstract}, 3
. , 3
, . , 3
, UML.
.
,
: interface I,
{abstract} {A}. , 3
, .
,
.
UML 1 . UML
2 , ,
, , . 3
3 UML 1
, .
. (profile) 3
UML 3
, 3.
.
,
. ,
, ,
, , 3
, .
(. 90)
. ,
(. 5.1).
, 3
, .
UML ,
, , .
C3 . 3
(. 5.2).
94
5. :
View
Model
DD
DD
Input Controller
DD
. 5.1.
Order
getNumber
getNextNewNumber
. 5.2.
UML 3
.
: (aggregation)
. , 3
. ,
.
UML 3
.
,
. 3
, .
UML (. 5.3) 3
. (Jim Rumbaugh): 3
[40].
UML
(composition). . 5.4 Point ()
, 3
, .
95
Club
Person
. 5.3.
Polygon
{ordered}
3..*
Point
Circle
. 5.4.
,
, 3
.
,
3.
, 5.4 . 3
, , 0..1. 3
1, 3
, 3.
3
. , 3
(Polygon), (Points),
.
, 3
, 3 (. 100) ,
3
.
; 3
. ,
, . 3
.
(derived properties) 3
. (. 5.5),
: , 3
. , 3
, .
. 3
3
. , . 5.5,
96
5. :
Date Range
start: Date
end: Date
/length: Integer
. 5.5.
, (start) (end) ,
(length) .
, , 3
DateRange ( ).
. 3
,
, , .
, 3
, ,
. 3
.
3
. /.
(abstract class) , 3
. .
3
. (abstract operation) ;
,
.
UML 3
. , 3
.
, : {abstract}.
, , 3
. 3
C# Java 3
. interface.
: 3
. ,
. Java .NET ,
. C++ 3
, .
97
, 3
. , .
. 5.6 3
, Java.
Order (), (Line Items).
, Order
List (). , equals, add get.
Order 3
ArrayList, , 3
, 3
List.
ArrayList AbstractList. AbstractList
, 3
List. , get . ArrayList
get, 3
AbstractList. add,
equals.
interface
Collection
equals
add
Abstract List
interface
List
Order
Line Items [*]
equals
get
add
get
(
)
(
)
ArrayList
get
add
. 5.6. Java
98
5. :
Order 3
ArrayList? 3
,
.
. , 3
, , 3
List.
, ,
.
. 3
,
, , :
private List lineItems = new ArrayList();
, Order
ArrayList. ,
. lineItems 3
List, Order Array6
List.
.
, 3
.
. 5.6 3
. . 5.7 . ,
ArrayList List Collection, , 3
. , Order 3
List, .
.
UML , 3
UML 2. ( , 3
.) , 3
, , . 5.8, 3
.
.
,
. , 3
Order
List
ArrayList
99
Order
List
ArrayList
Collection
. 5.8.
,
, . .
, 3
, . 3
,
. 3
, ,
. 5.9. , , 3
Salesman, Bonus Calculator
, Pay Period Salesman
Employee. ( 3
.)
a scenario
march : Pay
Period
Bruce: Salesman
a Bonus
Calculator
addToPayList (Bruce)
calculatePayroll
calculate Pay
!
*
employee
. 5.9.
100
5. :
Read!Only Frozen
. 64 {readOnly} ( ).
,
, . , 3
{frozen} () UML 1. 3
frozen,
; 3
(immutable). UML 2, frozen
, 3.
, frozen 3
,
frozen. ( , 3
frozen .)
! !
, 3
(identity). ,
, . ,
3,
3.
= (reference objects) , Customer
(). ,
. , 3
Customer, 3
. , 3
Customer, 3
. , , Customer,
.
Customer
, 3
, .
; , , , 3
, 3
. , 3
.
= (value objects) , Date ().
, 3
. ,
, 1
2004 . .
.
101
, ,
, 3
. , 3
, 3
, ( 3
). , 1 2004
, , 3
.
3 . ,
3 1
2004 2 2004 . 3
2 2004
. 3
: , 3
3
. (aliasing).
3 3
. 3 3
. 3
,
.
UML , 3
. ,
3,
. 3 3
, . 3
Java , ,
3. ,
3 3
. ;
, value struct.
UML
,
(associative arrays), (maps), (hashes)
(dictionaries). 5.10 3
Order () Order Line ( ),
. ,
(Product)
.
:
102
5. :
0..1
Order
Product
line item
Order Line
amount:Number
. 5.10.
class Order ...
public OrderLine getLineItem(Product aProduct);
public void addLineItem(Number amount, Product forProduct);
,
, 3
, , .
. . 5.10
(Line Items), 3
. ,
0..1 . , 1,
,
. * , 3
, 3
.
, 3
3
.
( []). 3
. 3
,
.
.
1. 3.
2. 3 .
3. .
4. 3 .
5. .
. 3
;
3 3
103
. .
, . 3
: .
3
. .
, 3
? ,
(Shep) 3
3 (Border Collie), 3
3
(Dog). , .
, , 3
, .
, 3
. 3
3
.
: 3
3
.
UML .
,
instantiate.
3
.
, .
UML .
(single classification)
,
. (multiple classifica3
tion) , 3
.
3
. 3
, .
, .
Person (), 3
Male () Female (), Doctor (3
) Nurse (), Patient ()
(. 5.11).
104
5. :
,
3
.
,
, , 3
. UML 2 3
.
, UML 1 3
. 3
.
: 3
.
, 3
, . 5.11.
.
3
: (Female, Patient, Nurse); (Male, Physiothera6
pist ()); (Female, Patient) (Female, Doctor, Surgeon (3
)). (Patient, Doctor, Nurse) , 3
role ().
: ?
, , 3
. , 3
, .
Surgeon
Doctor
Family
Doctor
Female
role
Person
sex
Male
Nurse
patient
PhysioD
therapist
Patient
. 5.11.
105
(dynamic classification) 3
,
(static classification) .
, 3
.
3
? , 3
. 3
.
UML 3
, .
!
= (association classes) 3
, ,
. 5.12. , Person (3
) (Meeting).
3 ,
; ,
attentiveness ().
Person
2..*
Meeting
*
A
Attendance
attentiveness
. 5.12. E
. 5.13 3
: Attendance ().
, .
Attendance
Person
attentiveness
2..*
Meeting
. 5.13. E
106
5. :
3 3
? 3 3
, 3
3
3. , .
, . 5.14.
. 3
(Company), (Role)
(Contract), (Person), 3
(Skill);
, , .
UML . 3
3
. . 5.14
.
, Role , 3
. 5.13.
Company
Contract
*
Role
description
Person
Skill
Competency
level
. 5.14. E ( Role, ,
E)
3 . :
3 , ,
, , 3
3. , 3
. 5.12, Per6
son:
107
N
class Person
List getAttendances()
List getMeetings()
, Person 3
; ,
(Attendance). ,
, Person (3
) Meeting ()
Attendance ().
, 3
(., , . 5.15). ,
3 3
,
.
Person
Employment
period : dateRange
Company
. 5.15.
,
temporal () (. 5.16). 3
,
.
. , 3
:
class Person ...
Company getEmployer();
//
Company getEmployer(Date);
//
void changeEmployer(Company newEmployer,Date changeDate);
void leaveEmployer (Date changeDate);
temporal UML, 3
. 3, 3
. 3, 3
,
UML. 3
http://martinfowler.com/ap2/timeNarrative.html.
Person
employer
temporal
0..1
Company
. 5.16. temporal
108
5. :
( )
, C++, =
(parameterized class) (template).
( Java C# 3
.)
.
,
Set ().
class Set <T> {
void insert (T newElement);
void remove (T anElement);
3
3:
Set <Employee> employeeSet;
3 UML ,
. 5.17. T
. (
.)
T
Set
insert(T)
remove(T)
. 5.17. E
, Set<Employee>, 3
(derivation). 3
.
C++ (. 5.18). 3
<parameter6name::parameter6
value>. , 3
. (. 5.19)
.
Set <T::Employee>
. 5.18. ( 1)
109
T
Set
insert(T)
remove(T)
bind
<T::Employee>
EmployeeSet
. 5.19. ( 2)
bind ()
. , EmployeeSet (
) Set. 3
EmployeeSet Set.
, 3
.
3
. 3
;
, .
, .
(. 5.20) 3
, 3
.
enumeration.
enumeration
Color
red
white
blue
. 5.20.
110
5. :
(active class) ,
. 3
. ,
, 3
.
. 5.21, UML 1 UML 2 3
. UML 2 3
; UML 1
.
Command
Processor
(UML 1)
Command
Processor
(UML 2)
. 5.21.
(visibility) , 3
. ,
(public) (private) .
, 3
3.
. 3
, public (), private () proE
tected (), 3
. , , 3
, 3
.
UML , 3
. , UML
.
,
. UML 3
: + (public
), 6 (private ), ~ (package ) # (protec3
ted ).
UML, 3
.
111
3
, . UML
3 ,
, 3
.
3
; , 3
.
, , + 6, ,
, .
UML
. , 3
, . 5.22.
calculatePrice
fill
Order
calculatePrice
itemsWaiting
Order Item
*
*
getDiscountedValue
!
*
getPrice (quantity)
getLeadTime
Customer
1
Product
getSpecialPrice
. 5.22.
. 3
, . 3
, 3
, ,
.
, 3
, , ,
.
6
(object diagram)
3 . ,
, 3
.
. ( . 6.1
, . 6.2 .)
,
.
, , . 6.2,
, . 3
: : . 3
, John, :Person aPerson 3
. , 3
. , 3
. 6.2.
, 3
, . ,
3
. =
Party
location
0..1
Person
Organization
. 6.1. , Party
()
113
engineering : Organization
location = "Boston"
tools : Organization
location = "Chicago"
apps : Organization
location = "Saba"
Don : Person
location = "Champaign"
John : Person
location = "Champaign"
. 6.2. Party
(instance specifications) 3
.
, 3
(. 152) .
. 3
, 3
. 3
.
3 33
Books.Ru 3
ISBN 539328630603X,
UML. , 33 3 Books.Ru
3 . 3
, 3
. 3
, 3
3 (piracy@symbol.ru), .
7
3
. ,
, 3
.
(package) ,
UML
.
, ,
, 3
UML.
UML .
, 3
,
,
, .
, .
UML
, Java
C++ .NET.
(namespace), 3
,
. Date, Date
System,
. ,
(fully qualified name), , 3
, . UML 3
, 3
System::Date MartinFowler::Util::Date.
(. 7.1).
115
util
util
Date
util
Date
,
java
util
java::util
Date
Date
java::util::Date
. 7.1.
. 3
, .
3
, .
, ,
.
, Date ( java.util),
. 3
, Rational Rose, 3
.
UML (public) 3
(private).
; 3
. 3
3
;
, 3
UML.
,
,
. , 3
private (),
116
7.
, 3
.
, Facades () [21], 3
.
? 3
,
. 3
: (Common Closure Principle)
(Common Reuse Principle) [30]. 3
, 3
. 3
,
. , 3
, , 3
.
(package diagram) 3
. . 74.
,
3
. , 3
.
UML ,
. 3
,
.
, 3
.
3
, .
(clear flow)
, , 3
. . 7.2 3
,
.
, 3
. 3
, data mapper (3
) . 7.2 3
. 3
117
(domain) (database) 3
Mapper () [19].
, 3
(Acyclic Dependency Principle 3
, [30]). , ,
, , 3
.
, 3
, 3
, (Stable Dependencies Princi3
ple , [30]). . 7.2 3
asset domain ( )
, leasing data mapper (3
). , 3
(Stable Abstractions Principle , [30]).
(. 75).
,
. 7.2. 3
,
(leasing domain). 3
(leasing presentation). ( , 3
leasing
presentation
asset
presentation
UI framework
leasing domain
asset domain
leasing data
mapper
asset data
mapper
database
. 7.2.
118
7.
.) 3
, 3
, . 3
,
global ().
UML , 3
,
. 3
. , ,
.
. 7.2, ,
. : 3
(presentation), (domain),
(data mapper) (database).
: (leasing) (asset).
, 3
, . 7.3.
. 3
presentation
domain
UI framework
!
*
data mapper
database
. 7.3. . 7.2
leasing
asset
119
, 3
. (, 3
.)
3
. , 7.3, 3
UML, 3
.
, ,
,
. 7.4. 3
, (Database Gateway) ,
.
, (Database Gateway) 3
, 3
.
Application
Oracle Gateway
Database
Gateway
SQL Server
Gateway
Test Stub
Gateway
. 7.4. ,
3
. , , 3
(
. 97).
,
(UI) (controls) 3
. ,
, (heaters) (lights).
UI , 3
, . 3
, ,
120
7.
, 3
, . 7.5.
Separated Interface ( ) [19].
Control
interface
OnOff
Button
Check Box
turnOn
turnOff
isOn
isOff
Furnace::Heater
Lighting::Light
. 7.5.
,
3
. 3
. 3
3
. 3
.
(composite structure) (. 155).
, ,
[30].
, 3
.
8
, ,
.
, .
. 8.1 . 3
, 3
. (node) , 3
. . (device)
: , 3
. (execution environment)
, 3
, 3.
(artifacts), 3
; .
(
.exe, , DLL, JAR, )
, , HTML3
. . , 3
.
.
, 3
artifact. 3
, 3
, , 3
, , , .
. ,
3
3. . 8.1 3 3
122
8.
BrowserClient
browser
Rich Client
{OS = Windows}
herculesClient.exe
http/Internet
A
Application Server
JoveGL.exe
{vendor = romanSoft}
{component = General Ledger}
http/LAN
Web server
{OS = Solaris}
{web server = apache}
{number deployed = 3}
EJB Container
Java RMI/
LAN
herculesWeb.war
herculesBase.ear
herculesAR.ear
herculesAP.ear
JDBC
Oracle DBMS
. 8.1.
number deployed ( ), 3
.
. 3
, 3 .
3
. 3
.
,
.
, 3
.
3
.
.
,
. (scenario)
, 3
. , 3
3, 3
(Buy a Product), .
<
. <
. <
<
.
,
. 3
, 3
. ,
, .
, . ,
: . 3
, .
: 3
,
.
.
(actor) ,
. , 3
, .
124
9.
. 3
; , 3
. 3
, .
, 3
, .
. 3
, 3
.
; ,
(role) . , 3
,
.
UML. 3
, UML . UML
, .
, UML, , 3
, .
, 3
.
3
; . . 9.1 3
.
(main success sce3
nario). ,
. =
(extension), 3
.
, 3a, , 6a.
,
. , 3
, ,
.
, 3
. .
3
.
, . 3
, . ,
. , 3
.
125
:
1. .
2. .
3. ,
(, ).
4. 3
.
5. .
6. .
7. .
8. 3
.
:
3. .
.1: ,
.
.2: 3
, 6 .
6a. .
.1:
.
. 9.1.
,
, 3
(main success scenario, MSS), ,
. , 3
, .
, ,
. 3
, .
3
. :
? ?
,
.
, , , , 3
, .
.
UML ,
(includes) .
126
9.
, , , 3
, ,
. , . 9.1 3
.
, ,
.
.
.
3
.
(pre3condition) , 3
,
. , 3
.
(guarantee)
. 3
; 3
.
(trigger) ,
.
3
. , .
, ,
. , ,
, ,
. ; 3
, ,
.
, ,
. 3
, 3
.
, UML ,
,
(. 9.2). , 3
. 3
. 3
.
127
Update
Accounts
Set
Limits
Trading
Manager
Analyze
Risk
include
Price
Deal
include
Accounting
System
Value
Deal
Capture
Deal
Trader
Salesperson
. 9.2.
3
, . 3
, ,
3
. , 3
:
UML include ()
, extend
(). . 3
3
, 3
. 3
;
.
, , 3
,
,
3. 3
3. , 3
, ,
(system use case) 3
128
9.
, = (business use
case) 3 3
.
[10] . 3
.
(sea level)
.
3
. , ,
,
(fish level). , =
(kite3level), , 3
3.
3, 3
. 3
. 3
, . 9.1.
( )
3
; (Ext3
reme Programming)
. , 3
.
3
,
3
. , 3
, .
,
,
. 3
, , 3
3 ,
3
, . 3
, .
.
.
129
.
,
. , 3 3
.
, 3
. UML 3
, 3
.
,
.
, . 3
, , ,
.
, 3 .
[24].
,
3
. UML , 3
,
.
.
[10] 3
.
, 3
, . 3
3 http://usecases.org. [11] 3
3
; http://foruse.com.
10
(state machine diagrams) 3
.
1960 , 33
3
. 3 3
,
.
, ,
3 .
, 3
.
, .
, 3
, ,
. 3
. ,
.
, 3
, .
. 10.1 , 3
. 3
:
Wait ().
(initial pseudostate),
, , .
,
: Wait (), Lock () Open (). 3
,
.
, .
131
Open
[ ] /
Wait
[ ] /
Lock
[ ] /
D
. 10.1.
(transition) 3
. , :
3 []/ (trigger6signature [guard]/acti6
vity). . , 6
, .
, , , 3
, .
.
. 66
. 3
Wait (. 10.1) 3
Wait, , 3
Lock.
.
, . 3
, ,
. 3 ,
. , ,
,
.
, 3
,
Lock (. 10.1) .
, 3
Wait ,
.
(final state) , 3
, .
132
10.
, , ,
,
, 3
.
, 3
, . ,
, 3 33
, , 3
, .
, 3
, , 3
.
; ,
.
, 3
(internal activities),
,
.
. 10.2
, 3
UI.
(self3transition) ,
.
, .
. 10.2 : 3
. , 3
; ,
. 3
;
.
Typing
entry/
exit/
character/
help [verbose]/
help [quiet]/
. 10.2. ,
133
, , 3
, 3 . 3
, .
Searching () . 10.3
(activity state): 3
do/; do=activity ( ).
, , 3
(Display New Hardware).
(cancel), do3
Update Hardware
Window ( ).
Update
Hardware
Window
search
Searching
do/ search for new hardware
cancel
Display New
Hardware
Window
. 10.3.
do3, 3
.
,
, do3
, . 10.3.
3; 3
,
.
UML 1 action (),
activity () do3.
, 3
. 3
(substates), (su3
perstate), . 10.4.
cancel () 3
Enter Connection Details (D ).
134
10.
Show Connections
new
save
cancel
Enter Connection Details
next
Enter Phone
Number
back
Choose Shared
or Solo
next
Enter Name
back
. 10.4.
3
, . . 10.5
, CD,
, .
CD/ / 3
.
, 3
.
.
On
time
Display Current
Time
Display Alarm
Time
Playing Radio
Playing CD
H
Radio
CD
on
off
Off
. 10.5.
alarm
135
3
: switch, State 3
. 3
switch, . 10.6.
public void HandleEvent (PanelEvent anEvent) {
switch (CurrentState) {
case PanelState.Open :
switch (anEvent) {
case PanelEvent.SafeClosed :
CurrentState = PanelState.Wait;
break;
}
break;
case PanelState.Wait :
switch (anEvent) {
case PanelEvent.CandleRemoved :
if (isDoorOpen) {
RevealLock();
CurrentState = PanelState.Lock;
}
break;
}
break;
case PanelState.Lock :
switch (anEvent) {
case PanelEvent.KeyTurned :
if (isCandleIn) {
OpenSafe();
CurrentState = PanelState.Open;
} else {
ReleaseKillerRabbit();
CurrentState = PanelState.Final;
}
break;
}
break;
}
}
}
. 10.6. switch C#
, . 10.1
136
10.
,
. , ,
.
(State pattern) [21] 3
.
. 3
, 3
. , . 10.1,
, . 10.7.
Secret Panel Controller
state 1
changeStateTo (SecretPanelState)
handleCandleRemoved
handleKeyTurned
handleSafeClosed
do nothing
state.handleCandleRemoved
Wait State
if (door open) {
revealLock()
changeStateTo (LockState)
}
handleCandleRemoved
Lock State
handleKeyTurned
Open State
handleSafeClosed
. 10.7. , . 10.1
,
, , .
33
, .
.
, . 10.1 . 10.1.
, 3
, ,
.
,
, , 3
, . 3
,
. , 3
, ,
, .
137
10.1. . 10.1
Wait
Lock
Candle removed
( )
Lock
Open
Key turned
Candle in
( ) ( )
Open safe
( )
Lock
Final
Key turned
Candle out
( ) ( )
Open
Wait
Safe closed
( )
Door open
Reveal lock
( ) ( )
,
, .
3
,
.
3
.
, 3
. 3
. , (3
4)
, ( 11)
3
.
. ,
. , 3
,
. ; 3
.
, 3
.
,
. ,
, 3
, . 3
, UI 3
, 3
.
138
10.
UML [6],
[40] .
3
, ,
[15] , 3
. [30]
.
11
,
, 3 .
3, 3
3 ,
.
UML, ,
UML 2. UML 1 3
3
. , 3
, 3
. UML 2 .
. 11.1 .
(initial node), 3
Receive Order ( ). (fork), 3
.
. 11.1 , Fill Order ( ), Send
Invoice ( ) 3
. , , 3
. ,
, (Delivery), (Receive Pay6
ment); , , ,
. .
. 3
, , ,
. . 3 :
, 3 .
, .
,
, . ,
140
11.
Receive
Order
Fill Order
Send Invoice
[priority order]
[else]
Overnight
Delivery
Regular
Delivery
Receive
Payment
Close
Order
. 11.1.
3
, .
3, 3
. 3
, 3
.
. 3
, . 3
(join) Close Order ( 3
). 3
141
, . 3
, .
UML 1 3
,
. UML 2
.
, 3
(actions), (activities). , 3
,
, .
(decisions) (merges). , UML 1
, 3
. 3
, . 3
,
. [else]
, [else] ,
.
. 11.1 3
. , (Over6
night Delivery);
(Regular Delivery).
(merge) .
,
.
3
. UML 1 , 3
. , 3
, . UML 2 ,
; , 3
, . 3
,
; .
(subactivi3
ties). , . 11.1, 3
(. 11.2), 3
(. 11.3).
.
142
11.
Deliver Order
Regular Delivery
[else]
Order
Order
[Rush Order]
Overnight
Delivery
. 11.2.
Receive
Order
Send Invoice
(Order::sendInvoice)
Fill Order
Deliver
Order
Receive
Payment
Close
Order
. 11.3. . 11.1
. 11.2
143
.
6::6.
, 3
.
, , 3
, . 3
, ,
. 3
,
.
; , 3
, , .
(partitions), 3
, ,
. . 11.4 3
, , 3
.
Fulfillment
()
Customer Service
Finance
( ) ( )
Receive
Order
Send
Invoice
Fill Order
Receive
Payment
Deliver
Order
Close
Order
. 11.4.
144
11.
. 11.4 .
(swim lanes), UML 1. UML 2 3
,
. , 3
,
.
. 11.1
,
. , .
(time signal) . 3
.
. 11.5 , 3
. , 3
. ,
, ,
.
Pack Bags
Leave for Airport
Two hours
before flight
Taxi
Arrives
. 11.5.
, . 11.5,
(Two hours before flight), .
, , .
(Taxi Arrives) ,
(Pack Bags), , .
, . ,
, ,
. . 11.6 3
, . ,
145
48
. 11.6.
: , 3
, .
,
. ,
,
.
, 3
UML, , , ,
(tokens), .
, 3
,
. , 3
. ,
3
, , 3
.
,
.
.
UML 2 (flow)
(edge) . 3
.
, ,
.
146
11.
3
(connectors), 3
. :
,
.
, .
,
. ;
.
, 3
. (pins) 3
, , 3
.
, . 11.7, . 3
, , 3
. .
. 11.7.
, , . 3
,
(pins).
, 3
.
, 3
3
. , 3
(transformation) (. 11.8) 3
.
147
transformation
appointment.cancellationNotice
transformation
appointment.patient
. 11.8.
, : ,
,
.
.
, ,
. 3
3 , 3
.
,
.
, UML 1 3
,
.
3
, 3
. , 3
. (expan3
sion region) ,
.
. 11.9 Choose Topics ( ) 3
.
Write Article ( ).
Review Article ( )
, 3
. 3
, 3
, Publish News6
letter ( ).
148
11.
Choose Topics
concurrent
Write Article
Review Article
Publish
Newsletter
. 11.9.
3
.
, ; 3
.
. 11.9 , 3
concurrent. 3
. 3
.
,
, , . 11.10.
, 3
. 3
, UML 1.
Choose
Topics
Prepare
Article
Publish
Newsletter
. 11.10.
, 3
, ,
. (flow final) 3
.
. 11.11 . 11.9, 3
. ,
. 3
149
, .
3
, .
Choose Topics
concurrent
Write Article
Review Article
[]
[]
Publish
Newsletter
. 11.11.
,
. (,
, ,
.) , 3
, ,
.
(join specification) ,
. ,
, , 3
, . . 11.12, 3
, (Select Drink) 3
(Insert Coin), . 3
,
. , , ,
,
.
150
11.
Select Drink
A
Dispense
Drink
Insert Coin
B
{joinSpec = A B
>= }
. 11.12.
, 3
. UML,
. ,
,
.
, 3
.
UML, 3
3
.
. ,
3
, .
,
3
. 3
.
UML 2 , .
3
UML 3.
3, UML,
. , , 3
, 3
.
,
,
. , ,
151
,
.
3
UML . 3
3
.
, 3
. ,
.
, .
3
, UML 2 , 3
, 3
. , 3 .
. (
) Petri Nets,
3 http://www.daimi.au.dk/PetriNets/.
12
(communication diagrams) 3
, 3
.
, ,
, 3
,
, , 3
.
UML 1.x (col3
laboration diagrams). , ,
, .
( (. 161); 3
.)
. 12.1 3
, . 4.2. 3
,
.
,
, ,
. local (3
) Order () Product () 3
, para6
meter () global (). 3
UML 1, UML 2. , 3
, .
. 12.1 ,
UML . UML 3
, 3
. 12.2.
153
1: calculatePrice
!
*
7: getDiscountInfo
5: calculateBasePrice ()
6: calculateDiscounts()
an Order
a Customer
4: getPricingDetails
2: getQuantity()
3: getProduct ()
local
an Order Line
a Product
. 12.1.
1: calculatePrice
1.5.1: getDiscountInfo
1.4: calculateBasePrice ()
1.5: calculateDiscounts()
an Order
a Customer
1.3: getPricingDetails
1.1: getQuantity()
1.2: getProduct ()
an Order Line
a Product
. 12.2.
, 3
. . 4.2 3
, getDiscountInfo calculateDiscount.
, . 12.1,
, getDiscountInfo
calculateDiscount calculatePrice. 3
.
,
.
154
12.
, , 3
, ,
1.1.1.2.1.1.
.
. 3
. , A5 B2 3
; 1a1 1b1 3
, 1. , 3
, 3
, .
3
.
(. 86),
. 3
, create
delete .
, ,
, ,
. 3
: .
. , 3
, 3, 3
, , .
, 3
,
, ,
. ,
, 3
, 3
CRC3.
13
UML 2 3
. 3
.
. 13.1 TV Viewer () 3
, (. 96).
: 3 3
.
TV control UI
TV control API
TV Viewer
TV Viewer
display
tuning
picture stream
TV control UI
TV control API
tuning
display
picture stream
. 13.1. TV Viewer
. 13.2 , , 3
.
: ,
.
, ,
.
.
. 13.2 , TV Viewer 3
(Generator) (controls).
156
13.
TV control UI
TV Viewer
controls :
TVPresenter
display
:Generator [1]
TV control API
tuning
picture stream
. 13.2. (,
)
, ,
, . , 3
, , , 3
. ,
,
, 3 (. 98).
(. 13.3). 3
3
display
TV control UI
windowing
tuning
TV Viewer
tuner
picture stream
API
TV control API
. 13.3.
157
, 3
.
UML 2, 3
. 3
3
, , 3
.
, 3
; ,
.
UML 2,
3
; UML , 3
.
14
3 , 3
. 3
,
UML, , .
UML 1 (. 14.1). UML 2
, 3
. compo6
nent ().
Widget
Widget
UML 1
UML 2
. 14.1.
. 3
, 33
(. 98)
.
.
. 14.2 .
Till () 3
Sales Server ( ) sales message
( ). ,
Message Queue ( ) ,
, ,
, .
, .
159
Till
Sales Server
sales
message
Transaction
Processor
Accounting
Driver
Message Queue
Accounting
System
. 14.2.
,
.
: Transaction Processor ( 3
) , Accounting Driver (
) Accounting System ( ).
, 3
. 3
, :
.
.
.
,
, <
. , ,
, , <
. ,
. <
. : .
(Ralph Johnson),
http://www.c2.com/cgi/wiki?DoComponentsExist
, ,
.
3
, . 3
[23]. ,
160
14.
3
,
, 3
; DLL.
UML
, DLL. ;
(artifacts) (. 121).
, 3
3
.
15
, 3
UML 2. UML 3
,
UML 1 .
, .
. (Auc6
tion) (seller), (buyer), 3
(lot) 3 (offer).
(. 15.1) , 3
, (. 15.2).
Auction
buyer
offer
seller
1
1
lot
. 15.1.
162
15.
/seller
b1/ buyer
b2/ buyer
. 15.2.
. 15.1 . 3
, ,
. 3, 3
, (roles), 3
, 3
.
3 ,
.
, 3
.
: 6 / 6 : 6. , 3
.
,
, . 15.3, 3
. , 3
, , ,
.
UML , 3
, 3 .
(Erich Gamma) 3
(. 15.4). 3
, :.
163
Bid
Offer
(
)
*
buyer
1
seller
Party
House
lot
buyer, seller
Auction
. 15.3.
Composite: Component
Test
tests
run(TestResult)
Command
Pluggable Selector
Template Method
TestCase
name
run(TestResult)
runTest()
setUp()
tearDown()
TestSuite
run(TestResult)
Composite
!
*
Composite: Leaf
. 15.4. JUnit (junit.org)
UML 1, ,
. 3
, 3
. ,
3 .
16
3
.
, 3
,
,
.
.
. 16.1 ;
,
. 3
.
, XML, , 3
. 3
.
;
, .
UML 2, , 3
. 3
, , , 3
. 3
, .
165
[ ]
sd
[ ]
sd
:Customer
:Customer
:XMLParser
:Database
load
parse
getName
getOrders
new
:Order
Summary
ref
. 16.1.
new
:Order
Summary
17
3
, 3. 3
, , UML
3
. 3
, , 3
UML, .
UML, .
3
, :
, , , .
,
(Pump) (Hotplate) (coffee
pot). , , 3
10 .
(waterEmpty), ,
15 .
. 17.1 17.2
. ,
. 17.1
, . 17.2 3
, 3
. ,
. 17.1, , , , 3
. 17.2, ,
.
, 3
{>10s}, . ,
, , 3
.
167
Pump
Hotplate
waterEmpty
On
On
Off
Off
{<15m}
{>10s}
. 17.1. ,
Pump
Hotplate
waterEmpty
Off
Off
On
Off
Off
On
{<15m}
{>10s}
. 17.2. ,
3
. ,
.
A
UML
, UML
1.0.
UML , OMG .
UML .
UML
1.0 ,
. UML 3
, , 3
.
UML
UML
0.8, OOPSLA,
1995 . 3
. . ( .
Rational). 1996 Rational
0.9 0.91,
. 3
UML.
1997 Rational 3
3
OMG 1.0 UML. Rational
1997
1.1. 1997 3
OMG. 3
OMG UML 3
1.0. ,
UML: 1.0 OMG 1.1 Rational,
1.0 Rational. 3
1.1.
UML
169
UML. 1.1
1998 , 1.3 1999, 1.4 2001 1.5 2002. 3
1.x
UML, 1.3,
, .
UML 1 , UML
UML 2. RFP (Request for Proposals
) 2000, UML 2 3
2003 .
UML . 3
UML
(http://umlEforum.com). ,
(http://martinfowler.com).
UML ,
UML. .
.
3
,
, 3
UML.
UML 1.0. 3
. 1.1.
UML 1.2; 3
UML 1.3 .
, UML 1.0, 3
.
3
UML 1.3. , UML 1.4,
.
UML 2 (. . A.1).
3
UML, 1.0 1.1,
1.2 1.3. 1.x 2.0.
, , 3
UML.
UML, .
, 3
UML UML
. ,
3
170
. 3
UML,
. ( ,
.)
3
. , .
A.1. UML.
UML.
UML
13
UML 1.01.3
23
UML 1.31.4
33
UML 2.0
UML
171
, 3
. ( , ,
3
.
, 3
, .)
UML. , 3
{complete} () ,
3
. UML 1.1
{complete}, ,
.
.
, . 3
,
, 3
. 3
{mandatory} ().
UML 1.0 ,
(immutable) (frozen), 3
, .
.
UML {frozen} () 3
.
,
.
frozen,
, .
UML 1.0 ( ) 3
(. ). , 3
, 3
. UML 1.1
, , 3
. ( 3
172
[16] ,
.) 3
enoughStock :=check().
Role
UML 1.0 (role) 3
(. ).
UML 1.1 =
(association role).
(collaboration role), , 3
. UML 1.1
, ,
.
. UML 1.1 3
: uses ()
extends (), 3
. UML 1.3 :
includes () 3
. ,
. 3
, 3
.
.
(ATM), Withdraw Money (3
) Make Transfer ( ) 3
Validate Customer ( ). 3
uses.
(generalization) , 3
. ,
(
) ,
. 3
, . ( 3
, 3
.) ,
, 3
.
extends () 3
.
UML
173
. 3
. 3
. ,
3
3
.
, 3
.
. 3
uses , 1.3
includes, in6
cludes uses. 3
extends 1.1 3
, extends 1.3,
3
1.3. , ex6
tends 1.3 :
extends (generalization).
3
UML, 3
. 3
3
, .
1.2 UML 3
. 3
1.3 ,
UML.
3
(merge), 3
(branch). ,
, 3
,
.
=
( ), (
). 3
. 3
,
. , 3
,
, 3
174
. , 3
, ( 3
) .
,
.
. ,
.
.
3
*
. 3
; , 3
3 . 3
3
, .
3 3
, , 3
. 3
RTF.
UML ( 1.4)
.
UML
175
: ( 3)
.
, [2, 4], .
frozen () .
, 3
UML 2. parameter (3
) local () .
( 4)
,
,
176
, . 3
3
, , . 3
3
. 3
;
(participants). , UML 1
, UML 2 .
: ( 5)
. 3
, 3
.
3
. , 3
. 3
. 3
.
3
.
( 10)
UML 1 3
. UML 2 ,
do3
(do3activity).
( 11)
UML 1
. UML 2 , 3
, 3
3
.
, .
, , , 3
, , , 3
, .
, , UML 1 3
,
, UML 2 , 3
.
.
3
.
1. Scott Ambler, Agile Modeling, Wiley, 2002.
2. Kent Beck, Extreme Programming Explained: Embrace Change, Addi3
son3Wesley, 2000.
3. Kent Beck and Martin Fowler, Planning Extreme Programming, Addi3
son3Wesley, 2000.
4. Kent Beck and Ward Cunningham, A Laboratory for Teaching Object3
Oriented Thinking, Proceedings of OOPSLA 89, 24 (10): 16. http://
c2.com/doc/oopsla89/paper.html
5. Grady Booch, ObjectEOriented Analysis and Design with Applications,
Second Edition. Addison3Wesley, 1994.
6. Grady Booch, Jim Rumbaugh, and Ivar Jacobson, UML User Guide,
Addison3Wesley, 1999.
7. Peter Coad and Edward Yourdon, ObjectEOriented Analysis, Yourdon
Press, 1991.
8. Peter Coad and Edward Yourdon, ObjectEOriented Design, Yourdon
Press, 1991.
9. Alistair Cockburn, Agile Software Development, Addison3Wesley,
2001.
10. Alistair Cockburn, Writing Effective Use Cases, Addison3Wesley,
2001.
11. Larry Constantine and Lucy Lockwood, Software for Use, Addison3
Wesley, 2000.
12. Steve Cook and John Daniels, Designing Object Systems: ObjectEOriE
ented Modeling with Syntropy, Prentice3Hall, 1994.
13. Deepak Alur, John Crupi, and Dan Malks, Core J2EE Patterns, Pren3
tice3Hall, 2001.
14. Ward Cunningham, EPISODES: A Pattern Language of Competitive
Development. In Pattern Languages of Program Design 2, Vlissides,
Coplien, and Kerth, Addison3Wesley, 1996, pp. 371388.
15. Bruce Powel Douglass, RealETime UML, Addison3Wesley, 1999.
178
: . .
. : 3, 2002.
179
PIM, ,
, 31
PSM, ,
), 31
CASE3 (
), 29
UML, 35
CORBA,
, 27
CRC3 (33
), 89
do3, 133
DSDM, 3
, 51
Scrum, , 51
Smalltalk, , 32
F
FDD, ,
, 51
M
MDA, ,
31
M,
UML, 34
O
OMG,
MDA,
, 31
UML, 35
UML, 27
P
Petri Nets,
, 151
RUP,
Rational
, 53
U
UML
, 34, 35
, 27
, 43
, 30
, 41
UML
, 29
UML
, 33
, 33
UML , 33
, 28
, 28
UML
MDA,
, 31
UML , 30,
32
, 32
, 30
, 30
UML,
UML, 39
, 41
UML. , 3
UML, 170
UP, , 52
X
XP,
, 61
, 51
,
, 96
, 110
, 56
, , 64
, 68
, 171
, 68
, 93
, 55
, , CRC3, 91
, , UML, 34
, 47
,
, 132
, 38
, 166
, 126
, 68
, 139
UML, 38
CRC3, 89
181
,
80
, 164
, 164
, 88
, 85
, 38
, 167
, 166
, 38
, 56
, 141
, 150
, ,
147
, 139
UML, 176
, Petri Nets, 151
, 143
, 151
, 144
, 38
, 96
, 94
, 110
, 110
, 57
, 74
, 113
3
, 103
3, 105
, 92
, 77
, 72
3, 100
3, 100
, 93
UML, 176
, 76
, 79
, 62
3
, 93
(3
), 108
, 38
, 38, 158
, 160
182
, 158
, 38
, 132
, 130
UML, 176
, 134
, 133
, 133
, 161
, 41
, 38
, 38
, 112, 113
, 38
, 38
, 57
, 120
, 114
, 120
, 38
CRC3, 89
, 171
, 80
, 89
, 80
UML, 175
, 43
, 88
, 85
, 38
, 56
, 126
, 38
, 57
, 122
, 43
, 121
, 38
, 157
, 155
, 130
, 137
, 135
, 138
, UML, 175
, 30
, 58
UML, 172
, 116
, 110
, 72
, 110
, 78
, .
UML, 31
, 46
, 101
,
103
, 102
, 170
, 92
, 96
, 93
, 171
33
(CRC3), 89
, 62
, 108
, 79
, , 170
, 171
/, 74
, ,
92
, (Cockburn, Alister),
, 129
, 38
, 154
, 94
UML, 171
, 163
, 145
, (Mellorn, Steve)
UML, 31
, , 36
, 170
,
(PSM), 31
, 71
, 98
3, 98
, 147
, 62
, 104
,
UML
, 33
, 28
, 30
, 74
3, 100
/, 171
, 76
, (Odell, Jim),
UML, 34
, 171
, 68
, 3
, 27
, 147
UML, 175
, 110
UML
0.8 2.0, , 168
1.0 1.1, 170
1.2 1.3, 172
1.3 1.4, 174
1.4 1.5, 175
1.x 2.0, 175
, 96
, 118
183
, 116
,
114
, 114
, 134
Separated Interface,
, 120
, 162
, 136
, 131
, 136
, 109
,
, 50
, UML
, 33
, 33
, 32
, 73
, 114
, 145
Petri Nets, 151
, 148
, 128
UML, 172
, 129
, 128
, 128
, 128
, 128
,
117
, 117
,
117
, 49
, 57
, 114
, 45
DSDM,
, 51
FDD, ,
, 51
, 46
, 60
, 46
,
53, 55
184
, 61
, 51
Rational (RUP), 52
(XP), 51, 61
,
UML
, 29
, 33
, 28
, 30
, 135
, 101, 170
, 171
, 36
, , 143
, .
3 (Rebecca Wirfs3
Brock), UML, 34
, 141
, 138
, 121
, 60
Rational
(RUP)
, 53
(UML), 27
, 85
, 141
, 39
, 79
, 62
frozen, 100
read3only, 100
, , 68
,
, 171
, 101
, 62
, 128
/, 74
, 144
, 51
, 61
, 101
, 101
, 79
, 111
, 111
, 88
, 133
, 46
, 93
, 93
, 133
, 116
3 , 98
, 46
,
. XP
, 61
, 51
, UML , 33
Eiffel, 78
Smalltalk, 32
UML , 30
MDA,
, 31
, 32
3 33
Books.Ru 3
ISBN 539328630603X,
UML. , 33 3 Books.Ru
3 . 3
, 3
. 3
, 3
3 (piracy@symbol.ru), .