UML???? - PowerPoint PPT Presentation

About This Presentation
Title:

UML????

Description:

... Flyweight Proxy Cain of Responsibility Command Interpreter Iterator mediator Memento Observer ... 2000 11.4 ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 44
Provided by: acjp
Category:
Tags: uml | memento

less

Transcript and Presenter's Notes

Title: UML????


1
?????????????11
47070
  • 2003? 1? 7?

2
?10? ?????3
?????????????
  • 10.1 ??
  • 10.2 ???
  • 10.3 ????????
  • 10.4 ???
  • 10.5 ?????
  • 10.6 ?????

3
10.1 ??
?????3
7981???
  • ?(???)??????????????
  • ??????
  • ??????????????
  • ??????????
  • ??
  • ???
  • ??????
  • UML????
  • OCL
  • ?????????

?
??
0..
1
??
??
???????
?????????
4
10.2 ???
?????3
82???
  • ?????,???????
  • ???-??-???????
  • 2???????
  • ????

??
????
??????
1..
6..
??
???
??
??
??
????
1..
6..
1..1
1..1
??
??
???
?? ??????
5
?11? ??????????
?????????????
  • 11.1 ?????????
  • 11.2 ???????
  • 11.3 ???????
  • 11.4 ?????????????
  • 11.5 PLoP???
  • 11.6 ???????????
  • 11.7 ?????????
  • 11.8 ????????

???????
6
11.1 ?????????
  • Christopher Alexander(1936)
  • ????3??(5??)
  • The Oregon Experiment, Oxford Univ. Press,
    1975, ????(?),???????????,?????,1977
  • A Pattern Language, Oxford Univ. Press, 1977,
    ????(?),??????????,?????,1984
  • The Timeless Way of Building," Oxford Univ.
    Press, 1979, ????(?),???????????,?????,1993
  • ?????????
  • ????(Quality Without A Name)
  • ??????????(alive)
  • ???????

7
11.1 ?????????
  • ???????(timeless way)
  • ????????
  • ?????????????
  • ?????(grassroots housing process)
  • ?????(piecemeal growth)
  • ????,??,??,??,???????????
  • ??????????
  • ???????
  • ???????????,???????????
  • ?????????????????
  • ???????
  • ????

The Oregon Experiment
????????????????????????????????????????????
8
11.1 ?????????
  • ??????????
  • ??????253?????
  • ????????????????????????????
  • ?????(????????)
  • ??????(?)????????(??,??)?
  • ?????????????????
  • ????????????????
  • ?????????????????
  • ???????????????????????
  • ??????????????????,??????
  • ??????????????
  • ?????????,????????????????????(??????????)?????,??
    ??????????????????

81 ????? 68 ???????? 125 ????? 126 ???????
9
11.2 ???????
  • ??????????
  • ????????????????????
  • ????,piecemeal growth,...
  • ?????????????????
  • Modesto,Mexicali
  • Oregon

59 ???? 105 ?????? 111 ?????? 112 ?????? 161
??????? 171 ??????
10
11.2 ???????
  • ???????
  • ???????
  • ???????,???
  • ????????????
  • ?????????????
  • ????????
  • ?????????????
  • 10??????????????????...
  • ???????????????
  • ??,???,??,??
  • ??,??,??/????

??? ???
3????
11
11.3 ???????
154 ?????(Teenage Cottage) lt??gt ...???????????,??
???????????????????????,???????????????????,??????
????(153)????????????????? ?
????????????????,?????????????,???????????????????
?? ???????,???????????????????????????,?????????
,... ?????, ???????????????????,??????,????????
?????????????????????????????????,????????????????
,... ? ????????(185)?????????(188)?????,??????
?????????? ...
  • Alexander
  • ??
  • lt??gt
  • ??(??,?????????)
  • ??,??
  • ??????,??????
  • ???,??
  • ?(?????????)???? ???

12
11.3 ???????
COMPOSITE ??????,?? ???
??-????????????,?????????????????... ???
...????????????????????????????????,...
lt??????gt ?????? ????????,Composite?????????? ???
lt????gt ????? Component??? ?????
???????,Component???????????????,... ???
Composite?????????,????????????? ???
Composite????????????,????????????????????
  • GoF
  • ?????
  • ??
  • ??
  • ??
  • ?????
  • ??(????)
  • ????
  • ????
  • ??
  • ??
  • ???????
  • ???
  • ????????

13
11.3 ???????
  • POSA(Pattern-Oriented Software Architecture)
  • ????
  • ??
  • ?
  • ??
  • ??
  • ???
  • ????
  • ????
  • ??
  • ???????
  • ???
  • ??
  • ??
  • ??

Model-View-Controller MVC????????????,??????????
??3??????????????????????????,... ?
???????????????????????????????????????,??????????
????... lt?gt ?? ???????????????????????????????????
??????????????... ?? ??????????????????????????,??
?,?????????????????????... ??? MVC???????????????,
smalltalk-80????????????????????,... ????
???????????,?????????????????????????...??????????
,... ltCRC?gt lt????gt ???? ????????,MVC??????????????
????... lt??????gt ??
14
11.3 ???????
  • Analysis Patterns (Fowler)
  • ??????
  • ???
  • ??
  • ?
  • ????????
  • Refactoring (Fowler)
  • ??
  • ??-??
  • ??
  • ??
  • ?(???)

15
11.3 ???????
  • ????????????
  • ??????????????
  • ?????????????
  • ???????,???
  • ???????????
  • ????????
  • Force??????
  • ?????????
  • ?????
  • ?????????????
  • c.f. ??????????????????
  • (http//www.hyuki.com/writing/ehonpat.html)
  • ????????????????????
  • (??,????????????????2000???)

16
11.4 ?????????????
  • ?????????????
  • OOPSLA87
  • Beck Cunningham
  • Using Pattern Languages for Object-Oriented
    Programs
  • Window Per Task, Few Panes, Standard Pane, Nouns
    and Verbs, Short Menus
  • (Beck?Oregon Univ.?)
  • ECOOP/OOPSLA90
  • Gamma and Helm
  • BOF(Birds-of-a-Feather ?????????)session
  • ECOOP91
  • GoF????????
  • OOPSLA9193
  • Pattern???????????

17
11.4 ?????????????
  • PLoP???
  • OOPSLA91,92????????????
  • Hillside Group
  • 1993?8?Beck, Booch, Cunningham, Johnson,
    Coplien,
  • 1994?4?Gabriel
  • PLoP?????????????
  • 1994?8?1st PLoP Conference _at_Allerton Park,
    Illinois Univ.
  • EuroPLoP(1996)
  • ChilliPLoP(1998)
  • KoalaPLoP(2000)
  • MensolePLoP(2001)

18
11.5 PLoP???
  • PLoP???
  • Writers Workshop
  • ???????
  • shepherding
  • ???????
  • ???
  • ???????
  • Writing Workshop
  • ??????????
  • PLoPD
  • ???????????

????
19
11.5 PLoP???
  • ???????
  • a. ??????????????.??,????????
  • b. ???????????????????????
  • c. ???????????
  • d. ?????????????
  • e. ????????????????
  • f. ??????
  • ????????????

20
11.6 ???????????
??????????
  • Design Patterns (1995)
  • GoF(Gang of Four)
  • Gamma, Helm, Johnson, and Vlissides
  • ???????????????
  • Pattern-Oriented Software Architecture(1996)
  • Siemens Group
  • Buschmann, Meunier, Rohnert, Sommerlad, and Stal
  • ?????????????????
  • Analysis Patterns(1997)
  • Martin Fowler
  • ????????????
  • ????????(???????????)
  • PLoPD(Pattern Language of Programming and Design)
  • Anti Patterns

21
11.7 ?????????
??????????
  • ?????????
  • ????(Accountability)
  • ?????
  • ???????
  • ??????????
  • ???????(Account)
  • ????????
  • ??
  • ???????
  • ??????
  • ????????????
  • ????????
  • ?????????????????
  • ?????????????
  • ????????????????????
  • ??????

22
11.7 ?????????
??????????
  • ????(Accountability)
  • ?????????????
  • ?????
  • ??(????)???,?????
  • ??????(??????)?

23
11.7 ?????????
??????????
???????????????
  • ????(Accountability)
  • ?????????
  • ?????,????????????
  • ??????????
  • ?????????????????

??
?
0..1
?
??
??
??
??????
????


???
??
??
???
??
??
?????
????
24
(No Transcript)
25
11.7 ?????????
??????????
???????????????
  • ????(Accountability)
  • 2?????
  • ??????????2??

26
(No Transcript)
27
11.7 ?????????
??????????
???????????????
  • ????(Accountability)
  • ??????
  • ??????????,??????????

28
(No Transcript)
29
11.7 ?????????
??????????
???????????????
  • ????(Accountability)
  • ?????????????
  • ???????????
  • ????????

30
(No Transcript)
31
11.7 ?????????
??????????
  • ????(Accountability)
  • ?????????????????
  • ???????
  • Customer-Performer???

32
11.7 ?????????
??????????
???????????????
  • ????(Accountability)
  • ???????????
  • ??????(???)
  • ?????????????
  • ????

inv collxset(????)self.the????
collX-gtforALL( x x.?.???-gtincludes(x.???.?)
and x.?.???-gtincludes(x.???.?))
33
  • ????
  • ??????
  • ?????????????????,2001?12?18???????????????????
    ??

?? ?????
???
???????
?
?? ?????
???
?
?
????
???????
???
???? ????
???? ????
??
???
2001/12/18
34
11.7 ?????????
??????????
???????????????
  • ??(Account)
  • ?????
  • ??
  • ??????????

35
  • ????
  • ????????????????
  • 2001?5?1?,?????????A???45,000???????????????2001?
    5?31?,??????????????,?????????????????????

????
???????? 2001?5?1?
???????
-45000?
????
45000?
A????
????
-45000?
???????? 2001?5?31?
??????
????
45000?
36
11.7 ?????????
??????????
???????????????
  • ??(Account)
  • ??(Summary)
  • ??????

?? ??
????
/?? ?

??
/??????

0..1
????
??????
????????
????
????
?? ?

1
1
2..
inv /??????self.??????
inv /??????self.????./??????
37
(No Transcript)
38
11.8 ????????
??????????
  • ??????????
  • Abstract Factory Builder
  • Factory Method Prototype
  • Singleton
  • ??????????
  • Adapter Bridge
  • Composite Decorator
  • Façade Flyweight
  • Proxy
  • ????????????
  • Cain of Responsibility
  • Command Interpreter
  • Iterator mediator
  • Memento Observer
  • State Strategy
  • Template Method
  • Visitor

39
11.8 ????????
??????????
  • Observer
  • 1????(Subject)?????????(Observers)
  • Observer??Subject??1?????????
  • ???????
  • update()??????,????????????

abstract Subject
abstract Observer
observer -gtupdate()

Notify() Attach(Observer) Detach(observer)
update()
observer
ConcreteSubject
subject
SetState() GetState()
observerState subject.GetState()
return subjectState
subjectState
40
11.8 ????????
??????????
  • Observer
  • Observer???(Attach())
  • ???????????(Notify()-gtupdate())
  • Observer????????????
  • Subject?Model?,Observer?View???

41
11.8 ????????
??????????
  • State
  • ????????????,??????????
  • ???????????????
  • ????????????
  • ConcreteState?singleton

Context
abstract State
state.Handle()

Request()
Handle()
state
state
42
11.8 ????????
??????????
  • State
  • State???????????????

public class ??? private ???? _state
private Money _salary public void
setState(???? s) _state s public
void Request( ) _salary _state.????( )
public class ???? ... public class ????
extends ???? public Money ????( )
return ??? ???( ) private Money ???( )
...
public class ??? private Money _salary
private char _state public void setState(char
s) _state s public void Request(
) if(_state 1) _salary ???
???( ) else if(_state 2) _salary
??? ???( ) else ... private
Money ???( ) ... private Money ???( ) ...
43
???????
  • ?????????????????????
  • ?????????
  • ???????????Force
Write a Comment
User Comments (0)
About PowerShow.com