You are on page 1of 163

9/6/2011

PHN I: GII THIU CHUNG V CNG NGH PHN MM


I. Bn cht phn mm
1. nh ngha chung v phn mm 2. Kin trc phn mm 3. Cc khi nim 4. c tnh chung ca phn mm 5. Th no l phn mm tt ? 6. Cc ng dng phn mm

II. Nhng vn trong pht trin phn mm III. Quy trnh pht trin phn mm
1

1. nh ngha chung v phn mm


Phn mm (Software - SW) nh mt khi nim i ngha vi phn cng (Hardware - HW), tuy nhin, y l 2 khi nim tng i T xa, SW nh th c cho khng hoc bn km theo my (HW) Dn dn, gi thnh SW ngy cng cao v nay cao hn HW

9/6/2011

Cc c tnh ca SW v HW
Hardware Vt cng Kim loi Vt cht Hu hnh Sn xut cng nghip bi my mc l chnh nh lng l chnh Hng hc, hao mn Software Vt mm K thut s dng Tru tng V hnh Sn xut bi con ngi l chnh nh tnh l chnh Khng hao mn

nh ngha 1
Phn mm l
Cc lnh (chng trnh my tnh) khi c thc hin th cung cp nhng chc nng v kt qu mong mun Cc cu trc d liu lm cho chng trnh thao tc thng tin thch hp Cc t liu m t thao tc v cch s dng chng trnh

9/6/2011

nh ngha 2
Trong mt h thng my tnh, nu tr b i cc thit b v cc loi ph kin th phn cn li chnh l phn mm (SW) Ngha hp: SW l dch v chng trnh tng kh nng x l ca phn cng ca my tnh (nh h iu hnh - OS) Ngha rng: SW l tt c cc k thut ng dng thc hin nhng dch v chc nng cho mc ch no bng phn cng

SW theo ngha rng


Khng ch SW c bn v SW ng dng Phi gm c kh nng, kinh nghim thc tin v k nng ca k s (ngi ch ra phn mm): Know-how of Software Engineer L tt c cc k thut lm cho s dng phn cng my tnh t hiu qu cao

9/6/2011

Phn mm l g ?
Nhm cc K thut, Phng php lun

Nhm cc chng trnh

Nhm cc t liu

Kinh nghim k s, know-how

Cc khi nim v trnh t c th ha mt h thng Cc phng php tip cn gii quyt vn Cc trnh t thit k v pht trin c chun ha Cc phng php c t yu cu, thit k h thng, thit k chng trnh, kim th, ton b quy trnh qun l pht trin phn mm
7

Phn mm l g ?
Nhm cc K thut, Phng php lun

Nhm cc chng trnh

Nhm cc t liu

Kinh nghim k s, know-how

L phn giao din vi phn cng, to thnh t cc nhm lnh ch th cho my tnh bit trnh t thao tc x l d liu Phn mm c bn: vi chc nng cung cp mi trng thao tc d dng cho ngi s dng nhm tng hiu nng x l ca phn cng (v d nh OS l chng trnh h thng) Phn mm ng dng: dng x l nghip v thch hp no (qun l, k ton, . . .), phn mm ng gi, phn mm ca ngi dng, . . .
8

9/6/2011

Phn mm l g ?
Nhm cc K thut, Phng php lun

Nhm cc chng trnh Nhm cc t liu

Kinh nghim k s, know-how

Nhng t liu hu ch, c gi tr cao v rt cn thit pht trin, vn hnh v bo tr phn mm ch ra phn mm vi tin cy cao cn to ra cc t liu cht lng cao: c t yu cu, m t thit k tng loi, iu kin kim th, th tc vn hnh, hng dn thao tc

Phn mm l g ?
Nhm cc K thut, Phng php lun

Nhm cc chng trnh

Nhm cc t liu

Kinh nghim k s, know-how

Phn mm ph thuc nhiu vo tng (idea) v k nng (know-how) ca ngi/nhm tc gi Kh nng h thng ha tru tng Kh nng lp trnh K nng cng ngh Kinh nghim lm vic Tm bao qut ...

10

9/6/2011

2. Kin trc phn mm


Phn cp
System

Subsystem

Master files

Subsystem

Job unit

Program

Temporary files

Program

Jobstep unit

Module

Arguments

Module

Arguments

Subroutine
Common Module

Member unit

Phn mm Nhn t phng din cu trc


System A Fuction

Cu trc phn mm:


kin trc cc chc nng m phn mm c iu kin phn cp cc chc nng

Cu trc chiu ng (Vertical structure)

Subsystem Function B

Subsystem Function C

Program E Function

Program D Fuction

Thit k chc nng


Theo chiu ng: cng su cng phc tp Theo chiu ngang: cng rng cng nhiu chc nng, qui m cng ln

Function Module F

Function Module G

Function H Subroutine

Cu trc chiu ngang (Horizontal structure)

9/6/2011

Phn mm Nhn t phng din th tc


System

Subsystem
Master files

Subsystem

Program

Temporary files

Program

Module

Arguments

Module

Arguments

Subroutine
Common Module

Quan h th t gia cc thnh phn cu thnh phn mm Thut ton vi nhng php lp, r nhnh, iu khin lung x l (quay lui hay b qua) Cu trc lgic biu th tng chc nng c trong phn mm v trnh t thc hin chng Thit k cu trc trc ri sang chc nng
13

T phng php lun phn mm sang k thut phn mm


Khi ch tc phn mm cn nhiu phng php:
Phng php lun (Methodology): nhng chun mc c bn ch to phn mm vi cc ch tiu nh tnh Cc phng php k thut (Techniques): nhng trnh t c th ch to phn mm v l cch tip cn khoa hc mang tnh nh lng

14

9/6/2011

T phng php lun phn mm sang k thut phn mm

Mun Tinh chnh tng bc Tru tng ha Che giu t.tin Khi nim phn mm

Phn tch cu trc Thit k cu trc Lp trnh cu trc D liu tru tng Hng i tng

15

3.1 Tnh mun (Modularity)


L kh nng phn chia phn mm thnh cc mun ng vi cc chc nng, ng thi cho php qun l tng th: khi nim phn chia v trn (partion and merge) Hai phng php phn chia mun theo chiu
Theo chiu su Theo chiu rng
Cu trc rng chiu ngang

SW

Phn chia chiu rng

Tnh c lp km dn

Cu trc su chiu ng

Phn chia chiu su

Quan h gia cc mun ? qua cc i s (arguments)

iu khin phc tp dn

16

9/6/2011

3.2 Tinh chnh tng bc (Step refinement)


Cch tip cn t trn xung (top-down approach)
Th gii bn ngoi

Tru tng ha mc cao: Th gii bn ngoi, trng thi cha r rng

Chi tit ha

c t yu cu
dn tng bc

Tru tng ha mc trung gian: Xc nh yu cu v c t nhng nh ngha yu cu

Ngn ng chng trnh

Tru tng ha mc thp: Tng lnh ca chng trnh c vit bi ngn ng th tc no


17

V d: Trnh t gii quyt vn t mc thit k chng trnh n mc lp trnh


Bi ton: t mt nhm N s khc nhau tng dn, hy tm s c gi tr bng K (nhp t ngoi vo) v in ra v tr ca n Gii tng bc t khi nim n chi tit ha tng cu lnh bi ngn ng lp trnh no Chn gii thut tm kim nh phn (pp nh phn)

18

9/6/2011

C th ha th tc qua cc chc nng

Bi ton cho

Nhp gi tr K

Nhn gi tr nhm N s

Tm kim gi tr (pp nh phn)

In ra v tr (nu c)

19

C th ha bc tip theo
Tm kim gi tr (pp nh phn) Xc lp phm vi mng s Lp li x l tm kim gi tr K trong phm vi tm kim

Lp li tm kim K trong phm vi tmkim

Tm v tr gia phn i mng So snh K vi gi tr gia t li phm vi tm kim


20

10

9/6/2011

Mc m t chng trnh (bng PDL)


Btu c K Nhn gi tr cho mng 1 chiu A(I), (I =1, 2, . . . ,.N) MIN = 1 MAX = N DO WHILE (C gi tr bng K khng, cho n khi MIN > MAX) Ly MID = (MIN + MAX) / 2 IF A(MID) > K THEN MAX = MID - 1 ELSE IF A(MID) < K THEN MIN = MID + 1 ELSE In gi tr MID ENDIF ENDIF ENDDO KtThc

21

Cu hi
M1
Lm th no nh ngha cu trc ca mt h thng c thit k da trn cc module? u l cc c tnh cn c ca cu trc ny?
System

M2 Mn-1 Mn

11

9/6/2011

3.3. Che giu thng tin (Information hiding) [Parnas72]


Cc mun nn c c trng bi nhng quyt nh thit k (design decision) sao cho mi mun u l b mt i vi cc mun khc Rt hu ch cho kim th v bo tr phn mm

23

3.3. Che giu thng tin (Information hiding) [Parnas72]


C nh tt c cc quyt nh thit k (design decision) c kh nng b thay i Gn mi quyt nh thit k vo mt module mi; lc ny quyt nh thit k s l phn b mt ca module (module secret) Thit k giao din ca module (module interface), giao din ny s khng thay i khi phn b mt ca module thay i

design decision design decision

design decision 1

M2

design decision design decision design decision n

design decisionn-1

design decision

System

12

9/6/2011

3.3. Che giu thng tin (Information hiding) [Parnas72]


Ngi dng Cc ti nguyn cn xut ra: kiu d liu, bin, thuc tnh, hm, s kin, ngoi l, v.v..
interface Bicycle { void changeCadence (int newValue); void changeGear(int newValue); void speedUp(int increment); void applyBrakes(int decrement); }

Giao din Secret Module

Ci t cc ti nguyn cn xut ra
class Bike implements Bicycle { } class Motor-Bike implements Bicycle { }

3.4. Tru tng ha (Abstraction)


Cho php tp trung xem xt vn mc tng qut, gt i nhng chi tit mc thp t lin quan 3 mc tru tng
Tru tng th tc: dy cc ch th vi chc nng c th v gii hn no Tru tng d liu: tp hp d liu m t i tng d liu no Tru tng iu khin: C ch iu khin chng trnh khng cn c t nhng chi tit bn trong

V d: M ca. Th tc: M gm . . .; D liu: Ca l . . .

26

13

9/6/2011

L hng ha v hnh, khng nhn thy c Cht lng phn mm: khng mn i m c xu hng tt ln sau mi ln c li (error/bug) c pht hin v sa Phn mm vn cha li tim tng, theo quy m cng ln th kh nng cha li cng cao Li phn mm d c pht hin bi ngi ngoi

27

4. c tnh chung ca phn mm


Chc nng ca phn mm thng bin ha, thay i theo thi gian (theo ni s dng) Hiu ng ln sng trong thay i phn mm Phn mm vn cha tng v sng to ca tc gi/nhm lm ra n Cn kh nng t duy nh phn trong xy dng, pht trin phn mm C th sao chp rt n gin

28

14

9/6/2011

5. Th no l phn mm tt ?

Yu t khi nim phn mm tt

Hiu sut x l Tnh d hiu Cc ch tiu c bn

c trng gn y

Thi gian (Phn cng pht trin)


29

5.1. Cc ch tiu c bn
Phn nh ng yu cu ngi dng (tnh hiu qu - effectiveness) Cha t li tim tng Gi thnh khng vt qu gi c lng ban u D vn hnh, s dng Tnh an ton v tin cy cao

30

15

9/6/2011

5.2. Hiu sut x l cao


Hiu sut thi gian tt (efficiency):
phc tp tnh ton thp (Time complexity) Thi gian quay vng ngn (Turn Around Time: TAT) Thi gian hi p nhanh (Response time)

S dng ti nguyn hu hiu: CPU, RAM, HDD, Internet resources, . . .

31

5.3. D hiu
Kin trc v cu trc thit k d hiu D kim tra, kim th, kim chng D bo tr C ti liu (m t yu cu, iu kin kim th, vn hnh, bo tr, FAQ, . . .) vi cht lng cao

Tnh d hiu: ch tiu ngy cng quan trng


32

16

9/6/2011

V d c th ???
Phn mm h thng (System SW) Phn mm thi gian thc (Real-time SW) Phn mm nghip v (Business SW) Phn mm tnh ton KH&KT (Eng.&Scie. SW)

Phn mm nhng (Embedded SW)


Phn mm my c nhn (Personal computer SW) Phn mm trn Web (Web-based SW) Phn mm tr tu nhn to (AI SW)
33

Bi tp v nh: Phn bit cc khi nim sau


H thng, phn mm, ng dng Lp trnh, pht trin phn mm Lp trnh vin v k s phn mm

34

17

9/6/2011

PHN I: GII THIU CHUNG V CNG NGH PHN MM

I. Bn cht phn mm II. Nhng vn trong pht trin phn mm


1. Khng hong phn mm l g ? 2. Nhng kh khn trong sn xut phn mm

III. Quy trnh pht trin phn mm (CNPM)


35

1. Khng hong phn mm (Software crisis)


L s day dt kinh nin (ko di theo thi gian hoc thng ti din, lin tc khng kt thc) gp phi v to bc ngot trong pht trin phn mm my tnh, nh:
Phi lm th no vi vic gim cht lng v nhng li tim tng c trong phn mm ? Phi x l ra sao khi bo dng phn mm c ? Phi gii quyt th no khi thiu k thut vin phn mm? Phi ch tc phn mm ra sao khi c yu cu pht trin theo qui cch mi xut hin ? Phi x l ra sao khi s c phn mm gy ra nhng vn x hi ?
36

18

9/6/2011

Mt s yu t
Phn mm cng ln s ko theo phc tp ha v tng chi ph pht trin i vai tr gi thnh SW vs. HW Cng sc cho bo tr cng tng th chi ph cho Backlog cng ln Nhn lc cha p ng c nhu cu phn mm Nhng phin h ca phn mm gy ra nhng vn x hi

37

2. Nhng kh khn trong sn xut phn mm


Khng c phng php m t r rng nh ngha yu cu ca ngi dng (khch hng) Sau khi bn giao sn phm d pht sinh nhng trc trc (troubles) Vi nhng phn mm quy m ln, t liu c t c nh thi gian di Kh p ng nhu cu thay i ca ngi dng mt cch kp thi trong thi gian Phng php lun thit k khng nht qun Thit k theo cch ring (ca cng ty, nhm), th s dn n suy gim cht lng phn mm (do ph thuc qu nhiu vo con ngi) Khng c chun v vic to t liu quy trnh sn xut phn mm c t khng r rng s lm gim cht lng phn mm

38

19

9/6/2011

2. Nhng kh khn trong sn xut phn mm


Khng kim th tnh ng n ca phn mm tng giai on m ch kim giai on cui v pht hin ra li thng bn giao sn phm khng ng hn Coi trng vic lp trnh hn khu thit k gim cht lng phn mm Coi thng vic ti s dng phn mm (software reuse) gim nng sut lao ng Phn ln cc thao tc trong quy trnh pht trin phn mm do con ngi thc hin gim nng sut lao ng Khng chng minh c tnh ng n ca phn mm gim tin cy ca phn mm
39

Nhng vn trong sn xut phn mm (tip)


Chun v mt phn mm tt khng th o c mt cch nh lng Khng th nh gi c mt h thng ng n hay khng u t nhn lc ln vo bo tr gim hiu sut lao ng ca nhn vin Cng vic bo tr ko di gim cht lng ca t liu v nh hng xu n nhng vic khc Qun l d n lng lo qun l lch trnh sn xut phn mm khng r rng Khng c tiu chun c lng nhn lc v d ton lm ko di thi hn v vt kinh ph ca d n

40

20

9/6/2011

PHN I: GII THIU CHUNG V CNG NGH PHN MM


I. Bn cht phn mm II. Nhng vn trong pht trin phn mm III.Quy trnh pht trin phn mm
1. S tin trin ca cc phng php thit k phn mm 2. nh ngha Cng ngh hc phn mm 3. Vng i ca phn mm 4. Mt s quy trnh pht trin phn mm
41

1. S tin trin ca cc phng php thit k phn mm


t quan tm ti phn mm Tp trung nng cao tnh nng v tin cy ca phn cng

Pht trin h iu hnh nh phn mm ln (IBM OS/360, EC OS). Xut hin nhu cu v quy trnh pht trin phn mm ln v quy trnh g li, kim th trong phm vi gii hn

Chnh sch phn bit gi c gia phn cng v phn mm (IBM). Nghin cu c bn v phng php lun lp trnh Xut hin khi nim Software Engineering (1968). Bt u bn lun v khng khong phn mm v xu hng hnh thnh CNHPM nh mt chuyn mn ring

1960

1970

1980

1990

2000

42

21

9/6/2011

1. S tin trin ca cc phng php thit k phn mm


Nghin cu v lp trnh, kim th, m bo tnh tin cy trong quy trnh sn xut phn mm. K thut: lp trnh cu trc ha, lp trnh mun, thit k cu trc ha, vv Hi ngh quc t u tin v CNHPM c t chc (1975): International Conference on SE (ICSE) Quan tm n mi pha trong quy trnh pht trin phn mm, nhng tp trung chnh nhng pha u. ICSE t chc ln 2, 3 v 4 vo 1976, 1978 v 1979 Nht Bn c K hoch pht trin k thut sn xut phn mm t nm 1981 Cuc cch tn sn xut phn mm bt u trn phm vi cc nc cng nghip

1960

1970

1980

1990

2000

43

1. S tin trin ca cc phng php thit k phn mm


Trnh hc vn v ng dng CNHPM c nng cao, cc cng ngh c chuyn vo thc t. Xut hin cc sn phm phn mm v cc cng c khc nhau lm tng nng sut sn xut phn mm ng k ICSE t chc ln 5 v 6 nm 1981 v 1982 vi trn 1000 ngi tham d mi nm Nht Bn sang K hoch pht trin cc k thut bo tr phn mm (19811985) T hc vn sang nghip v! Cht lng phn mm tp trung ch yu tnh nng sut, tin cy v tnh bo tr. Nghin ca h tr t ng ha sn xut phn mm Nht Bn: SIGMA: Software Industrialized Generator & Maintenance Aids, 1985-1990 Nhiu trung tm, vin nghin cu CNHPM ra i. Cc trng a vo ging dy SE Cng nghip ha sn xut phn mm bng cch a nhng k thut cng ngh hc (Engineering techniques) thnh c s khoa hc ca CNHPM Th ch ha l lun trong sn xut phn mm v ng dng nhng phng php lun mt cch nht qun Tng cng nghin cu v to cng c tr gip sn xut phn mm

1960

1970

1980

1990

2000

44

22

9/6/2011

Hnh thi sn xut Phn mm


a ra cc k thut, phng php lun ng dng thc t vo tng quy trnh

Ci bin, bin i vo tng sn phm v cng c phn mm (my tnh ha tng phn)

Tng hp, h thng ha cho tng loi cng c

(My tnh ha ton b quy trnh sn xut phn mm)

Hng ti sn xut phn mm t ng


45

2. Cng ngh hc phn mm (Software Engineering)


Bauer [1969]: CNHPM l vic thit lp v s dng cc nguyn tc cng ngh hc ng n dng thu c phn mm mt cch kinh t va tin cy va lm vic hiu qu trn cc my thc Parnas [1987]: CNHPM l vic xy dng phn mm nhiu phin bn bi nhiu ngi Ghezzi [1991]: CNHPM l mt lnh vc ca khoa hc my tnh, lin quan n xy dng cc h thng phn mm va ln va phc tp bi mt hay mt s nhm k s

46

23

9/6/2011

2. Cng ngh hc phn mm (Software Engineering)


IEEE [1993]: CNHPM l
(1) vic p dng phng php tip cn c h thng, bi bn v c lng ha trong pht trin, vn hnh v bo tr phn mm; (2) nghin cu cc phng php tip cn c dng trong (1)

Pressman [1995]: CNHPM l b mn tch hp c quy trnh, cc phng php, cc cng c pht trin phn mm my tnh

47

2. Cng ngh hc phn mm (Software Engineering)


Sommerville [1995]: CNHPM l lnh vc lin quan n l thuyt, phng php v cng c dng cho pht trin phn mm K. Kawamura [1995]: CNHPM l lnh vc hc vn v cc k thut, phng php lun cng ngh hc (l lun v k thut c hin thc ha trn nhng nguyn tc, nguyn l no ) trong ton b quy trnh pht trin phn mm nhm nng cao c cht v lng ca sn xut phn mm

48

24

9/6/2011

2. Cng ngh hc phn mm (Software Engineering)


Cng ngh hc phn mm l lnh vc khoa hc v cc phng php lun, k thut v cng c tch hp trong quy trnh sn xut v vn hnh phn mm nhm to ra phn mm vi nhng cht lng mong mun [Software Engineering is a scientific field to deal with methodologies, techniques and tools integrated in software production-maintenance process to obtain software with desired qualities]

49

Cng ngh hc trong CNHPM ?


Nh cc ngnh cng ngh hc khc, CNHPM cng ly cc phng php khoa hc lm c s Cc k thut v thit k, ch to, kim th v bo tr phn mm c h thng ha thnh phng php lun v hnh thnh nn CNHPM Ton b quy trnh qun l pht trin phn mm gn vi khi nim vng i phn mm, c m hnh ha vi nhng k thut v phng php lun tr thnh cc ch khc nhau trong CNHPM

50

25

9/6/2011

Cng ngh hc trong CNHPM ? (tip)


Trong vng i phn mm khng ch c ch to m bao gm c thit k, vn hnh v bo dng (tnh quan trng ca thit k v bo dng) Trong khi nim phn mm, khng ch c chng trnh m c t liu v phn mm Cch tip cn cng ngh hc (khi nim cng nghip ha) th hin ch nhm nng cao nng sut (tnh nng sut) v tin cy ca phn mm, ng thi gim chi ph gi thnh

51

Software life-cycle
Vng i phn mm l thi k tnh t khi phn mm c sinh (to) ra cho n khi cht i (t lc hnh thnh p ng yu cu, vn hnh, bo dng cho n khi loi b khng u dng) Quy trnh phn mm (vng i phn mm) c phn chia thnh cc pha chnh: phn tch, thit k, ch to, kim th, bo tr. Biu din cc pha c khc nhau theo tng ngi

52

26

9/6/2011

M hnh vng i phn mm ca Boehm


Xc nh yu cu h thng Kim chng Xc nh yu cu phn mm Kim chng Thit k cn bn Kim chng Thit k chi tit Kim chng Lp trnh G li Kim th Chy th Vn hnh Bo tr Kim chng li

53

Suy ngh mi v vng i phn mm


Pha xc nh yu cu v thit k c vai tr quyt nh n cht lng phn mm, chim phn ln cng sc so vi lp trnh, kim th v chuyn giao phn mm Pha c th ha cu trc phn mm ph thuc nhiu vo suy ngh trn xung (top-down) v tru tng ha, cng nh chi tit ha Pha thit k, ch to th theo trn xung, pha kim th th di ln (bottom-up) Trc khi chuyn sang pha k tip phi m bo pha hin ti c kim th khng cn li
54

27

9/6/2011

Suy ngh mi v vng i phn mm


Cn c c ch kim tra cht lng, xt duyt gia cc pha nhm m bo khng gy li cho pha sau T liu ca mi pha khng ch dng cho pha sau, m chnh l i tng quan trng cho kim tra v m bo cht lng ca tng quy trnh v ca chnh phn mm Cn chun ha mu biu, cch ghi chp to t liu cho tng pha, nhm m bo cht lng phn mm Thao tc bo tr phn mm l vic x l quay vng tr li cc pha trong vng i phn mm nhm bin i, sa cha, nng cp phn mm

55

Cc phng php lun v k thut cho tng pha


Tn pha Xc nh yu cu Thit k h thng Thit k chng trnh Lp trnh Ni dung nghip v c t yu cu ngi dng Xc nh yu cu phn mm Thit k c bn phn mm Thit k cu trc ngoi ca phn mm L thit k chi tit: Thit k cu trc bn trong ca phn mm (n v chng trnh hoc mun) M ha bi ngn ng lp trnh Phng php, k thut Phn tch cu trc ha Thit k cu trc ha Lp trnh cu trc Phng php Jackson Phng php Warnier M ha cu trc ha

m bo Kim tra cht lng phn mm pht Phng php kim cht lng trin th chng trnh S dng, vn hnh phn mm pht Vn hnh trin. Cha c th Bo tr Bin i, iu chnh phn mm 56

28

9/6/2011

3.4 Quy trnh pht trin phn mm


Common process framework - Khung quy trnh chung Framework activities - Hot ng khung Task sets - Tp tc v Tasks - Tc v Milestones, deliverables SQA points - im KTCL Umbrella activities

57

Phases Process Workflows


Business Modeling Requirements Analysis & Design Implementatio n Test Deployment
Inception Elaboration

Mt vng lp
Construction Transition

Supporting Workflows
Cc dng cng vic
Configuration Mgmt Management Environment
Preliminary Iteration(s) Iter. #1 Iter. #2 Iter. #n Iter. Iter. #n+1 #n+2 Iter. #m Iter. #m+1
58

Cc vng lp

29

9/6/2011

4.1. Capability Maturity Model (CMM by SEI): M hnh kh nng thun thc
Thng 11 nm 1986 vin Cng ngh phn mm SEI (Software Engineering Institute) a ra khung sn v cc khi nim lin quan gip ci thin Quy trnh sn xut phn mm. Thng 9 nm 1987 vin SEI a ra c t ca khung sn v thun thc ca tin trnh. Nm 1991, pht trin thnh m hnh thun thc kh nng (CMM). Phin bn u tin l CMM 1.0 pht trin vo nhng nm 1991-1992. Trong phn ny chng ta s tm hiu v CMM 1.1.
59

a. Ti sao phi s dng m hnh CMM trong cng ngh lm phn mm


Kh khn khi khng s dng CMM
Cc tin trnh phn mm thng b thay i cp nht m khng c s chun b trc. c t mt tin trnh phn mm khng cht ch, dn n s khng hong khi thc hin mt d n. Thiu c s nh gi cht lng phn mm, a ra phng thc tin hnh v cch gii quyt cc vn pht sinh.

Thun li khi s dng CMM


D dng qun l pht trin phn mm. Cc tin trnh c cp nht qua s iu khin ca cc nh phn tch v kim th. Vai tr, trch nhim ca mi thnh vin trong cc tin trnh c phn nh r rng. Qun l cht lng ca phn mm, tho mn cc yu cu khch hng. C c s chun xc nh gi cht lng, thi gian, chi ph v phn tch d n v cc tin trnh.
60

30

9/6/2011

Tin trnh (Process)


Mt tin trnh phn mm l mt tp hp cc hnh ng, phng thc, thc hnh, thay i m ngi ta dng duy tr v pht trin phn mm cng nh cc thnh phn lin quan ti chng (v d: k hoch d n, thit k, lp trnh, kim th, ti liu hng dn...).

61

Kh nng tin trnh phn mm (Software Process Capability)


Cho bit phm vi kt qu c th mong i ca mt tin trnh phn mm. D on kh nng lm d n phn mm tip theo ca cng ty.

62

31

9/6/2011

Thc thi tin trnh phn mm


(Software Process Performance)
Thc thi tin trnh phn mm cho bit kt qu thc t ca mt tin trnh phn mm. Nh vy n hng ti kt qu t c cn kh nng tin trnh phn mm cho thy kt qu c th mong i. Do ph thuc vo c trng ca d n v tng trng hp c th, nn kt qu thc t thng khng phn nh y kh nng tin trnh ca mt cng ty.

63

thun thc ca tin trnh phn mm


(Software process maturity)
Ch r mt tin trnh phn mm c xc nh, qun l, nh gi, iu khin, t hiu qu mt cch r rng. Cho bit kh nng pht trin, ch ra gi tr ca tin trnh phn mm, tnh vng chc ca d n.

64

32

9/6/2011

c. M hnh chi tit cc thnh phn trong cu trc CMM.


Maturity Levels
ch ra nhn c t

Key Process Areas


t c

t chc bi

Kh nng tin trnh

Common Features
nh x

nhn c t

Cc mc tiu

Key Practices
m t

Thc thi hoc th ch ho

C s h tng hoc cc hot ng


65

d. M hnh 5 mc ca CMM
Tin trnh phn mm mang tnh cht tu tin, ln xn, c t tin trnh c xc nh trc, hiu qu ca cng vic mang tnh ring l. Kh c c mt mi trng lm vic n nh. K hoch v ngn sch, cht lng sn phm v vn hnh khng th d on trc c.

Continuously improving process Predictable process Defined (3)

Optimizing (5)

Managed (4)

Standard,consistent process Disciplined process Initial (1) Repeatable (2)

Qu trnh vn hnh ph thuc vo kh nng ca tng c nhn ring l, v thng xuyn thay i do ph thuc vo k nng, trnh hiu bit v cc hot ng ca tng thnh vin trong d n.

66

33

9/6/2011

d. M hnh 5 mc ca CMM
C s ci tin hn, chin lc qun l d n v th tc thc thi chin lc y c thit lp. Cc k hoch v qun l d n mi c da trn nhng kinh nghim ca d n c.

Continuously improving process Predictable process Managed (4)

Optimizing (5)

Standard,consistent process Disciplined process Initial (1) Repeatable (2)

Defined (3)

Kt qu l a c nhng hiu qu qun l tin trnh ca mt d n ny vo mt d n khc. iu ny cho php lp li (repeatable) nhng thnh cng i vi mt d n tng t mc d c th cc d n ny cng c nhng im khc bit.
67

d. M hnh 5 mc ca CMM
Lp c ti liu tin trnh tiu chun i vi vic pht trin v bo tr phn mm c t chc, bao gm c cng ngh phn mm, cc tin trnh qun l, v cc tin trnh tch hp vi nhau (ngha rng u ra ca mt tin trnh s l u vo ca tin trnh tip theo ).

Continuously improving process Predictable process Defined (3)

Optimizing (5)

Managed (4)

Standard,consistent process Disciplined process Initial (1) Repeatable (2)

Mt tin trnh c nh ngha tt gm c cc tnh cht nh c tiu chun, u vo, tiu chun v th tc r rng tin hnh cng vic, kim tra cc u ra.

68

34

9/6/2011

d. M hnh 5 mc ca CMM
Mc tiu l iu khin tin trnh. Cc tin trnh phn mm c qun l vn hnh n nh, an ton. C nhng nh gi phn mm v cht lng, hiu qu cc hot ng trong tin trnh.

Continuously improving process Predictable process Managed (4)

Optimizing (5)

Standard,consistent process Disciplined process Initial (1) Repeatable (2)

Defined (3)

Do cc tin trnh n nh v c nh gi ng nn khi c cc trng hp ngoi l, s xc nh v ch r nhng nguyn nhn gy ra bin i.

69

d. M hnh 5 mc ca CMM
Tip tc ci tin tin trnh, c th xc nh c nhng im mnh v im yu ca tin trnh, c kh nng phn tch cc khim khuyt, xc nh cc nguyn nhn gy ra trnh cc khim khuyt ny.

Continuously improving process Predictable process Defined (3)

Optimizing (5)

Managed (4)

Standard,consistent process Disciplined process Initial (1) Repeatable (2)

70

35

9/6/2011

18 KPA (Key Process Area)


LEVEL 2: Repeatable 1. SW configuration management 2. SW quality assurance 3. SW subcontract management 4. SW project tracking and oversight 5. SW project planning 6. Requirements management 7. 8. 9. 10. 11. 12. 13. Peer reviews Intergroup coordination SW product engineering IntegratedSW management Training program Organization process definition Organization process focus 16. Process change management 17. Technology change management 18. Defect prevention

14. SW quality Management 15. Quantitative process management

LEVEL 3: Defined

LEVEL 4: Managed
LEVEL 5: Optimizing
71

Kh nng nhn nhn ti mi mc thun thc

72

36

9/6/2011

Kh nng tin trnh v d on theo cc mc ca CMM


Khi mc thun thc tng, s sai khc gia kt qu t c v kt qu d tnh gim xung. Khi mc thun thc tng, bin ng ca kt qu thc t so vi kt qu ra gim xung. Khi mc thun thc tng th cc kt qu s c ci thin. l, chi ph gim, thi gian pht trin ngn hn, cht lng v nng sut tng.

73

e. Cch thc s dng m hnh CMM


nh gi tin trnh phn mm (Software process assessments ) xc nh trng thi ca tin trnh phn mm hin ti ca t chc, xc nh mc u tin i vi cc vn c lin quan ti tin trnh phn mm khi x l chng v xy dng h thng h tr pht trin tin trnh phn mm. nh gi kh nng phn mm (Software capability evaluations) xc nh cc nh thu c t cch trin khai mt d n phn mm hoc qun l hin trng ca mt h thng phn mm c sn.
74

37

9/6/2011

Nhng im chung ca 2 phng thc s dng CMM

75

4.2. M hnh tuyn tnh


Cng ngh hc H thng / Thng tin v m hnh ha (System / Information engineering and modeling): thit lp cc yu cu, nh x mt s tp con cc yu cu sang phn mm trong qu trnh tng tc gia phn cng, ngi v CSDL

Phn tch

Thit k

Lp trnh

Kim th

Cng ngh hc H thng / Thng tin


76

38

9/6/2011

4.2. M hnh tuyn tnh


To m / lp trnh (Code generation / programming): Chuyn thit k thnh chng trnh my tnh bi ngn ng no . Nu thit k c chi tit ha th lp trnh c th ch thun ty c hc Kim th (Testing): Kim tra cc chng trnh v mun c v lgic bn trong v chc nng bn ngoi, nhm pht hin ra li v m bo vi u vo xc nh th cho kt qu mong mun

Phn tch

Thit k

Lp trnh

Kim th

Cng ngh hc H thng / Thng tin


77

4.2. M hnh tuyn tnh


H tr / Bo tr (Support / Maintenance): p ng nhng thay i, nng cp phn mm pht trin do s thay i ca mi trng, nhu cu

Phn tch

Thit k

Lp trnh

Kim th

Cng ngh hc H thng / Thng tin


78

39

9/6/2011

im yu ca M hnh tuyn tnh


Thc t cc d n t khi tun theo dng tun t ca m hnh, m thng c lp li (nh m hnh ca Boehm) Khch hng t khi tuyn b r rng khi no xong ht cc yu cu Khch hng phi c lng kin nhn ch i thi gian nht nh mi c sn phm. Nu pht hin ra li nng th l mt thm ha!

79

4.3. M hnh ch th (Prototyping model)

Nghe Khch trnh by

To / sa bn mu

Khch kim tra bn mu

80

40

9/6/2011

M hnh ch th: Khi no ?


Khi mi r mc ch chung chung ca phn mm, cha r chi tit u vo hay x l ra sao hoc cha r yu cu u ra Dng nh H s khai thu thp yu cu ngi dng qua cc thit k nhanh Cc gii thut, k thut dng lm bn mu c th cha nhanh, cha tt, min l c mu tho lun gi yu cu ca ngi dng

81

4.4. M hnh pht trin ng dng nhanh (Rapid Application Development: RAD)
L quy trnh pht trin phn mm gia tng, tng dn tng bc (Incrimental software development) vi mi chu trnh pht trin rt ngn (60-90 ngy) Xy dng da trn hng thnh phn (Componentbased construction) vi kh nng ti s dng (reuse) Gm mt s nhm (teams), mi nhm lm 1 RAD theo cc pha: M hnh nghip v, M hnh d liu, M hnh x l, To ng dng, Kim th v nh gi (Business, Data, Process, Appl. Generation, Test)

82

41

9/6/2011

M hnh pht trin ng dng nhanh


Business Modeling Data Team #2 Modeling Business Process Modeling Modeling Application Data Team #1 Generation Modeling Testing & Business Process Turnover

Team #3

Modeling

Data Modeling

Modeling Application Generation Testing & Process Turnover

Modeling Application Generation Testing & Turnover


60 - 90 days

RAD: Business modeling


Lung thng tin c m hnh ha tr li cc cu hi:
Thng tin no iu khin x l nghip v ? Thng tin g c sinh ra? Ai sinh ra n ? Thng tin i n u ? Ai x l chng ?

84

42

9/6/2011

RAD: Data and Process modeling


Data modeling: cc i tng d liu cn h tr nghip v (business). nh ngha cc thuc tnh ca tng i tng v xc lp quan h gia cc i tng Process modeling: Cc i tng d liu c chuyn sang lung thng tin thc hin chc nng nghip v. To m t x l cp nht (thm, sa, xa, khi phc) tng i tng d liu

85

RAD: Appl. Generation and Testing


Application Generation: Dng cc k thut th h 4 to phn mm t cc thnh phn c sn hoc to ra cc thnh phn c th ti dng li sau ny. Dng cc cng c t ng xy dng phn mm Testing and Turnover: Kim th cc thnh phn mi v kim chng mi giao din (cc thnh phn c c kim th v dng li)

86

43

9/6/2011

RAD: Hn ch ?
Cn ngun nhn lc di do to cc nhm cho cc chc nng chnh Yu cu hai bn giao ko trong thi gian ngn phi c phn mm hon chnh, thiu trch nhim ca mt bn d lm d n v RAD khng phi tt cho mi ng dng, nht l vi ng dng khng th mun ha hoc i hi tnh nng cao Mo him k thut cao th khng nn dng RAD

87

M u
Phn ln cc h phn mm phc tp u tin ha theo thi gian: mi trng thay i, yu cu pht sinh thm, hon thin thm chc nng, tnh nng Cc m hnh tin ha (evolutionary models) c tnh lp li. K s phn mm to ra cc phin bn (versions) ngy cng hon thin hn, phc tp hn Cc m hnh tiu biu:
Incremental Spiral WINWIN spiral Concurrent development model

88

44

9/6/2011

M hnh gia tng (The incremental model)


Kt hp m hnh tun t v tng lp li ca ch bn mu Sn phm li vi nhng yu cu c bn nht ca h thng c pht trin Cc chc nng vi nhng yu cu khc c pht trin thm sau (gia tng) Lp li quy trnh hon thin dn

89

M hnh gia tng


Gia tng 1
Phn tch Thit k Lp trnh Kim th

Xut xng 1

System/info. Engineering

Gia tng 2

Phn tch

Thit k

Lp trnh

Kim th

Xut xng 2

Gia tng 3

Phn tch

Thit k

Lp trnh

Kim th

Xut xng 3

Gia tng 4

Phn tch

Thit k

Lp trnh

Kim th

XX 4

Calendar time
90

45

9/6/2011

M hnh xon c (spiral)


Lp k hoch Phn tch ri ro

Giao tip khch hng

Khi nim Lm mi Nng cp Bo tr


Khch hng nh gi

K ngh

Xy dng & Xut xng

91

M hnh xon c (tip)


Giao tip khch hng: gia ngi pht trin v khch hng tm hiu yu cu, kin Lp k hoch: Xc lp ti nguyn, thi hn v nhng thng tin khc Phn tch ri ro: Xem xt mo him k thut v mo him qun l K ngh: Xy dng mt hay mt s biu din ca ng dng

92

46

9/6/2011

M hnh xon c (tip)


Xy dng v xut xng: xy dng, kim th, ci t v cung cp h tr ngi dng (t liu, hun luyn, . . .) nh gi ca khch hng: Nhn cc phn hi ca ngi s dng v biu din phn mm trong giai on k ngh v ci t

93

M hnh xon c: Mnh v yu?


Tt cho cc h phn mm quy m ln D kim sot cc mo him tng mc tin ha Kh thuyt phc khch hng l phng php tin ha xon c c th kim sot c Cha c dng rng ri nh cc m hnh tuyn tnh hoc ch th

94

47

9/6/2011

M hnh xon c WINWIN


Nhm tha hip gia ngi pht trin v khch hng, c hai cng Thng (win-win)
Khch th c phn mm tha mn yu cu chnh Ngi pht trin th c kinh ph tha ng v thi gian hp l

Cc hot ng chnh trong xc nh h thng:


Xc nh c ng (stakeholders) Xc nh iu kin thng ca c ng Tha hip iu kin thng ca cc bn lin quan

95

M hnh xon c WINWIN


2. Xc nh iu kin thng ca c ng 1. Xc nh mc tip ca c ng 4. nh gi tin trnh v d kin sn phm, gii quyt ri ro 3a. Ha hp iu kin thng 3b. Thit lp mc tiu mc tip v cc rng buc, d kin

7. Xt duyt v nh gi 6. Kim nh sn phm v quy trnh

5. Xc nh mc tip ca sn phm v quy trnh, k c phn chia nh

96

48

9/6/2011

M hnh pht trin ng thi (concurrent development)


Xc nh mng li nhng hot ng ng thi (Network of concurrent activities) Cc s kin (events) xut hin theo iu kin vn ng trng thi trong tng hot ng Dng cho mi loi ng dng v cho hnh nh kh chnh xc v trng thi hin trng ca d n Thng dng trong pht trin cc ng dng khch/ch (client/server applications): h thng v cc thnh phn cu thnh h thng c pht trin ng thi

97

Component-based model
Gn vi nhng cng ngh hng i tng (Object-oriented technologies) qua vic to cc lp (classes) c cha c d liu v gii thut x l d liu C nhiu tng ng vi m hnh xon c Vi u im ti s dng cc thnh phn qua Th vin / kho cc lp: tit kim 70% thi gian, 80% gi thnh, ch s sn xut 26.2/16.9 Vi UML nh chun cng nghip ang trin khai
98

49

9/6/2011

M hnh da thnh phn


Lp k hoch Phn tch ri ro
Xc nh thnh phn ng vin

Giao tip khch hng

Xy dng bc lp th n ca h thng

Tm thnh phn t th vin

Khch hng nh gi

K ngh Xy dng & Xut xng

t thnh phn vo th vin

Ly thnh phn nu c

Xy dng thnh phn nu kh.c

99

4.7. M hnh RUP (Rational Unified Process)


SV t nghin cu

100

50

9/6/2011

4.8. Cc k thut th h 4 (Fourth generation techniques)


Tp hp cc cng c cho php xc nh c tnh phn mm mc cao, sau sinh t ng m ngun da theo c t Cc cng c 4GT in hnh: ngn ng phi th tc cho truy vn CSDL; to bo co; x l d liu; tng tc mn hnh; to m ngun; kh nng ha bc cao; kh nng bng tnh; kh nng giao din Web; vv

101

4GT: Ti sao ?
T thu thp yu cu cho n sn phm: i thoi gia khch v ngi pht trin l quan trng Khng nn b qua khu thit k. 4GT ch p dng trin khai thit k qua 4GL Mnh: gim thi gian pht trin v tng nng sut Yu: 4GT kh dng hn ngn ng lp trnh, m kh ti u v kh bo tr cho h thng ln cn k nng ca k s phn mm Tng lai: 4GT vi m hnh theo thnh phn

102

51

9/6/2011

5. Sn phm v quy trnh (Product and process)


Quy trnh yu th sn phm kh m tt, song khng nn coi trng qu mc vo quy trnh hoc qu mc vo sn phm Sn phm v quy trnh cn c coi trng nh nhau

103

52

9/6/2011

PHN II: QUN L D N PHN MM


I. Khi nim
1. 2. 3. 4. D n Qun l d n Cc nhim v qun l d n Gii quyt bi ton qun l d n

II. Nguyn l v quy trnh qun l d n III. K nng, k thut qun l d n IV. Cc yu t quyt nh thnh cng ca d n

1. D n (project)
Mt d n l mt cng vic c thi hn nhm to ra mt sn phm, dch v hay kt qu duy nht.
Temporariness : c im bt u v im kt thc Uniqueness :
D n l ring bit, c lp C sn phm c th cui cng Sn phm hoc mi trng d n l duy nht Mang li yu t mi cho i ng thc hin

D n cn c qun l vi gi nh s xy ra thay i.
2

9/6/2011

D n phn mm
Do i ng thnh vin gm t nht 2 ngi thc hin Gii hn v thi gian, ngn sch, v nhn lc Sn phm l phn mm mi hoc phn mm c sn c ci tin Sn phm phi gp phn to dng quy trnh nghip v mi, hu ch, hoc mang li li ch ng k cho quy trnh nghip v hin c.

2. Qun l d n
Qun l d n l p dng kin thc, k nng, cng c v k thut vo cc hot ng ca d n nhm p ng yu cu ca d n. (PMBOK)
t mc tiu d n t hoc vt cc yu cu hay k vng ca nhng ngi c quyn li v ngha v lin quan (stakeholders) Cn bng gia cc yu t: thi gian, chi ph, cht lng sn phm

9/6/2011

Cost + Schedule + Quality


Qun l d n l a ra mt sn phm cui cng:
trong phm vi ngn sch hay ngun ti chnh cho php ng hn vi ngun lc cho php ph hp vi c t cht lng phc v cc nhu cu kinh doanh v p ng cc tiu chun chuyn mn v k vng ca cng tc qun l

3. Cc nhim v trong qun l d n


KiM SOT (CONTROLLING) Ai thm nh kt qu ? Da vo cc tiu chun no ?

CH O (DIRECTING) Ai quyt nh ci g, khi no? TI NGUYN CA D N

LP K HOCH (PLANNING) Nhm ti mc tiu no, ti sao?

TO NG LC (MOTIVATION) iu g khin mi ngi c th bc l nhng phm cht tt nht trong cng vic ?

T CHC (ORGANIZING) Lin quan n ci g, ti sao?


6

9/6/2011

4. Cc lnh vc qun l d n
Project

3 2
People People Process
7

Product

PHN II: QUN L D N PHN MM


I. Khi nim II. Nguyn l v tin trnh qun l d n
1. 2. 3. 4. Gii quyt bi ton qun l d n Sng lc d n Nhim v ca ngi qun l d n Cc pha qun l d n

III. K nng, k thut qun l d n IV. Cc yu t quyt nh thnh cng ca d n


8

9/6/2011

1. Gii quyt bi ton qun l d n


PROCESS INPUTS (Typical) Process Maturity, Methodology, Benchmarking and Optimization, Constraints, Templates, Infrastruc-ture, Policy and Cultural Framework PROCESS OUTPUTS (Selected Examples)

Information Technology Qualitative & Quantitative Tools Outputs of Other Processes Material Inputs Stakeholder Interaction Requests, Instructions
Quality of Process Inputs, Knowledge, Competence, Experience, Insight, Ability, Communication, Cooperation, Coordination

Project Business Case Opt. Project Portfolio Mix Project Feasibility Report

PROCESS STEPS

Project Master Plan (or Subsidiary Plans) Customer Change Request Revised Cost and Schedule Baseline Project Status Report
Project management uses processes extensively to produce deliverables (see small sample above). Some processes are quite complex and have a high risk 9 of error.

Transformation of Inputs to Outputs

TIME & COST


Process Effectiveness and Efficiency

Given that the output of one project management process normally becomes input to another, deficiencies in one or more processes will consequently reverberate across the entire process chain

2. Sng lc d n
Tp trung vo s a dng ca cc thnh vin trong nhm v phc tp ca cng vic:

Project Proposal Idea Need / Strategic Fit/ ROI / Payback Risk

Data Collection and Back-Up Self-Evaluation of Project Criteria Priority Team Evaluates Proposal and Reviews Portfolio for Risk Balance

Xem xt cc s vic khc nhau cc gc khc nhau, xut pht t thnh vin v cc cng vic cn lm S dng quy trnh Plan Do - Check - Act Ngi qun l d n gii phi tm ra cc nng lc tim n ca tng thnh vin v s dng y cc nng lc .

Periodic Assessment of Priorities

Return for More Information

Reject

Hold for Resources

ROI: return on investment

Assign Priority, Resources, Project Manager & Evaluate Progress 10

9/6/2011

3. Nhim v ca ngi qun l d n


Lm th no tng kh nng:
To ra sn phm c cht lng Tn trng lch trnh thc hin Tha mn yu cu ca khch hng To kh nng kinh doanh t c thnh cng

Leadership Team Steering Group Project Director Sponsors Internal Liaison Line Departments Other Projects IT

Project Manager
Project Team Participants Deliverables Tasks

External Liaison Trading Partners Suppliers Contractors

11

PM = Tm im giao tip
Khng phi l cng vic bn thi gian Phi bit chu k sng ca d n, cc tin trnh ca d n v vai tr ca cc tin trnh ny trong vic thc hin cc cng vic cc pha khc nhau trong chu k sng ca d n Nhn bit c s phc tp ca mi trng thc hin d n Phi c chun b i ph vi cc mi xung t khc nhau

Hu ht cc d n tht bi v thiu qun l d n v qun l con ngi, khng phi v l do k thut


12

9/6/2011

Bi tp
Phn bit vai tr, nhim v ca ngi qun l (managers) v ngi lnh o (leaders) Cc k nng ngi qun l d n cn c

13

4. Cc pha qun l d n
nh ngha v thit k d n
Lp k hoch qun l Kt thc d n Phn b li ch

Cc giai on

Thc thi phc tp, vi nhiu giai on v qu trnh Tun th tuyt i vng i nghip v, t vic nh ngha, chng minh tnh kh thi, cho n khi phn b li ch cho doanh nghip Cc k nng qun l d n l rt cn thit ngay t u: hiu bit r v cc quy trnh ca d n + c tnh ng tin cy + lp, xem xt k hoch d n mt cch cn thn Cc lnh vc v quy trnh b tr lm gip m bo lng tin rng d n s to ra mt kt qu c gi tr
16

9/6/2011

4. Cc pha qun l d n
nh ngha v thit k d n Kt thc d n Lp k hoch qun l Phase / Stage Phn b li ch

Mobilisation

Management Control Reporting

Q A

Mt d n c th tri qua nhiu giai on, mi giai on c mc tiu v kt qu cn t khc nhau. Cc giai on thng yu cu cc k nng, cu trc v mc ti nguyn khc nhau. Vic lp k hoch, c lng chi ph v phn b ti nguyn ring cho tng giai on l bnh thng.

17

4. Cc pha qun l d n
nh ngha v thit k d n Kt thc d n Lp k hoch qun l Phase / Stage Phn b li ch

Mobilisation

Management Control Reporting

Q A

Benefit tracking & management Quality management Risk management Issue management Scope change control Configuration management Documentation Control Team building, collaboration & internal communication Organisational change management External communication Procurement & Accounting Subcontractor management

R xt vic thc hin d n

18

9/6/2011

PHN II: QUN L D N PHN MM


I. Khi nim II. Nguyn l v tin trnh qun l d n III. K nng, k thut qun l d n
1. 2. 3. 4. 5.

IV. Cc yu t quyt nh thnh cng ca d n

Qun l ri ro hnh thc nh lng gi v lch biu Qun l d n trn c s cc o Theo di cc gi tr gia tng Theo di cc hu qu nh hng cht lng mc tiu 6. Qun l chng trnh hng con ngi

19

M u
Qun l d n bao gm k nng qun l chung (general management) v k nng lnh o (leadership), c tnh n cc yu t c nhn.
Phng php k thut lp k hoch, lp d ton, kim sot cng vic t c mt kt qu mong mun ng hn, trong phm vi ngn sch v ph hp vi c t k thut Quy trnh c lp, gm cc hot ng phi hp, kim sot c, c thi hn r rng, c thc hin nhm t c mt mc tiu ph hp vi yu cu c th v chi ph, thi gian v ngun lc. Lp k hoch, t chc, ch o v kim sot cc ngun ti nguyn ca cng ty cho mt mc tiu tng i ngn hn nhm tin ti hon thnh mc ch v cc mc tiu c th.

20

9/6/2011

1. Qun l ri ro
Ri ro l g ?
Nhng s kin c th lm ph v mt d n Nhng iu khng chc chn, nhng khon n hay nhng im yu c th lm cho d n khng i theo ng k hoch nh
C th qun l c ri ro

Ti sao cn qun l ri ro ?
Tt c cc d n u ph thuc vo ri ro Tin trnh s khng ng theo k hoch trong mt s giai on ca d n

Khng th loi tr ht ri ro

Khi no cn qun l ri ro ?
Khi Khi Khi Khi Khi lp k hoch qun l d n sn sng thc thi khi phc mt d n b d r xt d n c s sai lch ln so vi k hoch xy ra

Gim thiu nh hng ca cc s c khng bit trc cho d n Nng cao xc sut thc hin thnh cng d n To ra thc kim sot C c cc gii php hiu qu v kp thi
21

Quy trnh qun l ri ro


Gim ti thiu nh hng ca nhng s c khng bit trc cho d n bng cch xc nh v a ra nhng gii php tnh hung trc khi c nhng hu qu xu xy ra
Phn tch Qun l Gim st

Xc nh
Xc nh mc ri ro ban u ca d n bc 1

lp thnh vn bn cc ri ro c th bc 2 Phn tch nh hng ri ro bc 3 Xy dng v trin khai k hoch qun l ri ro bc 4 gim st v cp nht cc ti liu ri ro 22

10

9/6/2011

V d
Chm tin xy dng phn mm v cc LTV gp phi nhiu kh khn trong giai on lp trnh hn d on. Vi tin hin ti, xc sut cc LTV khng th p ng cc s kin sp ti ng hn l khong 30 %. Hnh ng ngn nga c th gm:
Gim thiu ri ro: o to hun luyn b sung cho cc LTV Loi b ri ro: hp ng thu khon chuyn mn vi cc LTV giu kinh nghim

23

2. Qun l cht lng


Thch hp vi mc ch Gim ti a s lng ph bng cch thc hin ng ngay t ln u Cn bng cht lng
Mc ch

Tho mn nhu cu Phng php Thc hin

24

11

9/6/2011

Quy trnh qun l cht lng


1.Lp k hoch cht lng 2.Thit lp khung m bo cht lng 3. Tin hnh cc hot ng kim sot cht lng 4. Trin khai cc hat ng hiu chnh

25

3. Kim sot d n v lp bo co
Lp bo co v kim sot d n l nn tng qun l d n
Kim sot d n: Nm bt v qun l tin trnh Lp bo co d n: Truyn b hiu qu nhng kin thc ny

Qun tr vin d n c th:


Bo co khch quan v thc trng d n Xc nh nhng cn tr v hnh ng hiu chnh Trin khai cc gii php Hiu s nh hng ca cng vic tng lai a ra nhng quyt nh hp l da trn thng tin xc thc

26

12

9/6/2011

Lp bo co
Qun tr vin d n, trng nhm v thnh vin nhm phi:
Lng nghe tin nhn chuyn n Chp nhn tin xu v tt H tr tch cc cc thnh vin trong nhm vt qua tr ngi

27

Trao i tnh trng d n


Tp trung vo cc thnh tu ca cc mc tiu kinh doanh, ch khng phi vo quy trnh d n a ra thng tin chnh xc tin cy da trn k hoch d n Nu bt nhng im ngoi l so vi k hoch Cung cp thng tin kp thi Bao gm c mc n lc c th chp nhn

28

13

9/6/2011

Lp bo co WBS
Mc WBS 1 D n Giai on

Phm vi

3
Chi tit i d n

Hot ng

Quan st bn ngoi

Nhim v

Bc t/h
29

Lp bo co WBS
C nhiu cch phn chia cng vic: theo sn phm cn bn giao, theo quy trnh, theo mc thi gian, v.v.
<Chart Form WBS> <Tabular Form WBS>

1 Project Management 1.1 Planning 1.1.1 Scope Statement 1.1.2 Activity List 1.1.3 Resource Plan 1.1.4 Time Estimate 1.1.5 Cost Estimate 1.1.6 Risk Analysis 1.1.7 Schedule 1.1.8 Project Management Plan 1.2 Executing 2 Design

14

9/6/2011

Lp k hoch, theo di, bo co


Cc mc tiu kinh doanh Bo co cc vn

Xc nh kt qu bn giao

Xc nh vn

Kt qu bn giao

Bo co thc trng

xc nh k hoch D liu hin ti - y - c gng - chi ph K hoch cp nht

Cc bo co t k hach

K hoch hot ng

tham gia ca vn phng d n 31

Quy trnh lp bo co v kim sot d n


k hoch cng vic chi tit theo di v r xt cc d kin mc tiu r xt cc KQBG v n lc
d liu nhim v d liu tin trnh k hoch qun l KH cng vic chi tit d liu hon thin kim sot khc khc qun l ngun lp bo co hin trng xu hng ngun ti chnh thay i phin bn gii php vn cht lng phn tch hot ng hiu chnh qun l thc hnh Replan/ Rebaseline

bo co v phn tch tin trnh

Ti nh hng d n

32

15

9/6/2011

Khun kh kim sot d n


Mc kim sot Cng vic kim sot Bo co

B/c Ban iu hnh

k hoch qun l

Ban iu hnh
B/c Qun tr vin d n

k hoch qun l k hoch cng vic chi tit k hoch cng vic chi tit Qun tr vin d n

B/c trng nhm

Trng nhm
B/c thnh vin nhm

danh mc nhim v Nhm

33

Chu k kim sot d n


Nu r rng chu k cc s kin cho vic lp bo co thc trng Xc nh cc thng tin thng thng c yu cu vi cc mc iu hnh, qun l, nhm Thit lp thi gian biu cho vic lp bo co yu cu i vi tng mc

Ai
HQT Cc gim c d n Cc gim c d n Cc nh ti tr kinh doanh Ch thc hin Ch thc hin Qun tr vin d n Qun l kinh doanh U ban iu hnh

Khi no
hng thng: th su 2 tun 1 ln: th t

Qun l n v kinh doanh Nhm v Qun tr vin d n

2 tun 1 ln:

th hai

hng tun: th su

Cc bo co v bin bn hin trng lm theo quy nh ca VPDA

34

16

9/6/2011

4. Qun l thay i v vn pht sinh


Thay i l g ?
Bt c hot ng no thay i phm vi, kt qu bn giao, kin trc c bn, chi ph, lch trnh ca mt d n

Ti sao cn phi qun l thay i v vn pht sinh ?


Thay i v vn pht sinh l 2 l do thng lm d n tht bi

Lm th no kim sot thay i v gii quyt cc vn pht sinh ?


Gim ri ro d n nh quy trnh hiu qu qun l thay i v vn Cc thnh vin nhm hiu c quy trnh qun l thay i v vn Ghi chp y v cc yu cu thay i/ vn
35

Kim sot ngun thay i tim nng


Cc nh gi khc nhau ca ngi s dng Cc yu cu mi v a ra nhng khm ph Lut php Kim tra n v Khi Tch hp Chp thun

Xut hin nh cung cp phn mm mi

cc t chc bn ngoi

Cc ngun thay i tim nng

Tinh chnh m ngun Khch quan Ch quan

Cc quyt nh v chnh sch v nghip v R xt kim sot cht lng

Cc ngun c th ca d n Chuyn i

36

17

9/6/2011

Kim sot chi ph thay i

Req. Design

Code

Test

Live
37

5. Qun l cu hnh
Quan nim sai v qun l cu hnh:
y l vn v LANs, WANs, phn cng, ... y l cc hot ng mang tnh k thut cao N lin quan rt t n qun l d n

Qun l cu hnh lm g ?
Cung cp vic truy cp an ton v n gin i vi bn sao tng th v cc kt qu bn giao c thng qua. Kim sot c thc trng ca cc kt qu bn giao v mi quan h qua li ln nhau gia cc kt qu ny.

38

18

9/6/2011

K thut v quy trnh qun l cu hnh


Cung cp mt kho cha an ton i vi cc kt qu bn giao Cho php vic kim sot v tit l c nguyn tc cc kt qu bn giao thng qua vng i ca n, vi y cc du tch lch s, m bo phin bn ng v cp nht, c kim tra v pht hnh Kim sot thay i cu cc kt qu bn giao, m bo cc kt qu ny c lu theo ng th t Cung cp vic lp bo co v hin trng ca cc kt qu bn giao v nhng thay i ca chng
39

Kim sot phin bn

0.1

0.2

0.n

1.1

1.2

1.n

Approved

1.0

2.0
40

19

9/6/2011

Cc chc nng qun l cu hnh


Tr li mc c Cp nht (3) Gi mc & baseline (4)

Ly mc cp nht (2)

Kho QL Cu hnh

Backup / lu gi (5)

B sung khon mc mi (1)

Cc bo co Kim sot (6)


41

PHN II: QUN L D N PHN MM

I. II. III. IV.

Khi nim Nguyn l v quy trnh qun l d n K nng, k thut qun l d n Cc yu t quyt nh thnh cng ca d n

42

20

9/6/2011

Bi tp: T l thnh cng ca d n phn mm l bao nhiu ?


90% 70% 50% 30% ? ? ? ?

Ti sao cc d n li tht bi ? iu g khin mt d n thnh cng ?

43

D n no l thnh cng ? D n no tt hn ?
H thng A
Bn giao h thng ng hn Hon thnh d n vi kinh ph c cp Hu nh khng dng n sau khi nghim thu

H thng B
Tr hn Cn thm vn u t hon thnh d n c s dng hn 10 nm

44

21

9/6/2011

D n no l tht bi ?
Mt d n m:
Khng t c cc mc tiu ca d n, v/hoc B vt qu ngn sch t nht 30% Ti sao d n tht bi ?
Khng quen thuc vi phm vi v s phc tp ca d n: 17% l do khc: 12%

thiu thng tin: 21% Khng r cc mc tiu: 18%

qun l d n khng tt: 32%


45

Nguyn nhn tht bi ca Project


Cn b khng hiu cc yu cu ca khch hng Phm vi ca d n khng r rng Qun l thay i yu km Cng ngh c la chn b thay i Cc yu cu nghip v b thay i Hn cng vic khng thc t Khch hng cn tr Nh ti tr b thay i Thiu cn b c k nng thch hp Cc nh qun l lng trnh cc kinh nghim v cc bi hc tt.
46

22

9/6/2011

trnh tht bi
Ci t vic qun l d n Nghin cu kh thi Tng s thnh vin tham gia Tng cc phng sch t bn ngoi Khng phi nhng l do trn
0 10 20 30 40 50 60 70 80 p ng 90 %

47

Cc mc nh gi thnh cng ca mt d n

Future Potential Business Success

Level 4 Level 3 Level 2 Level 1


48

Project Success

Project Management Success

23

9/6/2011

Yu t thnh cng ca d n
Bt u bng i x ng vi ng quyn hn Lun quan tm, theo di nh k Lun theo di ghi chp tin trnh Ra quyt nh ng n, sng sut Tin hnh phn tch c rt bi hc kt thc d n.

49

10 quy tc vng
Qun l d n thnh cng chnh l vn v con ngi
nhng khng c qun qun tr

Khm ph cc ngun h tr v chng S hin din c th l di tr - xem xt lch trnh n ng sau Phi hiu rng nhng con ngi khc nhau th c nhng cch nhn khc nhau
hy t mnh vo a v ca h

Thit lp k hoch ca bn sao cho c th chnh sa d dng i mt vi tng s kin nh l n c t trc S dng qun tr h tr cho cc mc ch ca d n Thi gian mc tiu i vi tng nhim v khng c ging nh nu trong k hoch c li phm vi v cc mc tiu ca d n mi tun 1 ln Khng ngc nhin!

50

24

9/6/2011

Nguyn tc 5W2H (Boehm)


Ti sao h thng ang c pht trin (Why) Nhng ci g s c hon thnh (What) Khi no (When)? Ai s chu trch nhim v 1 chc nng(Who) N s c t u trong t chc (Where) Cng vic s c hon thnh v mt K thut v c qun tr nh th no (How) Lng ti nguyn cn thit (How)?

51

Kt lun
Qun l d n phn mm l hot ng bao trm cc hot ng sn xut phn mm. Bn lnh vc chnh l 4P: People, Product, Process, Project Nhn t chnh l Con ngi. Cc k thut khc nhau v giao tip v phi hp c dng h tr cng tc nhn s. Qun l d n nhn mnh cng tc nh gi, lng ho, k hoch v kim sot ri ro.

52

25

9/13/2011

PHN III: PHNG PHP XC NH YU CU NGI DNG

I. Tng quan v yu cu phn mm II. Quy trnh xc nh yu cu phn mm III. Cng c v phng php c t yu cu phn mm IV. Nguyn l phn tch yu cu s dng
1

1. Khi nim
Cc c tnh ca h thng hay sn phm do khch hng - ngi s dng phn mm - nu ra Xc nh c phn mm p ng c cc yu cu v mong mun ca khch hng - ngi s dng phn mm

Lnh vc ng dng ca h thng/sn phm Nhu cu v rng buc ca nhng ngi c quyn li v ngha v lin quan n h thng /sn phm

Bi ton ca khch hng cn gii quyt

Ng cnh nghip v: tng tc ca h thng/sn phm v ng gp v mc nghip v ca h thng


2

9/13/2011

Ti sao cn phi t ra yu cu phn mm ?


Khch hng ch c nhng tng cn m h v phn mm cn phi xy dng phc v cng vic ca h, chng ta phi sn sng, kin tr theo ui i t cc tng m h n Phn mm c y cc tnh nng cn thit Khch hng rt hay thay i cc i hi ca mnh, chng ta nm bt c cc thay i v sa i cc m t mt cch hp l
3

2. Phn loi
Theo 4 thnh phn ca phn mm:
Cc Cc Cc Cc yu yu yu yu cu cu cu cu v v v v phn mm (Software) phn cng (Hardware) d liu (Data) con ngi (People, Users)

Theo cch c t phn mm


Cc yu cu chc nng Cc yu cu ngoi chc nng Cc rng buc khc

9/13/2011

II. Quy trnh xc nh yu cu PM


Pht hin cc yu cu phn mm (Requirements elicitation) Phn tch cc yu cu phn mm v thng lng vi khch hng (Requirements analysis and negotiation) c t cc yu cu phn mm (Requirements specification) M hnh ha h thng (System modeling) Kim tra tnh hp l ca cc yu cu phn mm (Requirements validation) Qun tr cc yu cu phn mm (Requirements management)
5

V d: Quy trnh xc nh yu cu phn mm hng i tng


Requirements Elicitation Requirements Analysis System Design Object Design Implementation Testing

Expressed in Terms Of

Structured By

Implemented By Realized By Verified By


class... class... class...

?
class.... ?

Use Case Model

Application Implementat Domain SubSystems ion Domain Objects Objects

Source Code

Test Cases
6

Or textual requirements

9/13/2011

1. Pht hin yu cu phn mm


nh gi tnh kh thi v k thut v nghip v ca phn mm nh pht trin Tm kim cc nhn s (chuyn gia, ngi s dng) c nhng hiu bit su sc nht, chi tit nht v h thng gip chng ta xc nh yu cu phn mm Xc nh mi trng k thut trong s trin khai phn mm Xc nh cc rng buc v lnh vc ng dng ca phn mm (gii hn v chc nng/hiu nng phn mm)
7

1. Pht hin yu cu phn mm


Xc nh cc phng php s dng pht hin cc yu cu phn mm: phng vn, lm vic nhm, cc bui hp, gp g i tc, v.v. Thu ht s tham gia ca nhiu chuyn gia, khch hng chng ta c c cc quan im xem xt phn mm khc nhau t pha khch hng Xc nh cc yu cu cn nhp nhng lm mu th Thit k cc kch bn s dng ca phn mm gip khch hng nh r cc yu cu chnh.
8

9/13/2011

u ra ca bc pht hin yu cu phn mm


Bng k (statement) cc i hi v chc nng kh thi ca phn mm Bng k phm vi ng dng ca phn mm M t mi trng k thut ca phn mm Bng k tp hp cc kch bn s dng ca phn mm Cc nguyn mu xy dng, pht trin hay s dng trong phn mm (nu c) Danh sch nhn s tham gia vo qu trnh pht hin cc yu cu phn mm - k c cc nhn s t pha cng ty- khch hng
9

2. Phn tch cc yu cu PM v thng lng vi khch hng


Software Engineering Group

Customer Group

10

9/13/2011

2. Phn tch cc yu cu PM v thng lng vi khch hng


Phn loi cc yu cu phn mm v sp xp chng theo cc nhm lin quan Kho st t m tng yu cu phn mm trong mi quan h ca n vi cc yu cu phn mm khc Thm nh tng yu cu phn mm theo cc tnh cht: ph hp, y , r rng, khng trng lp Phn cp cc yu cu phn mm theo da trn nhu cu v i hi khch hng / ngi s dng Thm nh tng yu cu phm mm xc nh chng c kh nng thc hin c trong mi trng k thut hay khng, c kh nng kim nh cc yu cu phn mm hay khng
11

2. Phn tch cc yu cu PM v thng lng vi khch hng


Thm nh cc ri ro c th xy ra vi tng yu cu phn mm nh gi th (tng i) v gi thnh v thi gian thc hin ca tng yu cu phn mm trong gi thnh sn phm phn mm v thi gian thc hin phn mm Gii quyt tt c cc bt ng v yu cu phn mm vi khch hng / ngi s dng trn c s tho lun v thng lng cc yu cu ra

12

9/13/2011

3. c t yu cu phn mm
c t cc yu cu phn mm: xy dng cc ti liu c t, trong c th s dng ti cc cng c nh: m hnh ha, m hnh ton hc hnh thc (a formal mathematical model), tp hp cc kch bn s dng, cc nguyn mu hoc bt k mt t hp cc cng c ni trn Phng php c t:
c t phi hnh thc (Informal specifications): vit bng ngn ng t nhin c t hnh thc (Formal specifications): vit bng tp cc k php c cc quy nh v c php (syntax) v ng ngha (sematic) rt cht ch, th d k php ha dng cc lu .

Tiu ch nh gi cht lng ca h s c t:


Tnh r rng, chnh xc Tnh ph hp Tnh y , hon thin

13

V d: Cc yu cu v h s c t
c t hnh vi bn ngoi ca HT c t cc rng buc v ci t D thay i Dng nh cng c tham kho cho bo tr S ghi chp cn thn v vng i ca HT, ngha l d on cc thay i Cc p ng vi cc s c khng mong i

14

9/13/2011

3.1. Cc thnh phn ca h s c t


c t vn hnh hay c t chc nng (Operational specifications) m t cc hot ng ca h thng phn mm s xy dng:
Cc dch v m h thng phi cung cp, H thng s phn ng vi u vo c th ra sao, Hnh vi ca h thng trong cc tnh hung c bit.

c t m t hay c t phi chc nng (Descriptive specifications): c t cc c tnh, c trng ca phn mm:

Ngoi ra cn c yu cu v lnh vc, bt ngun t lnh vc ca ng dng h thng v cc c trng ca lnh vc ny.
15

Cc rng buc v cc dch v hay cc chc nng h thng cung cp nh thi gian, rng buc v cc qu trnh pht trin, cc chun,

c t chc nng
Miu t cc chc nng ca h thng, ph thuc vo kiu phn mm v mong i ca ngi dng
Tng tc gia phn mm v mi trng, c lp vi vic ci t V d: The watch system must display the time based on its location

Cc cng c c t tiu biu:


Biu lung d liu (Data Flow Diagrams) My trng thi hu hn (Finite State Machines) Mng Petri (Petri nets), Tuy nhin khng bt buc v c th dng ngn ng t nhin.
16

9/13/2011

c t phi chc nng v rng buc


Yu cu phi chc nng: nh ngha cc kha cnh s dng phn mm, khng lin quan trc tip ti cc hnh vi chc nng:
The response time must be less than 1 second

Cc tnh cht ca h thng nh tin cy, thi gian tr li, dung lng b nh,

Rng buc: do khch hng hay mi trng thc thi phn mm t ra


The implementation language must be COBOL

Cc yu cu do t chc qui nh nh qui nh chun v qu trnh tin hnh, chun ti liu, Cc yu cu t bn ngoi
Must interface to the dispatcher system written in 1956.

Thng s dng cc cng c

Biu thc th lin kt (Entity-Relationship Diagrams) c t Logic (Logic Specifications) c t i s (Algebraic Specifications)

Kh pht biu chnh xc, Rt kh kim tra


17

3.2. Ti liu yu cu
Ti liu v yu cu l cc pht biu chnh thc v ci c yu cu bi cc nh pht trin HT N bao gm c 2 phn: nh ngha v c t yu cu N khng phi l ti liu thit k. Tt hn c th n ch l 1 tp cc ci m HT phi lm hn l HT phi lm th no (PT ch khng phi l TK)

18

9/13/2011

Ni dung cn c ca ti liu yu cu
System customers Specify t he req uiremen ts and read th em to ch eck that they meet th eir n eeds. Th ey specify changes to the requ irements Use the requirements d ocumen t to pl an a bid for the s ys tem and to plan th e sy stem developmen t p rocess

Managers

System engineers

Use the requirements to understan d wh at s ystem i s to b e dev elo ped

System test engineers

Use the req uirements to d ev elo p valid ation tes ts for t he system

System maintenance engineers

Us e t he requirement s to help understan d th e system and the relationsh ip s b etween its parts

19

III. Phng php v cng c c t yu cu phn mm


Biu phn cp chc nng - WBS (work break down structure) Biu lung d liu DFD (data flow diagram) My trng thi FSM (Finite state machine) S thc th lin kt ERD (entity relation diagram)

20

10

9/13/2011

1. c t chc nng vi DFD


H thng (System): tp hp cc d liu (data) c x l bng cc chc nng tng ng (functions) Cc k php s dng:
Th hin cc chc nng (functions)

Th hin lung d liu


Kho d liu Vo ra d liu v tng tc gia h thng v ngi s dng
21

V d: m t biu thc ton hc bng DFD


(a+b)*(c+a*d)-e*(a+b)

b a + a * d

22

11

9/13/2011

V d c t cc chc nng ca th vin qua DFD


Yu cu t ngi mn

Sch
Kho sch
Tn tc gi

Tn sch, tc gi Tn ngi mn

Danh sch tc gi
Tn sch

C sch

Sch

Thng tin v sch

Danh sch tn sch

Tn sch; Tn ngi mn

Danh sch ngi mn Danh sch ch


Ch

Tm theo ch

Lit k cc tn sch lin quan n ch

Ch yu cu

a ra Tn sch
23

Cc hn ch ca DFD
ngha ca cc k php s dng c xc nh bi cc nh danh la chn ca NSD V d: DFD ca chc nng tm kim sch:
If NSD nhp vo c tn tc gi v tiu sch Then tm kim sch tng ng, khng c th thng bo li Elseif ch nhp tn tc gi Then hin th danh sch cc sch tng ng vi tn tc gi nhp v yu cu NSD la chn sch Elseif ch nhp tiu sch Then ... Endif

24

12

9/13/2011

Cc hn ch ca DFD
Trong DFD khng xc nh r cc hng thc hin (control aspects)
A B C D F E

Biu DFD ny khng ch r u vo l g thc hin chc nng D v u ra l g sau khi thc hin chc nng D.

Chc nng D c th cn c A, B v C Chc nng D c th ch cn mt trong A, B v C thc hin Chc nng D c th kt xut kt qu cho mt trong E v F Chc nng D c th kt xut kt qu chung cho c E v F Chc nng D c th kt xut kt qu ring cho c E v F

25

Cc hn ch ca DFD
DFD khng xc nh s ng b gia cc chc nng / m-un
A x l d liu v B c hng (nhn) cc kt qu c x l t A A v B l cc chc nng khng ng b (asynchronous activities) v th cn c buffer ngn chn tnh trang mt d liu

26

13

9/13/2011

2. c t trng thi vi FSM - Finite State Machines


FSM cha
Tp hu hn cc trng thi Q Tp hu hn cc u vo I Cc chc nng chuyn tip

:QxIQ High pressure alarm High temp. alarm ON Restart


27

OFF

V d: th vin
Xt cc giao dch:
Mn sch / Tr sch Thm u sch / Loi b u sch Lit k danh sch cc u sch theo tn tc gi hay theo ch Tm kim sch theo cc yu cu ca ngi mn Tm kim sch qu hn tr, . . .

28

14

9/13/2011

c t cc yu cu c bit ca th vin
c gi khng c mn qu mt s lng sch nht nh, trong mt thi gian nht nh Mt s sch khng c mn v Mt s ngi khng c mn mt s loi sch no , . . .

29

c t cc i tng trong th vin


Cc i tng:
Tn sch M quyn Nhn vin phc v Ngi mn

Cn c:
tp hp (danh sch) cc tiu sch danh sch cc tc gi cho tng quyn sch, danh sch cc ch lin quan ca cc quyn sch

30

15

9/13/2011

FSM c t trng thi


Ta c tp hp cc sch (mi u sch c th c nhiu quyn sch trong th vin). Mi quyn sch c th c 1 trong 5 trng thi sau:
(AV) Available: c php mn, (CO) - (BR): mn (Check Out; Borrow), (L): Last, (R): Remove
CO AV

BR

31 C th c hn ch v s sch c mn cho 1 nhm c gi hoc mi c gi, . . .

3. c t d liu vi M hnh thc th lin kt -ERD


M hnh khi nim cho php c t cc yu cu logic ca h thng, thng c s dng trong cc h thng d liu ln ER Model
Thc th Quan h Thuc tnh

Biu thc th

32

16

9/13/2011

Thc th
Thc th : tp hp cc thng tin lin quan cn c x l trong phn mm Thc th c th c mi quan h:
person owns car

Person

Owns

Car

Thc th c cc thuc tnh

33

Thuc tnh
Tnh cht ca mt thc th hoc mt i tng d liu
t tn cho 1 mu (instance) ca i tng d liu m t mu (instance) to lin kt (reference) n cc mu khc
Ford Car Blue ID Ford Automobile Company

Tp cc thuc tnh ca 1 i tng d liu c xc nh thng qua ng cnh ca bi ton.


34

17

9/13/2011

Quan h
Ch ra mi lin quan ga cc i tng d liu
Bookstore 1 Orders N Books

Cardinality : ch ra nh lng ca mi quan h 1:1 one-to-one Modality : 1:N one-to-many M:N many-to-many 0 c th c, c th khng c quan h 1 bt buc c quan h

Customer

Is provided with

Repair Action

35

V d: ERD m t th vin
Area N Deals with 1 Title Belongs to N state Was held by 1 Author Borrower limit M Copy N

Written by

Text

holds

36

18

9/13/2011

4. Th no l mt c t tt?
D hiu vi ngi dng C t iu nhp nhng C t quy c khi m t, c th to n gin Vi phong cch t trn xung (topdown) D trin khai cho nhng pha sau ca vng i: thit k h thng v thit k chng trnh v giao din d lm, m bo tnh nht qun, . . .

37

1. M hnh ha d liu
Xc nh cc i tng d liu Xc nh cc c tnh ca cc i tng d liu Thit lp cc mi quan h gia cc i tng d liu

38

19

9/13/2011

2. M hnh ha cc chc nng


Xc nh cc chc nng chuyn i i tng d liu Ch ra lung d liu i qua h thng nh th no Biu din b phn sn sinh d liu v b phn tiu th d liu

39

3. M hnh ha hnh vi
Ch ra cc trng thi (states) khc nhau ca h thng c t cc hin tng (events) lm h thng thay i trng thi

40

20

9/13/2011

4. Phn mnh cc m hnh


Tinh lc tng m hnh biu din cc mc tru tng thp hn Lc i tng d liu To ra phn cp chc nng Biu din hnh vi (behavior) cc mc chi tit khc nhau

41

5. Bn cht
Hy bt u bng cch tp trung vo bn cht ca vn ch khng xem xt nhng chi tit ci t

42

21

10/5/2011

PHN IV: THIT K V LP TRNH DESIGN AND PROGRAMMING


I. Thit k h thng
1. 2. 3. 4. Khi nim Thit k cu trc ha Quy trnh thit k Cc phng php thit k h thng

II. Thit k chng trnh III. Lp trnh

1. Thit k h thng l g?
L thit k cu hnh phn cng v cu trc phn mm (gm c chc nng v d liu) c c h thng tha mn cc yu cu ra. C th xem nh Thit k cu trc (WHAT), ch khng phi l Thit k Logic (HOW). Phng php thit k cu trc ha (Structured Design) ca Constantine Phng php thit k tng hp (Composite Design) ca Myers.

10/5/2011

2. Thit k cu trc ha
Bt ngun t modularity, top-down design, structured programming. Cn xem nh phng php thit k hng lung d liu (Data flow-oriented design). Quy trnh 6 bc:
To kiu lung thng tin; Ch ra bin ca lung; nh x DFD sang cu trc chng trnh; Xc nh phn cp iu khin; Tinh lc cu trc; Chn m t kin trc.
3

c trng ca thit k cu trc ha


D thch ng vi m hnh vng i thc nc do tnh thn thin cao. Thit k theo tin trnh, khng hp vi thit k x l theo l (batch system). Dng phn chia - kt hp gii quyt tnh phc tp ca h thng. Topdown trong phn chia module. K thut lp trnh hiu qu.

10/5/2011

2.1. Module
Dy cc lnh nhm thc hin chc nng (function) no . C th c bin dch c lp Module c dch c th c module khc gi ti. Giao din gia cc module thng qua cc bin tham s (arguments) . So snh vi cc NNLT!

a. Lu bong bng (Bubble chart)


Biu th lung x l d liu K php

Tn d liu

Tn chc nng

Tn d liu

(D liu vo)

(Bong bng)

(D liu ra)

10/5/2011

b. Cu trc phn cp (Hierarchical structured chart)


L phn cp biu th quan h ph thuc gia cc module v giao din (interface) gia chng Cc quy c:
Tn module biu th chc nng (lm g), t tn sao cho cc module pha di tng hp li s biu th chc nng ca module tng ng pha trn. Bin s (arguments) biu th giao din gia cc module, bin s cc module gi/b gi c th khc nhau. Mi tn xanh biu th d liu, tm biu th flag . Chiu ca mi tn l hng truyn tham s.

Khng lin quan n trnh t gi cc module, nhng ngm nh l t tri qua phi Mi module xut hin trong cu trc 1 ln, c th c gi nhiu ln Quan h trn di: khng cn nu s ln gi

Cu trc phn cp
Module A 1

Module B

Module C

Module D

Lung d liu Lung flag

Module E

10/5/2011

3. Quy trnh thit k h thng


Phn chia m hnh phn tch ra cc h con Tm ra s tng tranh (concurrency) trong h thng Phn b cc h con cho cc b x l hoc cc nhim v (tasks) Pht trin thit k giao din Chn chin lc ci t qun tr d liu Tm ra ngun ti nguyn chung v c ch iu khin truy nhp chng. Thit k c ch iu khin thch hp cho h thng, k c qun l nhim v. Xem xt cc iu kin bin c x l nh th no. Xt duyt v xem xt cc tha hip (trade-offs).
9

Cc im lu khi thit k h thng


1. 2. 3. 4. C th trch c lung d liu t h thng: l phn ni dung c t yu cu v giao din. Xem xt ti u ti nguyn kin trc ln h thng ri quyt nh kin trc. Theo qu trnh bin i d liu, hy xem nhng chc nng c kin trc nh th no? T kin trc cc chc nng, hy xem xt v chnh li, t chuyn sang kin trc chng trnh v thit k chi tit. Quyt nh cc n v chng trnh theo cc chc nng ca h phn mm c da theo lung d liu v phn chia ra cc thnh phn. Khi cu trc chng trnh ln qu, phi phn chia nh hn thnh cc module. Xem xt d liu vo-ra v cc tp dng chung ca chng trnh. Truy cp tp ti u. Hy ngh xem c c nhng thit k trn th nn dng phng php lun v nhng k thut g ?

Thit k h thng
Thit phn Thit phn k h thng cng [(1), (2)] k h thng mm [(3)-(7)]

5.

Thit k h thng phn mm


Thit k tp (file design) [(7)] Thit k chc nng h thng [(3)-(6)]

6. 7. 8.

10

10/5/2011

4. Cc phng php thit k h thng


Thit k cu trc:
Phng php phn chia STS (Source/Transform/Sink: Ngun/Bini/Hpth) Phng php phn chia TR (Transaction)

Minh ha phn chia chc nng theo bong bng ca DFD (biu lung d liu)

11

4.1. Phng php phn chia STS (Source/Transform/Sink)


1) Chia i tng bi ton thnh cc chc nng thnh phn

F3 Bi ton Problem F1 F2 F4

F5

13

10/5/2011

Quyt nh lung d liu chnh


2) Tm ra lung d liu chnh i qua cc chc nng: t u vo (Input) ti u ra (Output)

INPUT F3 Lung d liu chnh F1 F2 OUTPUT F4 F5

14

Quyt nh bong bng v d liu


3) Theo lung d liu chnh: thay tng chc nng bi bong bng v lm r d liu gia cc bong bng

Data1

F1

Data2

F2

Data3

F3

Data4

F4

Data5

F5

Data6

INPUT

OUTPUT

15

10/5/2011

T s bong bng sang s phn cp


4) Xc nh v tr tru tng ha ti a u vo v u ra

Data1

F1

Data2

F2

Data3

F3

Data4

F4

Data5

F5

Data6

INPUT
Tru tng ha ti a u vo Tru tng ha ti a u ra

OUTPUT

Source Module

Transform Module

Sink Module

16

5) Chuyn sang s phn cp


Data1

INPUT

F1

Data2

F2

Data3

F3

Data4

F4

Data5

F5

Data6

Tru tng ha ti a u vo

Tru tng ha ti a u ra

OUTPUT

Source Module

Transform Module

Sink Module

Control Module

Source Module

Transform Module

Sink Module

17

10/5/2011

6) Xc nh cc tham s gia cc module da theo quan h ph thuc


Module 0
3 3 5 0 5 2

Module 1

Module 2

Module 3

18

7) Vi tng module (Source, Transform, Sink) li p dng cch phn chia STS lp li cc bc t 1) n 6). i khi c trng hp khng chia thnh 3 m un nh m thnh 2 hoc 1. 8) Tip tc chia n mc cu trc lgic khi module tng ng vi thut ton bit th dng. Tng hp li ta c cu trc phn cp: mi nt l 1 module vi s nhnh pha di khng nhiu hn 3.

19

10/5/2011

4.2. Phng php phn chia TR (Transaction)


Khi khng tn ti lung d liu chnh, m d liu vo c c th khc nhau nh nhng ngun khc nhau xem nh cc Giao dch khc nhau. Mi giao dch ng vi 1 module x l n Phn chia module c th: theo kinh nghim; theo tnh c lp module; theo s bc ti a trong 1 module (v d < 50) v theo chun.

20

Cc bc thc hin
Xc nh trung tm giao dch gm 1 s chc nng phn loi v cc chc nng tham gia vo qu trnh x l:
Vo: 1 s chc nng truyn dn thng tin t ngun v 1 s chc nng s ch. Ra: Mt s chc nng dn thng tin ra t cc tnh hung x l.

V 2 mc cao nht ca lu cu trc: - Mt m un mc cao nht (nh): mc 1 - 1 cho vo, 1 m un x l cho mi trng hp v 1 m un ra: mc 2.
21

10

10/5/2011

Th d
T1 u1 x A y B u2 v2 C v1 z D

T2

u3 T3

v3

Biu chc nng c 1 trung tm giao dch

Th d
Chnh

Ly y

T1

T2

T3

Chuyn z

Vo

X l giao dch

Ra

Lu cu trc m un mc nh
23

11

10/5/2011

4.3. Phn tch cu trc ha


Xc nh lung d liu Lung tuyn tnh th theo phn chia STS Lung phn nhnh th theo phn chia TR

24

4.4. Chun phn chia module


Tnh c lp: kt hp (coupling) v bn vng (strength) 5 tiu chun ca Myers
Decomposability Composability Understandability Continuity Protection

25

12

10/5/2011

PHN IV: THIT K V LP TRNH DESIGN AND PROGRAMMING


I. Thit k h thng II. Thit k chng trnh
1. Khi nim 2. Phng php thit k chng trnh 3. Cng c thit k

III. Lp trnh

26

1. Khi nim
Thit k chng trnh l thit k chi tit cu trc bn trong ca phn mm: thit k tnh nng tng module v giao din tng ng. Cu trc ngoi ca phn mm: thit k h thng. Trnh t x l bn trong: Thut ton (gii thut, Algorithm); Logic.

27

13

10/5/2011

2. Phng php thit k chng trnh


Nguyn tc
Khng c trng thi m (fuzzy), m bo thit k cu trc trong ng n. Ngn ng lp trnh ph hp. Trin khai ng n c t chc nng cc module v chng trnh nh phng php lun thit k chi tit. Dng quy trnh thit k d chun ha tng bc.

K thut thit k m hnh h phn mm


Hng tin trnh (process) : K thut thit k cu trc iu khin. Hng cu trc d liu (data): K thut thit k cu trc d liu. Hng s vt / i tng (object): K thut thit k hng i tng.
28

2.1. Lp trnh cu trc ha


Khi nim c bn: tun t, nhnh (chn), lp; cu trc m rng, tin x l, hu x l. Nhng im li khi thit k thut ton :
Tnh c lp ca module: ch quan tm vo-ra Lm cho chng trnh d hiu D theo di chng trnh thc hin H phc tp s d hiu nh tip cn phn cp

29

14

10/5/2011

Loi b GOTO
GOTO dng lm g?
Cho php thc hin cc bc nhy n mt nhn nht nh

Ti sao cn loi b GOTO ?


Ph v tnh cu trc ca lp trnh cu trc ha

Phng php loi b GOTO C th loi b GOTO trong mi trng hp? Th no l k nng lp trnh cu trc

30

VD chng trnh Spaghetti


Start: Get (Time-on, Time-of f ,Time, Setting, Temp, Switch) if Switch = of f goto off if Switch = on goto on goto Cntrld of f : if Heating-status = on goto Sw-of f goto loop on: if Heating-status = off g oto Sw-on goto loop Cntrld: if Time = Time-on goto on if Time = Time-off goto off if Time < Time-on goto Start if Time > Time-off goto Start if Temp > Setting then goto off if Temp < Setting then goto on Sw-off : Heating-status := of f goto Switch Sw-on: Heating-status := on Switch: Switch-heating loop: goto Start
31

15

10/5/2011

CT c cu trc ho
loop -- The Get statement f inds values for the given variables f rom the systems -- environment. Get (Time-on, Time-of f ,Time, Setting, Temp, Switch) ; case Switch of when On => if Heating-status = of f then Switch-heating ; Heating-status := on ; end if ; when Off => if Heating-status = on then Switch-heating ; Heating-status := off ; end if; when Controlled => if Time >= Time-on and Time < = Time-of f then if Temp > Setting and Heating-status = on then Switch-heating; Heating-status = of f ; elsif Temp < Setting and Heating-status = of f then Switch-heating; Heating-status := on ; end if; end if ; end case ; end loop ;
32

Lu khi thit k chng trnh


Ph thuc vo k nng v kinh nghim ca ngi thit k. Cn chun ha ti liu c t thit k chi tit. Khi thit k cu trc iu khin ca gii thut, v theo cc quy c cu trc ha nn i khi tnh sng to ca ngi thit k b hn ch, b buc theo khun mu c.

33

16

10/5/2011

2.2. Lu cu trc ha
Tc dng ca lu (flow chart) Quy phm (discipline) Tru tng ha th tc Lu cu trc ha
Cu trc iu khin c bn Chi tit ha tng bc gii thut Th hin c trnh t iu khin thc hin

34

Lu Nassi-Shneiderman (NS chart by IBM)


a- Ni (concatination)
X l 1 X l 2

b- Chn (selection)
Iu kin
X l 1

X l 2

c- a nhnh (CASE)
TT1

d- Lp (repetition)
DO WHILE (kin)

Iu kin
TT2 TT3 X

X l
REPEAT UNTIL (kin)

X l 1

X l

X l 2 l 3

35

17

10/5/2011

Lu Phn tch bi ton (PAD chart by Hitachi)


a- Ni (concatination)
Trc chnh

b- Chn (selection)
X l 1

X l 1
iu kin

X l 2

X l 2

c- a nhnh (CASE)
I u k i n

d- Lp (repetition)

TT1 TT2

X l 1 X l 2 X l 3

WHILE kin

X l

UNTIL kin

X l

TT3 TT4

X l 4
36

2.3 Phng php Jackson


JSP: Jackson Structured Programming Cc k php:
C s (elementary) Tun t (sequence) Lp R nhnh

37

18

10/5/2011

Lu JSD (tip)

JSD biu din cc chc nng ca 1 HT nhn s

38

Trnh t thit k chung


Thit Thit Thit Thit k k k k cu trc d liu (Data step) cu trc chng trnh (Program step) th tc (Operation step) c t chng trnh (Text step)

39

19

10/5/2011

2.4. Phng php Warnier


Khi nim chung Trnh t thit k
Thit Thit Thit Thit Thit Thit k k k k k k d liu ra d liu vo cu trc chng trnh lu lnh th tc c t chi tit

40

PHN IV: THIT K V LP TRNH DESIGN AND PROGRAMMING


I. Thit k h thng II. Thit k chng trnh III. Lp trnh
1. Lch s pht trin ca ngn ng lp trnh 2. Cu trc chng trnh 3. Cc cng c lp trnh

41

20

10/5/2011

1. Lch s ngn ng lp trnh


Cc ngn ng th h th nht:
Ngn ng lp trnh m my (machine code) Ngn ng lp trnh assembly

Cc ngn ng th th th hai:
FOTRAN, COBOL, ALGOL, BASIC Pht trin 1950-1970

Cc ngn ng th h th ba
Ngn ng lp trnh cp cao vn nng (cu trc) Lp trnh hng i tng Lp trnh hng suy din logic

Cc ngn ng th h th t
42

2.1. Cu trc d liu d hiu


Nn xc nh tt c cc cu trc d liu v cc thao tc cn thc hin trn tng cu trc d liu. Vic biu din/khai bo cc cu trc d liu ch nn thc hin nhng m un s dng trc tip d liu. Nn thit lp v s dng t in d liu khi thit d liu.

43

21

10/5/2011

2.2. Cu trc thut ton d hiu


Gii thut 9 im lu khi vit chng trnh c cu trc:
Tun theo quy cch lp trnh Mt u vo, mt u ra Trnh GOTO, tr khi phi ra khi lp v dng Dng comments hp l Dng tn bin c ngha, gi nh Cu trc lng r rng Trnh dng CASE / switch nhiu hoc lng nhau M ngun 1 chng trnh / module nn vit trn 1 trang Trnh vit nhiu lnh trn 1 dng
44

2.3. Ch thch trong chng trnh


Ti sao cn t cc ch thch trong chng trnh ? V tr t cc ch thch trong chng trnh
Thnh phn/ Module Lp Hm/th tc Cc v tr c bit khc

Mt s quy nh khi t ch thch:


Ngn gn Gi nh

45

22

10/5/2011

3. Cc cng c lp trnh
Environments: DOS, WINDOWS, UNIX/LINUX Editors, Compilers, Linkers, Debuggers TURBO C, PASCAL MS C, Visual Basic, Visual C++, ASP UNIX/LINUX: C/C++, gcc (Gnu C Compiler) JAVA, CGI, perl C#, .NET

46

23

10/20/2011

PHN V: KIM TH V BO TR
I. Kim th
1. 2. 3. 4. 5. 6. Khi nim kim th Phng php th K thut thit k trng hp th Kim th module Kim th h thng Kim th chp nhn

II. Bo tr

1. Khi nim kim th


L mu cht ca m bo cht lng phn mm L tin trnh (v l ngh thut) nhm pht hin li bng vic xem xt li c t, thit k v m ngun. Kim th thnh cng l pht hin ra li; kim th khng pht hin ra li l kim th d

10/20/2011

Kh khn
Nng cao cht lng phn mm nhng khng vt qu cht lng khi thit k: ch pht hin cc li tim tng v sa chng Pht hin li b hn ch do th cng l chnh D b nh hng tm l khi kim th Kh m bo tnh y ca kim th

Lu khi kim th
1. Cht lng phn mm do khu thit k quyt nh l ch yu, ch khng phi khu kim th 2. Tnh d kim th ph thuc vo cu trc chng trnh 3. Ngi kim th v ngi pht trin nn khc nhau 4. D liu th cho kt qu bnh thng th khng c ngha nhiu, cn c nhng d liu kim th m pht hin ra li 5. Khi thit k trng hp th, khng ch d liu kim th nhp vo, m phi thit k trc c d liu kt qu s c 6. Khi pht sinh thm trng hp th th nn th li nhng trng hp th trc trnh nh hng lan truyn sng

10/20/2011

Tng ng gia vng i d n v kim th


i tng v phm vi Kim th chp nhn

c t chc nng/ Thit k l gc

Kim th h thng

Thit k Vt l

Kim th tch hp

Kim th hi quy

Cu trc chng trnh v c t module

Kim th n v chng trnh

M ho module chng trnh

2.1. Kim th tnh


Kim th trn bn: giy v bt trn bn, kim tra logic, ln tng chi tit ngay sau khi lp trnh xong. i xuyn sut (walk through) Thanh tra (inspection)

10/20/2011

2.2. Kim th trn my


G li bng my (machine debug) hay kim th ng: Dng my chy chng trnh iu tra trng thi tng ng tc ca chng trnh 9 bc ca trnh t kim th bng my:

Trnh t kim th bng my


1. 2. Thit k trng hp th theo th trn bn Trng hp th phi c c kt qu k vng s thu c Dch chng trnh ngun v to module ti thc hin Khi trng hp th c x l tp vo-ra, phi lm trc trn bn vic xc nh min ca cc tp 5. 6. Nhp d liu thit k cho trng hp kim th iu chnh mi trng thc hin module ti (to th tc a cc tp truy cp tp vo chng trnh) Thc hin module ti v ghi nhn kt qu Xc nhn kt qu vi kt qu k vng Lp li thao tc (5)-(8)

3.

7. 8. 9.

4.

10/20/2011

3. K thut thit k trng hp th


K thut thit k trng hp th da trn c t b ngoi ca chng trnh: Kim th hp en (Black box test): WHAT ? K thut thit k trng hp th da trn c t bn trong ca chng trnh: Kim th hp trng (white box test): HOW ? Kim th Top-Down hay Bottom-Up

3.1. Kim th hp en
Phn on tng ng Phn tch gi tr bin on li V 1 s k thut khc
Input Black Box

Results

Black box Data Testing Strategy


10

10/20/2011

a. Phng php phn on tng ng (Equivalence Partition)


Mc ch: gim s lng test bng cch chn cc tp d liu i din Thc hin: Chia d kiu vo thnh cc on, mi on i din cho mt s d liu => vic kim th ch thc hin trn i din u im: Test theo mc tru tng hn l trng. p dng: mn hnh, menu hay mc qu trnh. V d:

11

b. Phng php phn tch gi tr bin (Boundary value analysis)


L 1 trng hp ring ca phn on Th d: nu min d liu l thng th gi tr 0 hay >12 l khng hp l Thng s dng trong kim th module

12

10/20/2011

c. Phng php on li (Error Guessing)


Da vo trc gic v kinh nghim Th d li chia cho 0. Nu module c php chia th phi kim th li ny Nhc im: khng pht hin ht li

13

d. Phng php th nguyn nhn kt qu (Cause-effect Graphing)


SEQUENCE AND NOT

OR

DO UNTIL

14

10/20/2011

3.2. Kim th hp trng


L phng php kim th da vo cu trc iu khin ca cc th tc thit k cc trng hp kim th.

Input

Results

White Box Data Testing Strategy


15

Kim th hp trng (tip)


Ngi KSPM c th m bo:
Kim tra tt c cc l trnh c lp bn trong 1 m un t nht 1 ln Kim tra tt c cc nhnh ng/sai ca la chn Kim tra vic thc hin ca vng lp ti cc bin v bn trong vng lp Kim tra cc cu trc d liu m bo tnh hp thc.

Cc k thut:
Kim th theo l trnh (Basis path testing) Kim th theo cu trc iu khin.

16

10/20/2011

a. Kim th theo l trnh


L k thut do Tom McCabe xut cho php nh kim th tin hnh 1 s o v phc tp l gic ca cc th tc v s o ny c s dng gip cho vic nh ngha cc l trnh c bn sao cho cc lnh trong chng trnh c thc hin t nht 1 ln trong qu trnh kim th. S dng K php ho lung/ th chng trnh:
Mi nt th biu din 1 lnh/ 1 dy lnh lin tip Cung ca th biu din lung iu kin (trnh t thc hin).

17

V d: lu khi chng trnh

1
11

3 6
7
9 10

18

10/20/2011

V d: th chng trnh
1

2, 3

3
8

4, 5

10 4 11
19

Ch
Mt cung bao gi cng phi kt thc ti 1 nt (c th nt ny khng tng ng vi bt k lnh no trong th tc). Vng bao bi cc cung v nt gi l Region (khi tnh, ta phi tnh c vng bao ngoi). Th d th chng trnh slide trc gm 4 vng (cc s in nghing). Vi iu kin phc tp (nhiu hn 1 php so snh) th mi so snh li tch thnh 1 nt ring. Th d: If a OR b then X else Y Endif

20

10

10/20/2011

phc tp lp (Cyclomatic Complexity)


phc tp lp l 1 s o phn mm, cung cp 1 n v o nh lng v phc tp l gic ca CT. Trong ng cnh p dng kim th theo l trnh, gi tr ny s cung cp s lng cc l trnh (path) c lp trong 1 chng trnh v c coi nh l cn trn ca s lng test phi tin hnh m bo mi lnh u c thc hin t nht 1 ln. L trnh c lp? 1 phn ca CT bao gm t nht 1 tp lnh hay 1 iu kin mi. th CT trn c 4 l trnh c lp: 1-11; 1-2-3-4-510-1-11; 1-2-3-6-8-9-10-1-11; 1-2-3-6-7-9-10-1-11

21

phc tp lp
C 3 cch tnh phc tp lp k hiu V(G):
V(G) = E N +2, vi E l s cung, N l s nt ca G V(G) = s vng (region) V(G) = P +1, vi P l s lng nt Predicat (nt gi nh, khng c tht).

22

11

10/20/2011

Th d: chng trnh vit bng PDL


1
i=1 2 TotalInput = TotalValid = 0 Sum = 0 3 While value(i) <>-999 And TotalInput < 100 Do 4 TotalInput = TotalInput +1 If Value(i) >= Minimum And value(i) <= Maximum 5 6 Then TotalValid = TotalValid +1 7 Sum = Sum + value(i) Else Skip Endif 8 i = i +1 9 EndDo 10 If TotalValid > 0 Then Average = Sum / TotalValid 11 Else Average = -999 12 Endif

13
LastUpdate 8-07 Dept. of SE, 2001 SE-V.23

Li gii
S l trnh c lp ( phc tp lp) = 6
1-2-10-11-13; 1-2-10-12-13 1-2-3-10-11-13; 1-2-3-4-5-8-9-2 1-2-3-4-5-6-8-9-2; 1-2-3-4-5-6-7-8-9-2 : c ngha l phn tip theo cn li th l chp nhn c.

th chng trnh ? S test phi thc hin: 6

24

12

10/20/2011

3.3. Trnh t thit k


Kim th module Kim th tch hp
Kim th tch hp trn xung Kim th tch hp di ln Kim th hi qui

25

4. Kim th module
Kim th tch hp module
Kim Kim Kim Kim th th th th di ln (Bottom-up Test) trn xung (Top-down Test) ct tr (Big bang Test) kp (Sandwich Test)

26

13

10/20/2011

a. Bottom-up Test
Cc module mc thp c t hp vo cc chm thc hin mt chc nng con Vit trnh iu khin phi hp vo/ ra v kim th Kim th chm/b Loi b trnh iu khin v chuyn ln mc trn

27

Bottom-up Test (Tip)


Mc 4

Mc 3

Mc 2

Mc 1

28

14

10/20/2011

b. Top-down Test
module iu khin chnh c dng nh trnh iu khin kim th, gn cc nt con trc tip vo n Thay cc nt con bng cc module thc ti (theo chiu su / ngang) Kim th tng module c gn vo Cc 1 nt th xong c th tip nt khc Kim th hi quy

29

Top-down Test (tip)

Mc 1 Mc 2 Mc 3 Mc 4

30

15

10/20/2011

c. Big bang Test


Tch hp khng tng dn Tt cc cc module u c t hp trc Ton b chng trnh c kim th tng th Kh khn: kh c lp li, khi cha xong li ny c th li mi li pht sinh

31

d. Sandwich Test
Tch hp trn xung cho cc mc trn cu trc chng trnh Tch hp di ln cho cc mc ph thuc

32

16

10/20/2011

5. Kim th h thng
Kim th phc hi: bt buc phn mm hng nhiu cch kim chng phc hi Kim th an ton: kim chng c ch bo v Kim th gay cn Kim th hiu nng

33

6. Kim th chp nhn


Mc ch: bn giao PM cho khch hng i tng: Cn c s tham gia ca ND Trnh t: Da vo Yu cu PM

34

17

10/20/2011

PHN V: KIM TH V BO TR
I. Kim th II. Bo tr
1. 2. 3. 4. Khi nim Quy trnh nghip v Cc vn cn tn ti Bo tr trong cc phng php pht trin phn mm
35

1. Khi nim
Bo tr l cng vic tu sa, thay i phn mm c pht trin (chng trnh, d liu, JCL, cc loi t liu c t, . . .) theo nhng l do no . Cc hnh thi bo tr: bo tr
Tu chnh Thch nghi Ci tin Phng nga

36

18

10/20/2011

a. Bo tr tu sa
L bo tr khc phc nhng khim khuyt c trong phn mm. Mt s nguyn nhn in hnh
K s phn mm v khch hiu nhm nhau. Li tim n ca phn mm do s ca lp trnh hoc khi kim th cha bao qut ht. Vn tnh nng ca phn mm: khng p ng c yu cu v b nh, tp, . . . Thit k sai, bin tp sai . . . Thiu chun ha trong pht trin phn mm (trc ).

K ngh ngc (Reverse Engineering): d li thit k tu sa. Nhng lu


Mc tru tng Tnh y Tnh tng tc Tnh nh hng

37

b. Bo tr thch hp
L tu chnh phn mm theo thay i ca mi trng bn ngoi nhm duy tr v qun l phn mm theo vng i ca n. Thay i phn mm thch nghi vi mi trng: cng ngh phn cng, mi trng phn mm. Nhng nguyn nhn chnh:
Thay i v phn cng (ngoi vi, my ch,. . .) Thay i v phn mm (mi trng): i OS Thay i cu trc tp hoc m rng CSDL

38

19

10/20/2011

c. Bo tr ci tin
L vic tu chnh h phn mm theo cc yu cu ngy cng hon thin hn, y hn, hp l hn. Nhng nguyn nhn chnh: Cn gi l ti k ngh (reengineering) Mc ch: a ra mt thit k cng chc nng nhng c cht lng cao hn. Cc bc thc hin:

Do mun nng cao hiu sut nn thng hay ci tin phng thc truy cp tp. M rng thm chc nng mi cho h thng. Ci tin qun l ko theo ci tin t liu vn hnh v trnh t cng vic. Thay i ngi dng hoc thay i thao tc.

Xy dng lu phn mm Suy dn ra biu thc Bun cho tng dy x l Bin dch bng chn l Ti cu trc phn mm

39

d. Bo tr phng nga
L cng vic tu chnh chng trnh c tnh n tng lai ca phn mm s m rng v thay i nh th no. Thc ra trong khi thit k phn mm phi tnh n tnh m rng ca n, nn thc t t khi ta gp bo tr phng nga nu nh phn mm c thit k tt. Mc ch: sa i thch hp vi yu cu thay i s c ca ngi dng. Thc hin nhng thay i trn thit k khng tng minh. Hiu hot ng bn trong chng trnh Thit k / lp trnh li. S dng cng c CASE

40

20

10/20/2011

2. Quy trnh nghip v


Quy trnh bo tr: qu trnh trong vng i ca phn mm, cng tun theo cc pha phn tch, thit k, pht trin v kim th t khi pht sinh vn cho n khi gii quyt xong. Cc nhim v bo tr:
Phn tch/c lp: phn tch tc ng, phn tch nhng gi tr li ch, v c lp cc thnh phn cn bo tr Thit k: thit k li h thng (phi bit cch tu sa, thay i). Thc thi: thay th m ngun v kim sot tng n v thnh phn h thng, c tnh n thi gian lp trnh.

Thao tc bo tr: Gm 2 loi


Tu chnh ci c (loi 1) Thm ci mi (loi 2)
41

S bo tr
Hiu phn mm c

Loi bo tr?

Pht trin phn mm mi

Thc thi trn bn: -Nm vng cc chc nng ca h thng theo ti liu -Nm vng c t chi tit, iu kin kim th, . . . theo ti liu -D c chng trnh ngun, hiu trnh t x l chi tit ca h thng -Khi thm chc nng mi phi pht trin chng trnh cho ph hp vi yu cu -Cn tin hnh t thit k, lp trnh, g li v kim th unit -Phn nh vo giao din ca phn mm (thng bo, phin bn, . . .) -Bo tr chng trnh ngun, to cc module mi v dch li. -Thc hin kim th unit v tu chnh nhng mc lin quan c trong t liu c t. -Ch theo st tc ng ca module c sa n cc thnh phn khc trong 42 h thng.

1
Tu sa phn mm c

Kim th tnh nht qun

Kim th sau bo tr

To biu qun l bo tr

21

10/20/2011

S bo tr
Hiu phn mm c

Loi bo tr?

Pht trin phn mm mi

1
Tu sa phn mm c

Bng kim th tch hp -a n v (unit) dc kim th vo hot ng trong h thng -iu chnh s tng tch gia cc module -Dng cc d liu trc y khi kim th kim th li tnh nht qun ! Ch hiu ng ln sng trong chnh sa Khi hon thnh bo tr: -Kim tra ni dung m t c trong t liu c t -Cch ghi t liu c ph hp vi m t mi trng phn mm mi hay khng ? qun l tnh trng bo tr, lp biu: -Ngy thng, gi -Nguyn nhn -Tm tt cch khc phc -Chi tit khc phc, hiu ng ln sng -Ngi lm bo tr 43 -S cng

Kim chng tnh nht qun

Kim th sau bo tr

To biu qun l bo tr

3. Cc vn cn tn ti
Phng php ci tin thao tc bo tr:
Sng kin trong quy trnh pht trin phn mm Sng kin trong quy trnh bo tr phn mm Pht trin nhng k thut mi cho bo tr

44

22

10/20/2011

a. Sng kin trong quy trnh pht trin phn mm


Chun ha mi khu trong pht trin phn mm Ngi bo tr ch cht tham gia vo giai on phn tch v thit k Thit k d bo tr

45

b. Sng kin trong quy trnh bo tr phn mm


S dng cc cng c h tr pht trin phn mm Chun ha thao tc bo tr v thit b mi trng bo tr Lu li nhng thng tin s bo tr D n nn c mt ngi ch cht ca mnh lm cng vic bo tr sau khi d n kt thc giai on pht trin.

46

23

10/20/2011

c. Pht trin nhng k thut mi cho bo tr


Cng c phn mm h tr bo tr C s d liu cho bo tr Qun l ti liu, qun l d liu, qun l chng trnh ngun, qun l d liu th, qun l s bo tr Trm bo tr tnh nng cao trong h thng mng li bo tr vi my ch thng minh.

47

Bi tp v nh
Tm hiu SMMM Software Maintenance Maturity Model.

48

24

10/20/2011

a. Pht trin lp

49

RUP

50

25

10/20/2011

Scrum

51

Agile

52

26

10/20/2011

b. Hng thnh phn


Nhng hot ng bo tr chnh CBSD
Gn kt ha v gi ha May o ha Pht hin li v c lp Cp nht cu hnh thnh phn Theo di v kim tra cc hnh vi h thng Kim th cc thnh phn

53

c. M ngun m
S khc bit vi bo tr theo phng php truyn thng
Phin bn ngy thng Ch i dch v

54

27

11/1/2011

PHN VI: CC CH NNG CAO


I.
1. Nng sut (Productivity) 2. Cc k thut c lng (Estimation Techniques) 3. M hnh chi ph thut ton (Algorithmic Cost Model) 4. Nhn lc v thi gian d n (Project duration and staffing)

c lng chi ph phn mm (SE Cost Estimation)

II. Qun l cht lng (Quality Management) III. Ci tin quy trnh (Process Improvement) IV. Khc

1. Nng sut (Productivity)


Nng sut l s n v u ra trn s gi lm vic Trong SE, nng sut c th c lng bi mt s thuc tnh chia cho tng s n lc pht trin:
S o kch thc (th d s dng lnh) S o chc nng (s chc nng to ra trn 1 khong thi gian )

SE-VI.2

11/1/2011

2. Cc k thut c lng (Estimation Techniques)


M hnh chi ph thut ton: s dng cc thng tin c tnh lch s (thng l kch thc)
kin chuyn gia nh gi tng t: ch p dng khi c nhiu d n trong cng mt lnh vc Lut Parkinson: chi ph ph thuc thi gian v s nhn cng Gi thng thu: ph thuc kh nng KH

SE-VI.3

3. M hnh chi ph thut ton (Algorithmic Cost Model)


Nguyn tc: Dng mt phng trnh ton hc d on (Kitchenham 1990a) dng: C gng = C x PMs x M vi:
C l phc tp PM l s o nng sut M l h s ph thuc v qu trnh, nng sut s c chn gn vi 1, phn nh gia tng ca yu cu vi cc d n ln

Ch :
Rt kh d on PM vo giai on u Vic d on C v M l khch quan v c th thay i t ngi ny sang ngi khc.
SE-VI.4

11/1/2011

a. M hnh COCOMO (Boehm 1981)


M hnh COCOMO tun theo PT trn, vi cc la chn sau:
n gin: PM = 2,4 (KDSI)1,05 x M Khim tn: PM = 3,0 (KDSI)1,12 x M Lng nhau: PM = 3,6 (KDSI)1,20 x M
vi KDSI l s lnh ngun theo n v nghn

SE-VI.5

b. M hnh nh c (calibrate model)


S dng mt m hnh c on c hiu qu, do vy cn c 1 CSDL v phn lch v cc c gng ca mt d n trn vn. C th dng kt hp vi m hnh COCOMO

11/1/2011

c. M hnh chi ph thut ton trong lp k hoch d n


Dng nh gi chi ph u t nhm gim chi ph C 3 thnh phn phi xem xt trong khi tnh chi ph DA.
Chi ph phn cng ca HT Chi ph phng tin, thit b (my tnh, phn mm) trong pht trin HT Chi ph ca cc n lc yu cu

Chi ph phn mm (Software Cost) c tnh:


SC = Basic Cost x RELY x TIME x STOR x TOOL x EXP x lng TB 1 ngi/thng vi: STOR l khng gian lu tr, TIME l thi gian cn thit, TOOL l cng c, EXP l kinh nghim, RELY l tin cy (c th chn l 1,2)
SE-VI.7

4. Nhn lc v thi gian d n (Project duration and staffing)


M hnh COCOMO cng d on lch cho mt DA trn vn:
D n n gin: TDEV = 2.5 (PM)0.38 D n trung bnh: TDEV = 2.5 (PM)0.35 D n lng: TDEV = 2.5 (PM)0.32 vi TDEV l tng thi gian cn thit cho mt DA

SE-VI.8

11/1/2011

PHN VI: CC CH NNG CAO


I. c lng chi ph phn mm (SE Cost Estimation) II. Qun l cht lng (Quality Management)
1. 2. 3. 4. 5. 6. m bo cht lng qu trnh Xem xt li cht lng Cc chun phn mm Cc chun ti liu o phn mm o cht lng sn phm

III. Ci tin quy trnh (Process Improvement) IV. Khc


9

1. m bo cht lng quy trnh


m bo cht lng quy trnh l mt khi nim a chiu. cha c nh ngha r rng. Nhn chung khi nim ny c th xem nh l pht trin SP phi p ng c c t ca n (Crossby, 1979)
c t phi hng v c trng SP m KH mun Chng ta khng bit c t th no v cht lng c t phn mm lun lun khng y

Qun l cht lng l p ng 3 loi hot ng sau:


m bo cht lng K hoch cht lng: chn th tc tng ng, chun v kch thc iu khin cht lng: cc th tc v chun phi c tn trng
SE-VI.10

11/1/2011

m bo cht lng quy trnh(tip)

nh ngha Qu trnh

Pht trin sn phm

K cht lng sn phm

K Qu trnh ci tin Cht lng da vo qu trnh Cht lng C Qu trnh chun ho

SE-VI.11

2. Xem xt li cht lng


L phng php chnh khng nh cht lng ca qu trnh sn xut 3 kiu xem xt:
Thanh tra thit k hay chng trnh Xem xt tin trin Xem xt cht lng
La chn i ng

xem xt y

Sp xp v tr v thi gian

Xem xt

Phn b ti liu

SE-VI.12

11/1/2011

3. Cc chun phn mm
Vai tr quan trng ca BCLPM l chun ho cc sn phm v qu trnh Tm quan trng:
Cung cp SP tng ng v thc t Cung cp cc framework ci t c qu trnh BCL m bo tnh lin tc: cng vic thc hin bi 1 ngi c th thc hin tip bi ngi khc

SE-VI.13

4. Cc chun ti liu
Ti liu l 1 phn quan trng trong SE theo di, hiu v lm 3 kiu chun ti liu:
Cc chun ca qu trnh lp ti liu: Qui nh chun khi to ti liu Chun TL: Chun qun tr chnh TL Chun trao i TL: Dng trong trao i qua E-mail, copy hay lu tr trong CSDL

SE-VI.14

11/1/2011

5. o phn mm (Software Metric)


o phn mm l mt kiu o lin quan n HT phn mm, qu trnh hay TL, Th d nh s dng lnh, s thng bo li khi cung cp SP Hai lp o: o K v o d on

Qu trnh PM o K Cc quyt nh QL

Sn phm PM o D on

SE-VI.15

6. o cht lng SP
Vic biu din, nh gi o bng cc s liu hn l kinh nghim o cht lng thit k
tnh lin kt lin kt d hiu thch hp

o cht lng chng trnh


chiu di m phc tp Mc lng iu kin
SE-VI.16

11/1/2011

PHN VI: CC CH NNG CAO


I. c lng chi ph phn mm (SE Cost Estimation) II. Qun l cht lng (Quality Management) III. Ci tin quy trnh (Process Improvement)
1. 2. 3. 4. 5. Cht lng quy trnh v sn phm M hnh ho v phn tch quy trnh o M hnh thun thc kh nng SEI Phn loi quy trnh

IV. Khc
17

M u
Ci tin quy trnh c ngha hiu quy trnh tn ti v thay i quy trnh ny nng cao cht lng SP hay gim chi ph & thi gian pht trin Khng n gin l chp nhn 1 phng php hay cng c c bit no hay s dng 1 m hnh quy trnh s u Ci tin quy trnh phi c xem xt nh 1 hot ng c bit trong 1 t chc hoc 1 phn ca t chc ln

SE-VI.18

11/1/2011

S khi qut ca Qu trnh ci tin quy trnh


Xc nh cc thay i Phn tch Quy trnh Xc nh Cc ci tin Hiu chnh Cc thay i

o to i ng

M hnh Quy trnh

Lp k hoch

K hoch o to

Phn hi

M hnh xem xt li

Phn tch quy trnh: xem xt quy trnh tn ti, to ra m hnh quy trnh lp TL v hiu quy trnh Xc nh ci tin: s dng kt qu phn tch xc nh cht lng, lp lch hay chi ph nhng pha gay cn

Xc nh thay i: Thit lp cc th tc, phng php, cng c mi v tch hp vi cc ci tn ti o to: khng o to quy trnh s tht bi Hiu chnh thay i: cc thay i c tc dng ngay vi HT
SE-VI.19

1. Cht lng quy trnh v sn phm


Xem chng trc

20

10

11/1/2011

2. M hnh ho v phn tch quy trnh


Vai tr: nghin cu cc quy trnh ang tn ti v pht trin m hnh tru tng cho cc quy trnh ny (thu tm cc c trng) Phn tch l nghin cu hiu mi lin quan gia cc phn ca quy trnh. im xut pht l m hnh hnh thc s dng K thut:
Hi v phng vn K thut Ethnographic: dng hiu bn cht ca pht trin phn mm nh cc hot ng ca con ngi

SE-VI.21

M hnh ho (tip)
Cc k php dng trong m hnh:
Activity (hot ng): biu din bi hnh ch nht trn Process (qu trnh): tp cc hot ng, biu din bi hnh ch nht trn c bng m Deliverable (phn phi): biu din bi 1 hnh ch nht c bng m. N l u ra ca 1 hot ng Condition (iu kin): biu din bi 1 hnh ch nht. N l tin hay hu iu kin Role (vai tr): biu din bi hnh trn Exception (Ngoi l): Hp bao kp. Vic thay i do mt s kin no Communication (Giao tip): Biu din trao i thng tin gia con ngi vi nhau hay vi HT

SE-VI.22

11

11/1/2011

3. o quy trnh
o ca 1 quy trnh l cc d liu nh lng v quy trnh phn mm (Tp cc o l ch yu cho qu trnh ci tin quy trnh Humphey, 1989). Phn loi:
Thi gian thc hin 1 quy trnh c bit Ti nguyn yu cu cho 1 quy trnh c bit S cc bin c

Kh khn: Ci no l cn nh lng o m. Tuy nhin c th xem: mc ch (Goals, Cu hi, o)


SE-VI.23

4. M hnh thun thc kh nng (ca SEI)


Vin CNPM (SEI) Carnegie-Melon-University xut. M hnh SEI phn qu trnh phn mm thnh 5 mc khc nhau:
Mc khi u: 1 t chc khng qun l thc s cc th tc hay DA. Phn mm c th pht trin song khng th d on trc (ngn sch, thi gian, . . .) Mc lp: 1 t chc c th c qun l hnh thc v m bo cht lng, cc th tc iu khin cu hnh. T chc c th lp li cc DA cng kiu Mc c nh ngha: mc ny, mt t chc c nh ngha cc qua trnh ca mnh m nh vy c 1 c s cho qu trnh ci tin cht lng. Cc th tc hnh thc m bo rng cc qu trnh nh l s c tun th
SE-VI.24

12

11/1/2011

M hnh thun thc kh nng SEI (tip)


Mc c qun tr: 1 t chc nh ngha cc qu trnh v 1 CT thu thp d liu v cht lng. S o qu trnh v th rc c su tp cho qu cc hot ng ca qu trnh ci tin Mc ti u: tho thun tip tc qu trnh ci tin. Qu trnh ny c ngn sch v k hoch thc hin v l phn tch hp ca qu trnh t chc

SE-VI.25

5. Phn loi quy trnh


Vic phn loi chn ca cc quy trnh nh trn thng p dng cho cc DA ln Phn loi:
Quy trnh khng hnh thc : cc qu trnh m m hnh khng nh ngha 1 cch cht ch Quy trnh c qun l: m hnh qu trnh c nh ngha (nh hng) Quy trnh c phng php: mt s phng php pht trin c nh ngha Quy trnh ci tin:

SE-VI.26

13

11/1/2011

PHN VI: CC CH NNG CAO


I. c lng chi ph phn mm (SE Cost Estimation) II. Qun l cht lng (Quality Management) III. Ci tin quy trnh (Process Improvement) IV. Khc

1. Phng php hnh thc (Formal methods) 2. Cng ngh hc phn mm phng sch (Cleanroom SE) 3. CNHPM hng thnh phn (CBSE) 4. CNHPM khch/ch (Client/Server SE) 5. K ngh Web (Web Engineering) 6. Ti k ngh (Re-engineering) 7. CNHPM da trn my tnh (CASE) 8. (Chi tit xem trong cc ti liu)
27

Ti k ngh phn mm (Software Re-engineering)


Dch chuyn m ngun Cu trc li CT Ti lp DL K ngh ngc

28

14

11/1/2011

Pht trin v ti k ngh


c t h thng Thit k v Ci t H thng mi

Forward Engineering

H thng ang tn ti

Hiu v dch chuyn H thng

H thng c ti to

Software Re-engineering

SE-VI.29

15