280 78 752KB
Russian Pages [64]
. .
, . .
, . .
CASE-
«
» :
. . . . . .
.
. . . . . . . . . .
2006
. .
, . .
, . .
CASE-
2006
Ⱦ.ȼ. Ⱥɥɟɤɫɚɧɞɪɨɜ, ɂ.ȼ. Ƚɪɚɱɟɜ, Ⱦ.ɇ. Ɏɚɞɢɧ
CASE-ɌȿɏɇɈɅɈȽɂɂ
ɍɱɟɛɧɨɟ ɩɨɫɨɛɢɟ
ȼɥɚɞɢɦɢɪ 2006
004.41 (075.8) 32.988-5 73 46 : , . . ,
,
. . . -
в, . . CASE: . / . . , . . , . . ; . . - .– . . - , 2006. – 64 . – ISBN 5-89368-688-8
46 -
:
RUP (Rational Unified Rational Rose (Rational Software Corporation), ArcStyler Tool Suite (iO-Software). , UML 2 . 230201 –
Process) CASEEnterprise Architect (Sparx Systems)
«CASE-
»,
230200 – « «
» » 051301 – (
-
«
», ,
) «
»
«
-
». , . 3.
. 24.
. .: 11
.
004.41 (075.8) 32.988-5 73 ISBN 5-89368-688-8
© , 2006
………………………………………………………...
5
UML ..…………………………………….
7
1.1.
UML ………………………
7
1.2.
UML ………..
11
1.3.
…………………………………….
13
…
15
…………………………………………..
16
………………………………………….
19
1.
1.3.1. 1.3.2.
1.4. 1.5.
……………………………. 21
1.6.
1.7.
………………………………..
25
1.6.1.
…………………...
25
1.6.2.
…………………………..
29
1.6.3.
………………
29
……………………………………….
31
RUP ……………………………………..
33
……
35
2.
2.1.
3
2.2.
…....
38
2.2.1.
………...
38
2.2.2.
……………………………..
41
2.2.3.
……………………………………
42
2.2.4.
………………………
43
......
47
…………………………………………………………
52
………………………………….
59
3. -
4
CASE(
),
(Computer Aided Software Engineering) ,
, . CASE, ,
, ,
,
,
, -
, ,
. CASE[1]. CASE,
,
5
,
. -
Rational Unified Process UML 2. -
–
-
.
,
-
. CASE-
6
.
Ƚɥɚɜɚ 1. ɈɋɇɈȼɕ əɁɕɄȺ UML 1.1. ɇɚɡɧɚɱɟɧɢɟ ɢ ɫɬɪɭɤɬɭɪɚ ɹɡɵɤɚ UML UML ,
,
, ,
-
. , . UML
, -
,
. , . UML
-
-
-
. , . –
, , .
,
. 7
.
, .
(
)
,
(views), -
. ,
. -
, . –
-
. . (
), .
-
. -
, . UML •
, UML.
: -
, •
UML. UML. UML.
8
UML UML.
-
UML .
-
, . :
.
-
,
, ,
,
,
.
,
, ,
,
, . ,
UML :
•
•
,
, , -
. UML
.
•
,
.
• .
, , –
. 9
UML 2
(
. 1.
. 1).
UML
, UML.
-
, . ,
.
,
UML. – , .
,
–
, .
10
-
1.2. Ɉɫɨɛɟɧɧɨɫɬɢ ɢɡɨɛɪɚɠɟɧɢɹ ɞɢɚɝɪɚɦɦ ɹɡɵɤɚ UML -
, ,
.
,
, ,
,
(
,
-
)
.
UML
-
: 1.
,
.
.
, . ( ). 2.
. , -
. , -
UML. , UML. , , . 3.
, ,
-
. ,
. ,
UML
, .
, . 11
.
,
-
, .
,
,
,
-
–
,
, . 4.
. .
-
,
UML, . .
-
– UML . :
•
.
,
– .
•
-
. .
• •
. . .
.
•
, , 12
.
,
. -
– , .
•
.
),
, (
, .
•
.
. , ,
.
. ,
UML. ,
, UML.
,
-
. UML . ,
UML. -
,
.
1.3. Ⱦɢɚɝɪɚɦɦɚ ɩɪɟɰɟɞɟɧɬɨɜ UML
-
, . (use case diagram),
13
,
, , . 2).
(
-
. : 1. . . 2. Э
2. .
3. . 4.
. , , . ,
-
, . ,
,
, -
,
-
, (
.
. 2). ,
.
-
, ,
. , (
.
. 2).
, ,
,
,
. ,
. 14
,
-
, .
.3
.
. 3.
я
1.3.1.
,
,
,
-
, . . ,
,
. ,
,
. (include)
, ,
,
( . 3).
(extend)
.
, 15
,
,
, -
, , . UML ».
« «
«
» .
-
.
. -
, »
, ,
–
.
1.3.2. . ,
. –
– ,
20,
-
50. ,
. . ,
-
. . .
, .
16
-
. ,
–
,
, ,
-
. ,
-
,
, .
,
-
, . .
,
, , ,
-
. ,
, -
. ,
-
, . .
-
. . . -
, . , .
UML ,
. 17
, ,
-
,
. ,
–
-
,
. -
. , .
,
-
, .
, .
, ,
.
, , . .,
, .
, .
-
, ,
,
. , . .
,
-
. .
, . -
, , , . 18
, -
1.4. Ⱦɢɚɝɪɚɦɦɚ ɤɥɚɫɫɨɜ (class diagram)
, -
. , ,
, . :
• •
( (
);
). ,
-
, (
. 4).
.5
.
. , ,
, , ,
. 4. Э
, . ,
.
-
: 1–
,
,
;
*–
;
0..1 –
,
-
; 0..N –
0
N
. 19
, ,
, (
.
. 5).
Ɂɚɤɚɡ
Д
Ʉɥɢɟɧɬ *
: string : USD
1
()
():
() 1
{ =="
.
.
", . }
Ʉɨɪɩɨɪɚɬɢɜɧɵɣ ɤɥɢɟɧɬ
ɂɧɞɢɜɢɞɭɚɥɶɧɵɣ ɤɥɢɟɧɬ
{
()
* ɋɬɪɨɤɚ ɡɚɤɚɡɚ
"}
* ɋɨɬɪɭɞɧɢɤ
0..1
: Int
*
: USD
У
() =="
(int)
1
: Bool
Ɍɨɜɚɪ
. 5.
,
-
, ,
. ,
.
,
, ,
. ,
. :< .5
UML >< >:
=< :« », «
, 20
>. », « ,
UML
»
. . :
< • • • •
>< >(< >(
):< >),
,
:
– (public), «#» – (private); – ; – , ,
: «+» – (protected) «-» –
,
-
; –
-
;
•
–
,
-
. , : ,
? .
,
-
, -
, . . . , ,
–
-
. ,
-
.
1.5. Ⱦɢɚɝɪɚɦɦɚ ɜɢɞɨɜ ɞɟɹɬɟɥɶɧɨɫɬɢ (activity diagram) , 21
, ( У
. 6).
Д
У
/
. 6.
,
(Action).
-
, . . , . .
,
UML ,
, (
,
-
). ,
(Pin), .
-
–
,
. . (Activity) – . UML, (CallAction). (ActivityParameterNode)
-
22
.
, ,
,
–
. .
-
,
. (ActivityPartition) . . .
,
,
-
. . .7
«
», «
. »
-
«
, »
.
ad Ɉɛɪɚɛɨɬɚɬɶ ɡɚɤɚɡ
EA 5.1 Unregistered Trial Version EA 5.1 [Unregistered] Trial Version Д
EA 5.1 Unregistered Trial Version [ ]
EA 5.1 Unregistered Trial Version
EA 5.1 Unregistered Trial Version
-
«external»
EA 5.1 Unregistered Trial Version
EA 5.1 Unregistered Trial Version
. 7.
,
.
, ,
. 23
, . . ( . 6). . . , . . , . : –
.
, ,
. ; –
(
, -
). .
.
,
, . (DecisionNode) . .
-
, -
. . [ 24
], ,
, -
.
(MergeNode)
.
-
,
.
(ForkNode)
(JoinNode).
.
(ActivityFinalNode) ( ),
,
, ,
-
. (FlowFinalNode)
-
, . ,
.
1.6. Ⱦɢɚɝɪɚɦɦɵ ɜɡɚɢɦɨɞɟɣɫɬɜɢɹ (interaction diagrams)
-
, . UML ,
: -
, (
).
, ,
.
1.6.1. (sequence diagram) ,
, , (
,
-
. 8). 25
. .9 , :
-
, –
. (Object) –
,
-
,
. 8. Э
, .
, -
, (
Order
Invoice
. 9).
sd Ɂɚɤɚɡɚɬɶ ɫɤɨɧɮɢɝɭɪɢɪɨɜɚɧɧɵɣ ɤɨɦɩɶɸɬɟɪ
PurchaseController
ShopBasketController
У
createOrder(customer, shipAddress)
Order items:= getItems() setItems(items)
opt
[makeInvoice == true] makeInvoice invoice:= setInvoice(invoice)
Invoice
. 9.
, (Lifeline)
.
, .
26
-
, ,
. ,
,
-
. . , . , ,
,
-
. ,
, -
: *[
-
, ,
,
. ].
: – –
; ,
;
– –
; ,
,
-
, . ,
-
. (InteractionFragment), . (InteractionUse) , . «ref»,
. 27
– . • • •
alt –
(CombinedFragment) , . UML : ,
-
; opt –
;
break –
-
, • loop – •
-
; ,
-
; par –
;
•
strict – • seq –
; ,
-
, ; . .; • critical –
,
.
, , .9 opt,
,
-
. (StateInvariant)
.
, .
-
. 12, , 28
, .
. .
1.6.2. (communication diagram) ,
,
. ,
-
. ,
.
. 10
.
. 10.
, ё
UML ,
.
-
, ,
1.6.3.
. я
я (interaction overview diagram)
, . ,
, 29
(
. 11,
–
. 12).
sd ref
ɇɚɡɜɚɧɢɟ
Д
:
alt
. 11. Э
;
opt -
par ;
loop
.
е
С
ц
OrderTracking- Order Controller
ReturnPaymentController
C В
"
е
{Order.status != SHIPPED}
"
cancelOrder(orderNumber) setStatus(CANCELLED) [Order.payment != null]: notify
. 12.
. 30
, ,
.
1.7. Ⱦɢɚɝɪɚɦɦɚ ɫɨɫɬɨɹɧɢɣ (state machine diagram) ,
, . 13
. . .
]
[
. 13.
–
,
,
UML. UML
. (
. 14). 31
(State)
,
-
. State ,
. :
•
–
, .
;
•
–
, ;
•
,
–
-
,
.
State
,
-
«/» . (Transition)
-
. , :
-
:[
]/
. (Event) –
. 14. Э
,
-
. . (Start) –
, .
–
-
, (
),
-
. (Stop) –
, .
, .
32
Ƚɥɚɜɚ 2. ɉɊɈȿɄɌɂɊɈȼȺɇɂȿ ɋɂɋɌȿɆɕ ɉɈ ɌȿɏɇɈɅɈȽɂɂ RUP*
UML . 1990.
-
,
) Rational Unified -
( Process** (RUP), .
RUP
:
1.
. ,
, . . , ,
,
.
.
2.
,
-
. -
-
. . –––––––– * . .
, .
** (
Rational, (RUP)
.).
IBM, -
.
33
3. .
RUP , . RUP . Internet. . .
Web, . -
. . , .
. .
-
, .
-
, ,
, . .
RUP
-
, : 1) 2) 3) 4) 5) 6) 7) 8) 9) 34
; ; ; ; ; ; ; ; .
: . RUP,
, .
2.1. Ɍɟɯɧɨɥɨɝɢɱɟɫɤɢɣ ɩɪɨɰɟɫɫ ɭɩɪɚɜɥɟɧɢɹ ɬɪɟɛɨɜɚɧɢɹɦɢ . . я –
,
-
. .
-
, . . 1. 1
1. WebInternet-
.
-
2.
Display Standard Configuration ( )
Customer
Build Computer Configuration ( )
-
, ,
Customer ( )
, .
35
.1
3. Internet
-
, , . .
-
,
Customer, Salesperson ( )
Configured ), Request Salesperson Contact ( )
Customer
Order Configured Computer, Verify and Accept Customer Payment ( )
4.
-
,
,
-
( )
Order Computer (
5. ,
-
, 6. ,
, ,
,
Internet 7.
-
Salesperson, Inform Warehouse Warehouse About Order ( ( ) )
Order Configured Salesperson, Computer, Update Order Customer Status ( ) Salesperson, Warehouse
Print Invoice ( )
я .
, , (
.
-
. 1). ; , . 15.
. я , , 36
,
:
1) 2) 3) 4) – –
; ; ,
; ,
:
; ;
5)
, -
ud Online Computer Shop Display Standard Configuration
Order Configured Computer
Build Computer Configuration
. -
.
,
-
«extend»
Verify and Accept Customer Payment
Request Salesperson Contact
Customer
Update Order Status
Print Invoice
Inform Warehouse about Order
Warehouse
Salesperson
. 15.
. – ,
-
. , . . (
,
Rational RequisitePro). 37
2.2. Ɍɟɯɧɨɥɨɝɢɱɟɫɤɢɣ ɩɪɨɰɟɫɫ ɚɧɚɥɢɡɚ ɢ ɩɪɨɟɤɬɢɪɨɜɚɧɢɹ -
, ,
. , .
, . , ,
-
– –
.
2.2.1.
,
. Order Configured Computer ) -
ad Order Configured Computer
Get Order Request
Display Current Configuration
( Display Purchase Form [incomplete]
.
Get Purchase Details [ok]
Email Order Details
-
Store Order
( . 2
. 16) . -
,
. 16.
,
, .
38
,
-
, (
, ). 2
1.
-
Continue ( ) 2.
Display Current Configuration ); Get Order Request ( )
(
,
: ,
Display Purchase Form ( )
-
Get Purchase Details (
-
Store Order (
-
Email Order Details (
-
. 3. )
Purchase ( )
4. ) 5.
-
) 6. (
Purchase )
, . -
7. ),
Reset ( .
-
Get Purchase Details; Display Purchase Form
Display Purchase Form
39
.
.1 (
-
, . 3).
3 1.
Web-
Internet-
.
2. ,
.
, ,
Customer ( ); Computer ( ); StandardConfiguration ( ); Product ( ) Customer; ConfiguredComputer ( ); ConfigurationItem ( )
3. Internet
,
,
. .
Customer; ConfiguredCompuOrder ( ); Salesperson )
,
ter; (
-
Customer; Order; Shipment ( ); Invoice ( ); Payment ( )
4. ,
, (
) 5. ,
Customer; Order; Salesperson; ConfiguredComputer; ConfigurationItem
,
6.
,
, -
, ,
(
Customer; Order; OrderStatus )
Internet 7.
40
-
-
Shipment; Invoice
. . 17.
cd Logical Model Customer + + + +
name: String address: String phone: String email: String
Product Invoice + number: long + date: Date + total: float
0..*
+ + +
number: String name: String description: String
+
getPrice() : float
0..1
1
Order + + + + + +
number: long date: Date shipAddress: String status: int salesPerson: String total: float
Computer 0..*
1..*
+
1..*
getPrice() : float
ConfigurationItem + kind:
String - price: float + getPrice()
: float
1
Configured Computer
Payment + + +
method: String date: Date amountReceived: float
Standard Computer
. 17.
2.2.2.
, (
)
. 41
,
,
-
; . , , ( (
.
. 12). -
.
. 9).
я
2.2.3.
«
» «
. »
-
.
,
, ,
. , «
»
. – .
,
,
.
,
(
)
,
-
. . . 18.
2.2.4.
: 42
Order
1. 2. 3. 4. 5.
; ; ; ; . sm Order
Pending
EA 5.1 Unregistered TrialBack Version Order
New Order
stock not available
EA 5.1 Unregistered Trial Version stock available [ship date stock available [ship date in future] future]Version EA 5.1 UnregisteredinTrial
Future Order
EA 5.1 Unregistered Trial Version EA 5.1 Unregistered Trial Version
[cancelled]
Cancelled
stock available [ship date now]
[cancelled]
Ready to Ship
ship [accepted]
Filled
. 18.
Order
1. ,
,–
.
-
. ,
.
.
, . 19
,
43
. ,
,
, Web-
. pd Use Case Model Products
Possible Configurations
+ Display Standard Configuration
+ Build Computer Configuration
Purchase + Order Configured Computer + Request Salesperson Contact
Delivery
Payment
+ Inform Warehouse about Order + Update Order Status
+ Print Invoice + Verify and Accept Customer Payment
. 19.
2. . «
»
–«
,
»
, . . 20).
(
-
3. .
–
. WebWeb44
– Web-
– .
,
, .
Web, -
-
,
/
.
,
/ Web-
. Web-
, – (
, WebWeb-
Web-
– . -
, ,
,
, Web-
)
-
, .
, ProductList (
)
. .
cd Logical Model «boundary» Configuration GUI
«control» Configure Process
«boundary» Order GUI
«control» Order Placement
«entity» Customers «entity» Orders
«entity» Computers
«db interface» CRUD
«db interface» Schema
«db interface» Connection
. 20.
(
. 21). 45
,
, . 4.
id Component Model ProductList
-
ProductDisplay
Internet-
Configuration
Web,
-
Purchase
/
. -
,
OrderTracking
Web. 21.
.
. 22 .
-
. 5.
-
. 22.
,
. .
46
Ƚɥɚɜɚ 3. ɊȺɁɊȺȻɈɌɄȺ ɋɂɋɌȿɆ ɇȺ ɈɋɇɈȼȿ ɆɈȾȿɅɖɇɈ-ɈɊɂȿɇɌɂɊɈȼȺɇɇɈɃ ȺɊɏɂɌȿɄɌɍɊɕ -
(
(Model Driven Architecture, – ) Object Management Group (OMG), 2000 . (Object Management Architecture), CORBA. , ) , ( , ). : . . , . – , . , . , ( ). , . , , 47
, .
«
-
» , .
Unix-, Windows-
,
( CORBA, J2EE
) «
, -
Microsoft.NET.
»
-
, . -
(
, (
Account -
balance: Float number: Integer . 23.
) computation-independent, CIM). (platform-independent model, PIM), . , , -
-
PSMPSM-
).
,
, (platform-specific models, PIM, . 24 –
. 23
-
, J2EE. -
: 1)
PIMPSM-
-
, , . .;
2)
;
-
, ( ), ;
48
,
3) , (
PIM-
-
glue logic). java.io.Serializable
AccountPK + accountID: int + AccountPK(int) + equals(Object) : boolean + hashCode() : int «EJBPrimaryKey»
javax.ejb.EntityBean
EA 5.1 Unregistered Trial Version
javax.ejb.EJBHome
«EJBImplementation» AccountBean
«EJBEntityHomeInterface» AccountHome
EA 5.1 Unregistered Trial Version -
+ create(Float, Integer) : Account + findByPrimaryKey(AccountPK) : Account
accountID: int balance: EA Float 5.1 Unregistered Trial Version ctx: javax.ejb.EntityContext number: Integer
EA 5.1 Unregistered Trial Version
«EJBRealizeHome» «instantiate»
javax.ejb.EJBObject
«EJBRemoteInterface» Account property get + getBalance() : Float + getNumber() : Integer property set + setBalance(Float) : void + setNumber(Integer) : void
+ ejbActivate() : void + ejbLoad()EA : void 5.1 Unregistered Trial Version + ejbPassivate() : void + ejbRemove() : void 5.1 Unregistered Trial Version + ejbStore()EA : void + setEntityContext(javax.ejb.EntityContext) : void «EJBRealizeRemote» + unsetEntityContext() EA 5.1 Unregistered Trial Version : void EJBRemoteMethod + getaccountID() EA 5.1: int Unregistered Trial Version + setaccountID(int) : void property get EA 5.1 Unregistered Trial Version + getBalance() : Float + getNumber() : Integer property set EA 5.1 Unregistered Trial Version + setBalance(Float) : void EA 5.1 Unregistered Trial Version + setNumber(Integer) : void
. 24.
-
UML.
UML
-
, . UML (UML extensions). UML ; 2)
: 1) ,
-
UML. 49
UML MOF; 2) OMG ,
1) UML
,
UML-
: UML. ,
, (UML Profile for EDOC), (UML Profile for EAI) . . ) -
, CORBA-
( , (EDOC, EAI).
-
-
. (
-
,
-
,
)
-
, . .
,
(refinement),
-
. :
1)
,
,
( –
-
–
,
,
–
-
); 2)
. PIM-
PSM-
. : 1) PSM2)
UML-
PIM-
(
); UML(
,
UML-
);
3)
. ,
50
. , ( IDL-
,
-
UML-
).
. ,
, -
. , ,
-
, . , . -
, ,
, ,
. ,
( -
-
,
) -
. , -
.
«
,
-
»
( ,
-
, . .),
-
-
. ,
.
51
ч
я
1:
1. ,
, . :
-
. я
2.
в
я
1.
.
2. RUP
-
UML. 3.
, , .
4.
. .
5.
. , .
52
-
6.
, . , . ч
3. 1. 2.
. (
-
). 3. 4. 5. 6.
. . . ,
. в
4. 1.
RUP.
2. . 3.
. .
4. 5. .
ч
я
2:
1. ,
-
. :
. 53
я
2.
в
я
1. RUP
-
UML. 2.
, ,
-
. 3.
, , (
)
-
. 4.
, ,
(
, ). 5. . ч
3. 1. 2.
. (
-
). 3.
. 4.
в
1.
RUP.
2. 3. 4. 5.
UML. ( . .
54
).
ч
я
3: Щ 1.
UML,
, .
-
: ,
-
. 2.
я
в
я
1.
UML.
2.
(
)
,
. (
3.
) .
. 4.
,
. 2. -
, . 5.
. ч
3. 1. 2.
. (
-
). 3.
. 55
в
4. 1.
UML, .
2.
,
-
. 3. . 4.
.
ч
я
4: .
1. (
)
,
;
. :
-
. 2.
я
в
я
1. -
. .
-
iO-Software ArcStyler Tool Suite 3.1 ( – ArcStyler) – , . ArcStyler UMLRational Rose 2000 MagicDraw UML 9. 2. . PIMArcStyler MDA. iOCATBase, 56
-
,
PIM-
«Logical
, .
,
View::iOCATBase::elementary_datatypes». 3. ArcStylerPIM. 4. ArcStyler,
.
5.
-
(tagged values)
,
-
UMLComponentSegment
, (
. . ,
EJB), UML. UML),
6. ( .
,
EJB-
EJBArchive .
Realizes
. .
,
,
-
. 7.
. ArcStyler Rational Rose «ArcStyler». Generate .
, UML-
,
( 8.
-
-
). ,
. build.xml, ,
, Ant 57
build.bat.
build.bat :
1) 2)
build; JBoss
Server.
JBoss 3)
EAR: Tomcat (
Web– – –
start;
– startSOAPServer); deploysoap;
Web-
Tomcat «stopSOAPServer startSOAPServer»;
4) JUnit
-
runAssemblyClient.
-
JUnit, runClient; 5) . stopSOAPServer. JBoss
Tomcat, stopServer. ч
3. 1. 2. 3.
. -
. -
. 4.
,
-
. 5.
,
. 4.
в
1. . 2.
,
-
. 3. 4.
. .
58
Ч 1.
2.
3.
4.
5. 6.
7.
8.
9.
10. 11.
, . .
:
.
/ .
. . ; . . - .– : . - , 2004. – 300 . – ISBN 5-89368-501-6. , . . . CASE: . / . . , . . ; . . - .– : . . - , 2001. – 136 . – ISBN 5-89368-241-6. , . . CASE. / . . . – . : , 1998. – 176 . – ISBN 5-279-02144-X. , . . : / . . , . . .– .: , 2001. – 282 . – ISBN 5-89638-040-2. , . . / . . .– .: , 1997. − 316 . – ISBN 5-89638-002-X. , . . . : . / . . , . . .– .: , 2005. – 304 . – ISBN 5-279-02573-9. , . . Bpwin Erwin. CASE. – . : : . / . . , 1999. – 256 . – ISBN 5-86404-128-9. Ч , . . : IDEF/ . . , . . , . . .– .: , 2001. – 208 . – ISBN 5-279-02433-3. , . / . , . , . – . : , 2002. – 496 . – ISBN 5-318-00358-3. , . Rational Unified Process / . ; . . – 2.– .: , 2002. – 239 . – ISBN 5-8459-0239-8. , . . . UML / . . .– .: , 2002. – 432 . – ISBN 5-8459-0276-2.
59
CASE-
. . . . . . . . , . . . . , . . . .
60 84/16. .
.
. .06. . . . . 3,72. .- . . 3,81.
. 100
. 600000,
,
.
, 87.
.