Bai 09 - Tong Quan Ve UML Va PTTK HDT

  • Published on
    12-Feb-2015

  • View
    22

  • Download
    5

Embed Size (px)

DESCRIPTION

hng i tng

Transcript

2

B MN CNG NGH PHN MM ViN CNG NGH THNG TIN V TRUYN THNG TRNG I HC BCH KHOA H NI

Ni dungLP TRNH HNG I TNG 1. Tng quan v UML 2. Phn tch thit k hng i tng 3. Cng c pht trin OOAD

Bi 09. Tng quan v UML v PTTK HTCao Tun Dng - Nguyn Th Thu Trang

3

1.1. M hnh ha l g? Gip n gin ha th gii thc bng cc m hnh Gip hiu r hn v h thng di mt gc nhn no

S quan trng ca m hnh haMc quan trng thp Mc quan trng cao hn

My bay giy

My bay phn lc

5

6

i d n thng khng m hnh ha Rt nhiu i d n tin hnh xy dng ng dng theo hng tip cn ca vic gp my bay giy. Bt u lp trnh ngay khi c c yu cu. Mt rt nhiu thi gian v to ra rt nhiu m ngun. Khng c bt k mt kin trc no. Phi chu kh vi nhng li pht sinh.

1.2. UML l g? Ngn ng m hnh ha thng nht UML (Unified Modeling Language) UML l ngn ng : trc quan ha (visualizing) xc nh r (c t - Specifying) xy dng (constructing) ti liu ha (documenting)

M hnh ha l mt con ng dn n thnh cng ca d n.

cc cu phn (artifact) ca mt h thng phn mm

UML l ngn ng trc quan UML l ngn ng thng nht trc quan gip cng vic c x l nht qun, gim thiu li xy ra C nhng th m nu khng m hnh ha th khng hoc kh c th hiu c M hnh tr gip hiu qu trong vic lin lc, trao iTrong t chc Bn ngoi t chc

UML l ngn ng c t UML xy dng cc m hnh chnh xc, r rng v y .

UML l ngn ng xy dng HT Cc m hnh UML c th kt ni trc tip vi rt nhiu ngn ng lp trnh. nh x sang Java, C++, Visual Basic Cc bng trong RDBMS hoc kho lu tr trong OODBMS Cho php cc k ngh xui (chuyn UML thnh m ngun) Cho php k ngh ngc (xy dng m hnh h thng t m ngun)

UML l ngn ng ti liu ha UML gip ti liu ha v kin trc, yu cu, kim th, lp k hoch d n, v qun l vic bn giao phn mm Cc biu khc nhau, cc ghi ch, rng buc c c t trong ti liuUse Case DiagramUse Case 1 - .EXE

Deployment Diagram - 9 5 :

- NT: - , - - : - - - IBM : - , -

Wi n d o w9 5

Wi n d o ws 9 5 Wi n d o ws 9 5

-

Wi n d o ws NT

Actor A

Use Case 2

Actor BSo l a ri s - .EXE

Al p h a UNIX - .EXE Wi n d o ws NT

Use Case 3

IBM M a i n fra me

-

Do c u m e n tL s it

ma inW n d us er

fil eMg r : Fil eM gr

do cu me nt : D ocu me nt

gFi l e

rep os itoryFi l e M g r add ()

Do c u m e n t

nam e : in t fe tc h Do c( ) s o rtBy Na me ( ) delet e () doc d i :n it n u m Fi e l d :i n t

.

-

1 : Do c v i e w re que st ( )

ge t( ) open () c l o se ( ) 2 : fe t c h Do c( ) Fi l e L s it re a d () s o rtFi l e L i st( ) fL i st 3 : c re a te ( ) add () delet e () 4 : c re a te ( ) 1 c re a te () fi l l Do c u m en t( ) re a d () fi l l th e c od e ..

5 : re a d Do c ( )

-

- .

6 : fi l l Do c u me n t()

re p 7 : re a d Fi l e ( ) Fi l e Re p o s i t o ry

8 : fi l l F ile( ) (fro m Pe rs s i te n ce ) re a d () - - . re a d Do c( ) re a d Fi e l () c re a te () fi l l Fi l e () 9 : s o rtB y Na m e ( ) n a m e : ch a r * = 0 Grp Fi l e

re a d () open ()

Sequence Diagram

Class Diagram

1.3. Lch s pht trin ca UML (2) 1.3. Lch s pht trin ca UML Vo 1994, c hn 50 phng php m hnh ha hng i tng: Fusion, Shlaer-Mellor, ROOM, Class-Relation,Wirfs-Brock, CoadYourdon, MOSES, Syntropy, BOOM, OOSD, OSA, BON, Catalysis, COMMA, HOOD, Ooram, DOORS

UML c 3 chuyn gia hng i tng hp nht cc k thut ca h vo nm 1994: Booch91 (Grady Booch): Conception, Architecture OOSE (Ivar Jacobson): Use cases OMT (Jim Rumbaugh): Analysis

Meta-models tng ng vi nhau Cc k php ha khc nhau Quy trnh khc nhau hoc khng r rng Cn chun ha v thng nht cc phng php

Thit lp mt phng thc thng nht xy dng v v ra cc yu cu v thit k hng i tng trong qu trnh PTTK phn mm UML c cng nhn l chun chung vo nm 1997.

UML l mt ngn ng hp nhtRumbaughMeyerBefore and after conditions

UML l mt ngn ng thng nht

Booch

JacobsonFusionOperation descriptions, message numbering

HarelState charts

EmbleySingleton classes, High-level view

Gamma, et.alFrameworks, patterns, notes

Wirfs-BrockResponsibilities

Shlaer- MellorObject lifecycles

Selic, Gullekson, WardROOM (Real-Time Object-Oriented Modeling)

OdellClassification

1.3. Lch s pht trin ca UML (3)UML 2.0(2004)

1.4. Cc khung nhn ca UMLKhung nhn ca m hnh c ngha vi nhng ngi tham gia no Biu din cc chc nng v mi 4 + 1 Architectural ViewLogical ViewAnalysts/DesignersStructure

UML 1.5(March, 03)

UML Partners Expertise

UML 1.1(Sept. 97)

UML 1.0(Jan. 97)

Implementation ViewProgrammersSoftware management

UML 0.9 and UML 0.91(June 96) (Oct. 96)

Use-Case View Public FeedbackEnd-user Functionality

Unified Method 0.8(OOPSLA 95)

Process ViewSystem integratorsPerformance, scalability, throughput

Deployment ViewSystem engineeringSystem topology, delivery, installation, communication

Booch 93

OMT - 2

OOSE

Other Methods

Booch 91

OMT - 1

trng d kin r cc cCh ah th ngyu di cnhn u ch nng gc cc a a h hi th ngc dng Ch ira ung nh ng, ng, (cc dcc ch v t M nh t co dn nt v vt v th ng c nng cung l thng khc l nhau c v a c cho ng M tth vi c cc k tn ti lni h p ng s d ng) ch c cc un nhau gima chng ph n cc mm nh cho ctu hnh nh n mt chia thnh n ng in package, phn hnh nht lp v qun l cu hnh

Cc biu UML Biu use case (Use Case Diagram) Biu hot ng (Activity Diagram) Biu tng tc (Interaction Diagrams) Biu trnh t (Sequence Diagram) Biu giao tip/cng tc (Communication/Collaboration Diagram)

Quy trnh v UML UML l k php ch khng phi l phng php UML c th p dng cho tt c cc pha ca quy trnh pht trin phn mm "Rational Unified Process" - quy trnh pht trin cho UML

Biu trng thi (Statechart Diagram) Biu cu trc tnh (Static Structure Diagrams) Biu lp (Class Diagram) Biu i tng (Object Diagram)

Biu thc thi (Implementation Diagrams) Biu thnh phn (Component Diagram) Biu trin khai (Deployment Diagram)

19

20

Ni dung1. Tng quan v UML 2. Phn tch thit k hng i tng 3. Cng c pht trin OOAD

2.1. Tm quan trng ca OOAD Nhiu ngi pht trin d n Cho rng phn mm ch yu c xy dng bng cch g code t bn phm Khng dnh thi gian cho qu trnh phn tch v thit k phn mm

H phi cy ba hon thnh chng trnh v Khng hiu hoc hiu sai yu cu Giao tip vi cc thnh vin khng tt Khng tch hp c vi module ca ng nghip

H nhn ra rng Phn tch v Thit k cn c coi trng hn, nhng qu mun

21

22

2.1. Tm quan trng ca OOAD (2) Cn thit lp mt c ch hiu qu nm bt yu cu, phn tch thit k C ch ny phi nh l mt ngn ng thng nht gip cho qu trnh hp tc hiu qu gia cc thnh vin trong nhm pht trin phn mm. OOAD

2.2. Mc ch ca OOAD Chuyn cc yu cu ca bi ton thnh mt bn thit k ca h thng s c xy dng Tp trung vo qu trnh phn tch cc YU CU ca h thng v thit k cc M HNH cho h thng trc giai on lp trnh c thc hin nhm m bo mc ch v yu cu ca h thng c ghi li mt cch hp l trc khi h thng c xy dng Cung cp cho ngi dng, khch hng, k s phn tch, thit k nhiu ci nhn khc nhau v cng mt h thng

23

24

2.3. Phng php OOAD (2) 2.3. Phng php OOAD OOAD c chia thnh 2 giai on Phn tch hng i tng (OOA) Thit k hng i tng (OOD)1. Use case modeling to define requirements 6. External Specification Design

OOA l giai on nhm to ra cc m hnh c bn (m hnh khi nim) ca h thng da theo nhng g khch hng yu cu v h thng ca h OOD s b sung thm cc thng tin thit k chi tit cho cc m hnh ni trn

2. Object extraction and message sequence design between objects

5. Normalization of the data structure using E-R diagram

3. Class design

4. E-R modeling for persistent data

25

2.4. Cng c UML OOAD Cng c m ngun m: EclipseUML UmlDesigner ArgoUML...

Cng c thng mi: Enterprise Architect IBM Rational Software Architect Microsoft Visio Visual Paradigm for UML SmartDraw...