In what ways does this reuse ; r i reduce the overall cost ot the product.. How will you instruct your team to ensure that the resulting code will be as portable @ IE ; :i 8.17 You are
Trang 1t i unking and Embeddi ng
,no I onger made sense i n t hi s new cont ext, so t he name oLE ' I ! l .
was t ransformed from a t hree-lett er acronym (TLA) into a name in i ts own ri ght In k
1 ! !
11 ; l i 1996, Mi crosoft start ed using the t ermAcrï vcx in connection wit h i ts lnternet-related
hnologies However the term Acr/pcx soon becam e aIl but synonym ous with OLE '
n its second meaning of CoM -related technology.A distributed version of COM was
1 i ! l ed in 1996 to support interoperability on distributed platform s
l j i
'
! ; The underlying technology supporting interoperability is COM Suppose that '
11 i J software component Q supplies services to component P; that is
,P is a cl ient of Q.
I i
,! p i P and Q can interact in a number of different ways lf F and Q are parts of the same
11 ' P can invoke Q.On the other hand, if F and Q are in different processes
j t ; j provides services to anot her component Every pi ece of the software is impl emented
: ' I I ' : ; as a COM component (M i crosoft t erms t hi s an object).Each component has one :
l '',I j !, or m ore interfaces, each of w hich supports one or more functions (these are termed
'
k
j ! methods) To util ize a COM component, a client calls the COM li brary, specifying t he
i s j ) cl ass of t he component (ever y COM component an i nst ance of a speci f c cl ass) and
' ' 1 1 t he specihc i nterface of the component.The COM library then instantiates a COM
' 5l i component of that class and returns a pointer to the chosen interface.The client now
i ; can invoke a function of that interface
i t support inheritance (Section 7
.8) COM therefore is objea based (Wegner, 1992) k
:; ( i ng a common architecture for object -oriented syst ems Specihcall y, the Common
; 'i ' object Request Broker Archi tecture (CORBA) supports the interoperabi lity of soft
Trang 2i nvoke a met hod of an object, rr es pect i ve of wher' e i n hatt he supports idi st r but ed nteroperabilis yst em t he ty,obj and eet i !' j j.l
isocated The term middleware describes software t
' ORB has been called the é mother of all cl ient/server middleware' ' korfali, Harkey, and i ! l
. 1Edwards
,l 9961 Inprise Visi broker and lona ORBIX are two of the many CORBA I
' i mpl ement at i ons curr ent l y avai l abl e ! (1
One key difference is a consequence of the fact that COM is a product of M i- i j
. crosoft, the world's largest com puter organization whereas CORBA is an interna- i
q a nd a devel oper needs a det ai l ed under st andi ng of Wi n32 ( t he Wi ndows API) as : t
: wel l Furt her mor e, devel oper s have i ndi cat ed t hat COM has a st eep l earni ng cur ve i j
.
CORBA on the other hand, is dehned in under 200 pages, and the docum entation for I j!
RBA pr oduct s i s bet ween 200 and 300 pages i j mos t CO
s een how i nt er oper abi l y wi l be i mpl ement ed i n fut ure years ) I
ii
I .l k
CORBA (Section 8 10 2) In the past, a number of apparently strong contenders r (
have fallen by the wayside, notably OpenDoc How ever, m any other products cur- ; !' ' '
, rently are available or under developm ent For exam ple,JavaBeans is a fully portable, : '
Trang 3j ' i ! é 1 i i nt erf ace ( API ) A bean i s a smal l scal e component An Ent er pri se bean i s a I ar ger
-aI e component t hat can be used as a standalone applicati on or i ntegrated int o a 4
11 1 I soft ware product Enterprise beans are used primarily for server-si de appli cations i n (
: 1 1 I 1i ! 1 cl i ent -s er ver ar chi t ect ur es r val esky, 19991.
; I' l ae ubiqui ty of the w orld w i de w eb has major int eroperabi lit y impl icati ons.
l i de organizations that COM (or its successor at time
of writing, COM +) is the k
1 ! appear equal l y ent husi ast i c about he Ext ensi bl e Mar kup Language ( XML) ( W3C.
t 1 ! di t fer ent dat a s ources on t he Web kel y t hat XML wi l pl ay as mpor t ant a f ut ur e j
j $ r ol e i n dat a t ransmi s si on and mani pul at i on on t he Web as HTML does oday.
I t Reuse is described in Section 8.l lmpediments to reuse are discussed in Section 8 2 i!
six reuse case studies are present ed in Secti on 8 3 The i mpact of the object-oriented 1
Trang 4: i
:'. I
I : .
FoR FURTHER READI NO a*y i I '
j j : j
r lnt er oper abi l y i i nt roduced i n Sect i on 8 l0 COM i di s cussed i n Sect i on 8 10 1, ! ' ' I
a CORBA in Section 8.10.2, and they are compared in Section 8.10.3 The chapter g r
i t
: 0 Further informati on on the reuse case studi es i n this chapter can be found in gl - an- ; ' j
le ergan and Grasso, 1984 M atsum oto, 1984, 1987., Selby 1989., Prieto-Dfaz, l99 l ' ' '1
7 ' ' d Toft Col eman, and Oht a, 20001 A l 1 l 3r Lim. 1994, Jézéquel and M eyer, 1997, an ,
re ',
corporate-l evel soft ware reuse program at Hewlett-packard is described in gGriss, r
: l
.Two pi lot studies at M ot orola are presented i n ( Joos, 19941 The manage- l ment of reuse i s described i n (Lim, 19981 Some warni ngs regarding reuse are gi ven ) 'S in g' rracz 19951 lFrakes and Fox, l 9951 is a report on industry att itudes toward i j
-' ' reuse A search scheme for object retri eval and reuse s , .
,) Kautfman, 19961. Ada reuse case studies are out lined i n (skazinski, 19941. The cost- j ,
' h effectiveness of reuse i s descri bed in g Barnes and Boll inger, 19911 and ways of iden- '
;
hy tifying components for future reuse in (Caldiera and Basi li, 1 9911 (M eyer, 1 996a1 l
' 0 anal yzes t he cl aim that the object -oriented paradigm promotes reuse' , four case stud- '
i es in reuse and object t echnol ogy appear in (Fichman and Kemerer, 19971 Reuse l :
t n metr cs i are di scussed i n gpoul in 19971 ( Prieto-Df az, 19931 is a status report on l ' ( j '
A variety of papers on component-based software engineering from the Software 1
ëiEngineering lnstit ute may be tound in gBrown, 19961 Other papers on component- l
ib
ased software engineering are in the Sept ember/october 1998 issue of IEEE Soft- ë ' !
ker, 19981, whi ch di s cusses t he t es t ng of component - based t : l
r d A good source of informati on on frameworks is g Lewis et al s 19951 M anag- l
1- i ng reuse of object-oriented frameworks is described i n (Sparks, Benner, and Fari s, j ;
S, l 9961 A framework for buil di ng soft ware is discussed i n (Schmi d, l 9961 The effect ' i j
,incl udi ng (Johnson, 19971 An excell ent series of articles on frameworks can ! 2 E
's be found in (Fayad andlohnson, 1999 , Fayad and Schmi dt, 1999 , and Fayad, Schmidt, ! :
t e and Johnson, 1 9991 The October 2000 issue of Communicat iol ls ofthe ACM includes ; 1 2
ls arti cles on component-based frameworks including gl éobryn, 20001, whi ch describes ' ,
i ! h
ow to m odel com ponents and fram eworks using UM L !
ëI
l
Trang 5) 1 7 1 : q ,
i ; Desi gn pat t er ns wer e put orwar d by Al exander wi t hi n t he cont ext of archi t ect ur e g 3
: ! ! gAlexander et al., l 9771 A f irst-hand account of the origins of pat tern theory appears in
j I are descri bed in (Coads 19921 and i n (Fowler, l 997a1 (Schmidt, l 9951 descri bes the
1 ' i f desi gn pat terns to devel op reusabl e object-oriented communicati ons software. '*S
1 j ! ar t cl es on pat t er ns, i ncl udi ng g cl i ne, l 9961 , whi ch descri bes t he advant ages and
' ' ; disadvantages of design patt erns
A rticles on patterns and architectures are to be
1 j and Cunni n gha m, 1 9971 , whi c h expl a ns he mpor t anc e of pa t r a ngua ges , a n
.M elton, and G arlan, l997., Tepfenhart and Cusiek, 1997) and g.z
1 l
' ! i 1 Coplien, 1 9971, all ot whi ch connect architectures, patterns, and objects Another
I l I paper on the use of design patt erns is gcooper
-19981 Antipatt erns are described in
l l l
I
I (Brown et al, 19981.
2.
; i f i nformation on software architectures is (Shaw and
Gar- The or marv source o
:
. q y I an, 19961 Art icles on sottware archit ecture can be found in the April 1995 issue
J ( ) IEEE Software, especi ally (Shaw, l 995, and Garlan, Allen, and Ockerbl oom, 19951.
jj j Strategi es for achievi ng portabili ty can be tound in (M ooney l 9901 Portabil ity
ii ) i E 1 Ot C - and UNIX s i discussed in glohnson and Ri tchi e,19781. W ith regard t o portabil ity
j
I of Ada products, t he reader shoul d consult (Nissen and W allis, 19841.
'
, CORBA , and Activex inI
:
è I I particul ar consult g Adl er, l 9951 A comprehensive source of informati on on i
nterop-' 1 ! erabil ity is gorfali.Harkey. and Edwards, l 9961. An overview of mi ddleware appears
, l
l I in (Brown,19991. COM is described i n (Box, 19981. , detai led i nformation is avail abl e
; i I
I ; fr om t he Mi cr osof t home page, www mi crosoh com CORBA idescri bed i n det ai l n 3.@
' k @ tMowbray and zahavi,l 9951. gl -eppi nen, Pulkkinen, and Rautiai nen, 19971 is a case
. l i study in integrating Java and CORBA The O ctober 1998 issue of Communications
j ofthe ACM contains a set ot arti cles on CORBA, including gsi egel,19981. A detail ed '
j 8.2 A code m odule is reused,unchanged. in a new product. In what ways does this reuse
; r i reduce the overall cost ot the product? ln what w ays is the cost unchanged?
Trang 67e 8.3 Suppose that a code m odule is reused with one change, an addition operation is !
. 1
n changed t o a subt r act i on
.W hat impact does this minor change have on t he savings of l
! r 'C
3 s wha t s he n
td control products The organization has hundreds of software products consisting of ::, (l
l e some 95, 000 di f er ent FORTRAN modul es You have been hi r ed t o come up wi t h t j j
.
r h a pl an for eusi ng as many of t hes e modul es as possi bl e i n fut ure pr oduct s What i s j
2 I
l d I
.7 consider an automated library circulation system Every book has a bar code, and
Dr every borrower has a card bearing a bar code W hen a borrower wishes to check out a
in book t5he Iibrarian scans the bar codes on the book and the borrower's card, and enters I E ! '
i E
C at the com puter term inal Sim ilarly, when a book is returned, it is again scanned ' 7r- and the librarian enters R Librarians can add books (+) to the library collection or i
l e remove them (-) Borrowers can go to a termi nal and determine a1l the books in l
7 the Ii brary by a particular author (the borrower enters =
j '
'1 name), a 11he books wi th a specihc titl e (T= foll owed by the ti tl e), or all the books in a ; 5 g y 8' par ticular subject area (S= foll owed by the subject area) Finally, i f borrower wants r '
e- a book currently checked out, the librarian can place a hold on the book so that, when l
!
t is returned- it will be held for the borrower who requested it (H= followed by the 1 I '
J ! number of the book).Explain how you would ensure a high percentage of reusable j , :
in l.9 Consider an autom ated teller machine (ATM ) The user puts a card into a slot and
enters a four-digit personal identihcation number (PlN ) If the PIN is incorrect, the i 5
qe
q :
card is eject ed Otherwi se, the user may perform the foll owi ng operations on up t o :
)
(i) Deposit any amount A receipt i s pri nted showi ng the date, amount deposited !
er ftl nds betWeen tWO aCCOuntS Again, the account from which the funds 1 j
l !
k :'
)
;
Trang 7(1 ( ( a.1 1 secti on 8 5 2 stat es that '' the Raytheon COBOL program I ogic structure of the 1970s
16 i @ i s a classical precursor of t oday's object -oriented appl icati on framework.' W hat are
il i ) g 1 @5 Explain how you would ensure that the software for the autom ated teller machine
11 ! ' (ATM ) of Problem 8 9 i s as portable as possibl e.
t l l wi l be used i n cancer herapy You ar e i n char ge of wr i ng t wo assembl er modul es.
S 1) E ; '. How will you instruct your team to ensure that the resulting code will be as portable @
IE ; :i 8.17 You are responsible for porting a 750,000-line CO BO L product to your company's
' k new computer.You copy the source code to the new machine, but discover wlaen you
j ( t AdaI C 1 9971 DoD tRepl ace Ada Manda twi t h Sof t war e- Engi necr i ng Pr oces s, Adalc
! j ( News (Summer 1997), Ada Informat ion Cl earinghouse, Fall s Chur chs VA.
Trang 8l ::
-(ë I
, ! I
)
; I
: l
l l There is no easy soluti on to the diff icul ties of const ructing a software product To put t ogether a large ;
t he software devel opment and maintenance process.N otwithstanding the need for continual planning, these l.
.
25 activities reach a peak after the specitications have been drawn up but before design activities com mence l h
1 '
At thi
s poi nt in the process, meani ngful durati on and cost estimates are computed and a detail ed plan for j I.
!.:
@
.1 Pz ANNIN/ ANp THE 5@F ARE PR@t'$$ !
i
lI
eal ly we would like to pl an the entire software project at the very beginning of the iprocess, then follow that plan until the target software hnally has been delivered to j !
the client This is impossible, however, because we lack enough information during l
2 I
t e i nitial phases to be able to draw up a meaningful pl an for the compl ete project. i
For example, during the requirements phase any sort of planning (other than just for j
the requi rements phase itselt ) is futile 1 : q.SUPPOSC that t he devel opers have buil t a rapi d protot ype (Section 3 3) and the I , r
j '
cl ient feels that the rapi d prot otype indeed encapsulates the key functi onali ty of the j : i
target product lt m ight seem that at this stage it would be possible to provide reason- i j
Trang 9p posal at the end of the requirements phase and at the end of the specihcations phase,
('I t k analogous to the difference between a rough sketch and a detailed blueprint.By the
-,
lt ! l of what the client needs ln contrast, by the end of the specifications phase, at which
l E i time the cli ent signs a document stating precisel y what is goi ng to be built,the de- '
1 r ; relative range of cost estimat es for the vari ous phases of the li fe cycle For exampl e,
( i : i i 1 suppose that, when a product passes its acceptance test at the end of the int egrati on :
l t :
)
Jt ( phase and is deli vered to t he cl ient, i ts cost is found to be $1 milli on If a cost estimat e
E
1I i l. had been m ade m idway through the requirem ents phase,i is likely that it woul d
' l' t 1 t have been somewhere in the range ($0 25 mil lions $4 mi llion) Similarly, if the cost
: 11 l I
' ''
j j estimat e had been made mi dway through t he specifi cations phase the range of l ikel y )
il ' esti mates woul d have shrunk to ($0 5 mil lion, 52 milli on) Furthermore, if t he cost
!! '? ( j : estim ate had been m ade at the end of the specihcations phase, that is, at the earliest ;
Trang 10q 'II: I
' j
' j
M ESTI MATI NG DURATI ON AND COST 25@ 1
; ' l
i'. j s- possibl e appropri ate time
,the result probably would have been in the still relatively j
e, wi de range of ($0 67 milli on, $1 5 milli on) In other words, cost estimati on is not an ' i
1
le exact science, for the reasons given in the next section The data on w hich this m odel j j
:
l g is based are ol d, i ncludi ng five proposals submi tted to the U S Air Force El ect roni c 1
h S st ems Divisi on (Devenny l 9761, and estimati on techniques have i mproved since ! l
r- that tim e Nevertheless, the overall shape of the curve in Figure 9 probably has not 'I 1 '
l e changed overmuch Consequently, a premature duration or cost estimate t hat i an I
h been signed off by the client, is likely E 1
ld estim ate made before the specihcations ave
; j
to be considerably Iess accurate than an estim ate m ade at the correct tim e 1
ry com pleted; that is
,meaningful estimating and planning now can be carried out p
' I
.
- I l
IC
l j ' i t
e @ 2 ESTIM ATINO p uu Tlox ANp tosT l l
t The budge t i s an i n e gr a par t o f an y s of t war e pr o e t mana gement pl an Be f or e ) ' j ,
ly d velopm ent com mences
,the client wants to know how much he or she will have ) : ie
'st ' to pay for the product.If the development team underestim ates the actual cost, the i
l
: St devel opment organi zation can Iose money on the project On the other hand, if the i I ' ,
' developm ent team overestim ates, then the client may decide that, on the basis of cost- l
. beneht analysis or return on investment, there is no point in having the product built '* ' )j !
ln fact,two types of costs are associated with software developm ent The first ;
s the internal cost, the cost to the developers; the second is the external cost, the 1
I ' j I
cost o t he cl i ent The i nt er nal cost i ncl udes t he s al ari es of he devel opment t eams, ! j
managers, and support personnel involved in the project' , t he cost of the hardware and j ! : 1 1 l
s of t war e for devel opi ng t he pr oduct' , and t he cos t of over head such as rent , ut i t es, t I l I I
and salari es of seni or management Alt hough the external cost generall y is based j' ! j j
) j
on the i nternal cost plus a prol it margin, i n some cases economic and psychol ogical l l
factors are im portant For exam ple, developers who desperately need the work m ay r ' '
,i I !
l when a cont ract is to be awarded on the basis of bi ds The cli ent may reject a bid r l ) I
i
t ha t s i gni hc ant l y I ower han l t he t her bi ds on t he gr ounds ha t he qua l y of he ) j j
r s ul t ng pr oduct pr obabl y a s woul d be i gni f ant l y l ower.A developm ent team l ,
(I
t herefore may try to come up with a bid that will be slightly
, but not signit icantly, j ë j
lower than what they believe w ill be their competitors' bids ' !l l
E
Another important part of any pl an is estimating the durat ion of the project The l l ; 1
client certainly wants to know when the finished product will be delivered lf the j j
development organi zati on is unable to keep to i ts schedul e, then at best the organiza- ! 1
l l
tion Ioses credibility
,at worst penalty clauses are invoked In alI cases the managers
l y
I
$ j l I
,' jt
i 1
ti '
Trang 11j , Conver sel y, i fhe devel opment or gani zat i on over est i mat es t he t i me needed t o bui l
1 ! the product,then there i s a good chance that the cli ent will go elsewhere.
I ' : i Sackman and co-workers observed dift krences of up to 28 to l between pai rs of
I and m easured the tim e it took them to perform tasks Iike coding and debugging.Then '
' Il ! l they observed, say, two beginners w ho had been in the profession for the same short
11 ; i length of time and had simi lar educati onal backgrounds.Comparing w orst and best
l
( jut ; sjze, 8 to l i n product
1 ' : pertormances, they observed di tterences ot 6 to 1 n pro
,!i ! perform ances on one product were by tw o program mers
, each of whom had 1 l years
;l! t t o ef xperience. Even when the best and worst cases were rem oved from saekm an
tl 5 Another human tactor that can affect estimation is that, in a tree country, there q
. l 1 1 is no way of ensuri ng that a cri tical staff member will not resi gn during t he project '
l Time and m oney then are spent attem pting to lill the vacated position and integrate
j '
.
t' 1 i the replacement into the t eam or in reorganizing the remai ning team members t o
, l ' compensat e f or he l oss Ei t her way, s chedul es sl i p and est i mat es come uns t uck.
Trang 12'
:
l
! I
@ a ESTI MATI NG DuuTl oN ANo CosT %*1 l l
I 7 :
lines of code be counted or data det ini tions as wel l? And should comments be 1
0 counted? If not, there is a danger that programmers will be reluctant to spend h t ( '
r I
Of time on w hat they perceive to be 'bnonproductive'' comm entings but f comment s I I j
: ir are coun ted then the opposi te danger is t hat programmers wil l wri te reams of ! I I
' Ut comments n an a i ttempt to boost t heir apparent producti vi ty Also what about l i 1 j
2 , count i ngjob control l anguage stat ements? Another probl em is how changed l ines l ' I
l tS or deletedli nes are counted i n the course of enhaneing a product to improve l.
' lines of code is decreased Reuse of '
: 1
'rt code (Section 8.I also complicat es line counti ng: If reused code i s modifi ed, à ; j
tSt how is it counted? And what if code is inherited from a parent class (Section I ,
'Ct 7.8): 7 In short, the apparently strai ghtforward metri c of lines of code i s anything 8
l :
-j !
4. N ot a11 the code written is delivered to the client. lt is not uncom mon for halt the .,
L rs code to eonsist of tools needed to support the development effort. 1)
ce 6 The number of Iines ofcode in the finalproduct can be determ ined only when the l ,
' basi ng cost est i mat i on on l nes of code h ' m pr oduct compl et el y hni s hed Ther et or e, (- ;
is doubly dangerous To start the estimati on process,the numberof li nes of code in ) : )
:re the hnished productm ust be estim ated.Then,this estim ate is used to estim ate the ' i
ct cost of the product Not only is there uncertainty in every costing technique, but
tte it the input to an uncertain cost estim ator itself is uncertain, nam ely, the number ;
to of Iines of code in a product that has not yet been built, then the reliability ofthe '
r '
resulting cost estimate is unlikely to be very high ' r I y
j ' Because the num ber of lines of eode is so unreliable, other metrics m ust be con- , (
i de r ed So- c al l ed of t war e s ci enc e g l l t ea d, 1 9771 pr opos es ar i t of me as ur es ! j
-of product size These are derived from the fundamental metrics of software science, )
l )j
namely, the num ber of operands and operators in the software product and the num- ;
'
unique operands and uni que operat ors As wi th li nes of code, t hese numbers i
j
'l ber ot
1
C can be determ ined only att'er the produd ash been com pleted, severely redueing the k $ i
ed predictive power of the metrics. Also, m any stu dies have cast doubt on the validity ! î)
)nt based on measurable quantiti es that can be determi ned early in the software process r
lg 5 For example, van der Poel and Schach put forward the FFP metric for cost estima- t, j
nd tion of m edium-scale data processing products, that is, produets that take between 2 ' C I
of and 10 person-years to complete gvan der Poel and Schach, 19831 The three basi c ) !
structural elem ents of a data-processing product are its files, flow s, and processes; t
C j 7
'
( t
Trang 13: j j the name FFP i s an acronym formed from the i niti al letters of those el ements A
1 I fi le i s def ined as a col lecti on of l ogically or physically rel at ed records permanentl y '
i l j res ident i n the product', transact ion and temporary files are excl uded. A fl ow is a data
: wher e J i a const ant hat wi l var y f om or gani zat i on t o organi zat i on.Constantd is a
1 I 1 measur e of t he ef f ci ency (pr oduct i vi t y) of t he sof t ware devel opment process wi t hi n .
I
1 j ! that organization The size of a product simply is the sum of the number of liles
, 1 i flows and
processes, a quant ity that can be determi ned once the architectural desi gn
: !i' i !' is complete.The cost then is proportional to t he size the constant of proporti onal it y :
( j j 1 d bei ng determi ned by a least-squares fi t to cost data relati ng to products previousl y
developed by that organization Unlike m etrics based on the num ber of lines of code, '
l
E; 1
'
i 1 1 11 i i t he cost can be est imat ed bef or e codi ng begi ns.
l i The validity and reliability of the FFP m etric were dem onstrated using apurposive
; ! is based on the number of input item s, lnp, output item s, Out, inquiries, lnq, m aster
I files, M af, and i nterfaces, lnf In i ts simplest form the number of function point s, F#, ,
1 Because this is a measure of the product's si ze it can be used for cost estimat ion and
I Productivity estimation.
For exam ple an average input is assigned 4 function points,as reiected in
equa-t1 1 ! t ! : t on ( 9.3) but a simple input is assigned only 3, whereas a complex input is
-j j I unadjus t ed f unct i on poi nts (&F#)
1 j l second, he echni cal compl exi t y f act or (FcF) comput ed Thi s i a measur e of
1 r the effect of 14 technical tactors, such as high transaction rates, perform ance criteria j'uj
Trang 14' !'' l
: l
! I
:
j j >f
Mast er 1)
! ,
!
; I '
a Flgure @.Q Table of function point values
! I
l e
q !6
t
nt
j : , 1 8
j
Flgure @.a Technical factors for . I
ia function points than using K DSI.For example,Jones has stated thathe observed errors .
Jf i n excess of 800 percent counting KDSI, but onl y ( emphasis addedl 200 percent in ;
Trang 15( 1I là ( Devel opment costs $1 , 043, Q00 $590, 000
i !i! ' i : exa pm Ie shown in Figure 9.4 glones, 19871 The same product was coded bot h in :
: Ada and t he results compared First, consider KDSI per person- '
: statements Use of cost per source statement as a m easure o e
:JII ! i that again it is m ore efucient to code in assem bler than in Ada
I ( 9 2) uf f r f om t he a me di s adv ant age: Pr oduc t ma i nt e nan ce of t en s i nac c ur a el y
! To take an extreme case, itis possible to replace every line of aproduct by acompletely
I different line without changing the total num ber of lines of code
l
1 ! b symons o pr ovi de mor e a cur at e wa y of omput i ng he una d us t ed f unc t on '
1 ' 8 poi nt s (& F#) symons, 19911 The sof t ware idecompos ed i nt o a s et of component
) t hen icomput ed f om t hes e i nput s, pr ocesses and out put s Mk 1 f unct i on poi nt s ar e
.î (,i 1 1 ! ; widel y used all over the world (Boehm, 1997J.
Trang 16. i j
'j:
1. l ESTI MATING DURATI ON AND C05T Q*5 è 1
@.Q
1
ë' j
duration and project cost, while taki ng into account as many as possi bl e of the tac- l.
t ors that can affect their estimates These i nclude the skill l evels of the personnel, j ,
the compl exi ty of the project, the size of t he project (cost increases wi th size, but l
' i l ar i y of he devel opment t eam wi t h t he appl i cat i on 1 i
area, the hardware on which the product is to be run, and availability of CA SE tools 1
Another factor is the so-cal led deadline ettect lf a project has to be completed by a ; j I
g ' '
certain tim e, the effort in person-m onths is greater than if no constraint is placed on I
E
j icompletion time.
i '
1 I1
'xpee: Judg- en: by A nellgy ln this technique, a number of experts i 1
l
he are Consulted An expert arrives at an estimate by com paring the target product to j
i l involved and noting the sim - ! I '
in completed products with which the expel' was act ve y i
j
j n- il ari ti es and differences For example, an expert may compare t he target product to a l 1
im ilar product developed 2 years ago for which the data were entered in batch m ode, ! I
I er what complex; this increases the time and effort by 25 percent. Finall y, the target j j
ies product has to be developed in a Ianguage w ith which m ost of the team m em bers are # !
en unfam iliar, thus increasing time by 15 percent and effort by 20 percent Com bining I
na t ook 12 months to complete and required I00 person-months, the target product will r ' I
ly take 15 months and consume l30 person-m onths ë i'
gts, concludes that the target product w ill take l3.5 m onths and 140 person-months The r'
( p
r ct. Other com es up with the hgures of I6 m onths and 95 person-m onths How can the
' hes e t hr ee exper t be reconci l ed? One t echni que i t he Del phi t ech- ; i $
k rd . ln this technique. the experts work independently. Each produces an estimate and ) I j j
a rationale for that estim ate These estim ates and rationales then are distributed to ' lj i 'on
à re gr oup meet i ngs ake pl ace dur i ng t he i erat i on pr ocess.
Val uat i on of r eal est at e f r equent l y i s done on t he basi s of exper t judgment by j l
I ogy An appr ai s er wi l ar ri ve at a val uat i on by compar i ng a house wi t h si mi l ar t 1
houses t hat have been sold recently Suppose that house A is to be val ued, house B j p , j next door has just been sol d for $205, 000, and house C on t he next street was sold ! I
; I
3
months ago for $2 1 8, 000 The appraiser may reason as follows' House A has one : 11e- more bathroom than house B, and the yard is 5,000 square feet larger House C is ! 1
Iact approximately the salne size as house A, but its roof is in poor condition On the l ' '
t i
Trang 17i l , a figure of $2 l5,000 for house A.
1 : ! ln the case of sottware product s, expert judgment by anal ogy is less preci se
I : onl y a gues s s wi l r s ul t n hopel es s y i nc or r ct os t es t mat es n a ddi t on, unl es st h
1 j ! r e xper t a e bl es s ed wi t ot al ec al l or ha ve ept et a l d r c or ds ) t hei r e col l c i on s
I
1 : ofcompl et ed products may be suffi ci ently inaccurate as to i nvali date their predicti ons.
'
j 1 Finall y,experts are hum an and,therefore, have biases thatm ay affecttheir predictions.
j i At the same time, t he resul ts of esti mation by a group of expert s shoul d refl ect thei r
1 i a BoH om -vp A ppeootll one way of trying to reduce the errors resulting
'J i i from eval uati ng a product as a whol e i s to break the product int o smal lercomponents
; ! j ; j : E t o pr ovi de an overal l hgure.This approach has the advantage that estim ating costs
-: 17 1 i for several sm aller components generally is quicker and more accurate than for one
.:' 1', I w ith t he object-oriented paradigm, the i ndependence of the vari ous cl asses hel ps
) $ ' 1 the bott om-up approach.However, interactions am one the various obiects in the
' then can be com puted using the m odel O n the surface an algorithmic costestim ation
m odel is superior to expertopinion, because a hum an expert, as pointed outpreviously, i
! j is subject to biases and may overl ook certain aspects of both the compl et ed and tar get
' products ln contrast, an algorithmic costestimation m odel is unbiased',every product
is treated the same way The danger with such a model is that its estim ates are only as ,
: l d as the underl yi ng assumpti ons
.Forexam ple, underlying the function point model
l ! is the assum ption that every aspect of a product is em bodied in the five quantities on 1
!: i à the right-hand side ot equation (9.3) and the 14 technical factors A further problem
(
1 1 è i t hat a si gni f cant amount of subject i ve judgment oft en i s needed i n deci di ng what
li i ' lues t o assign to the parameters of t he model.For exam ple. it frequently is unclear
T : I whet her a speci f c t echni cal fact or of t he f unct i on poi nt model shoul d be r at ed a (
l i M any algorithm ic costestim ation models have been proposed
Some are basedon
I m athem atical theories as to how soltware is developed Other m odels are statistically t
l
,l arge numbers of projects are studied and empirical rules determi ned from the (. l 1 jI data. Hybrid m odels incorporate mathematical equations, statistical m odeling, and tl
Trang 187 I'j' t'
ZOCOM O is an acronym tormed from the first two The phrase COCOM O model should not be used i I
t' Ietters ot' each word n i co nstructive Co st M odel. After all, the M O in COCOM O already stands for ' j
Any connection with Kokomo, Indiana, is purely 'model.' I l
! (
d
: : ( t
) ir expert judgment The most important hybrid model is Boehm s ,
described in detail in the next section (See the Just in Case You W anted to Know box r i
cocoM o actually is a series ofthree m odels,ranging from a macroestimation m odel i l
e that treats t he product as a whole to a microestimati on model that treats the product y l
:
, ' t !
as The constants 3 2 and l 05 are the values that best htted the data on t he organi c mode ; ) 1
le1 products used by Boehm to develop interm ediate COCOM O. è. 1 '
on Next, thi s nominal val ue must be multipli ed by l 5 wftware development e' #' t pr/ f I
( l L
y multl pl iers These multi pl iers and t heir values are given in Figure 9 5 Each mul ti plier j t
he can have up to six values For exam ple, the product complexity m ultiplier is assigned i 1
I
'
i J
Trang 19l l l2 000 delivered source instructions
,then on average shared among many activities, including coding As
t j 1 i when the correspondi ng parameter is nominal.
: l k é 1 Boehm has provided gui delines to hel p the devel oper determine whether the pa-
,
:
': j q !
r t; l: ! t ram eter should indeed be rated nom inal or whether the rating is lower or higher.For
.( (( , ; exam ple, consider again the m odule com plexity m ultiplier If the control operations
# i! i ' of the m odule essentially consist of a sequence of the constructs of structured pro
l ushes the rating to pcr
.v high Finally, multiple resource scheduling w ith
dynami-,
cally changing priorities and microcode-level control ensures that the rating is extra l
I hi gh Thes e r at i gs appl y t o cont r ol ope r t ons A modul e al s o has o be val ua t d
j 1 f om t he vi ewpoi n of omput a i onal oper a i ons , de vi c e- de pend ent ope r t ons , nd ,. j i , dat a management operat i ons For det ai l on t he cri t eri a for comput i ng each of he '
'
t 15 multi pliers, refer t o L Boehm, 1 98 11.
) ; To see how thi s works, gBoehm, 19841 71 gives the exampl e of
ba s d communi ca t ons pr oc es s ng s of t war e or hi g hl y r el i abl e ne w el e t oni e f un ds
1 L t ns f er ne t wor k,with performance, developm ent schedule, and interface requi
re-' ! This product fits the description of embedded mode and is estim ated to be
Trang 20E ;
! 1
'
E I ? :
*
.2 ESAIM ATING DURATION AND COST Q*
-.)
'
r1 l ' :
I ' '
Execution time constroint 1 OO 1 1 1 3O 1 66 l '
i IMain storage constraint 1 OO 1 O6 1 2 1 1 56 , l ;
1 I Vi
rual mcchine volatiyw 0.87 1 OO 115 1 30 i : ':
j
Anal yst capabi les 1 46 i 9 1 OO 0.86 0 71 l I
r Virual machine experience* 1 2 1 1 O 1 OO 0.90 '; 1 '1
j
l Use of modern programming practices 1.2: 1 O 1 0O O 9 1 0 82 i j
l r. Us e of soh wor e t ool s 1 2z 1 O 1 OO O 9 1 0 83 jt l( t
, kequi r ed devel opment schedul e 1 23 i O8 1 OO 1 O: 1 O ! f iI ! I :
I 2 I A'For a given sohware product, the underlying viruol mochine is lhe complex of hordware and i j
I sohware (operating sysfem, dotabase managemenfsystem) it ccll on to occomplish its task ; !.j'
l . L Fl gvee *.5 I nt ermedi at e COCOMO sof f ware devel opment ef f or t mul t pl i er s (Boehm, 1 98:1 : 1 j ; @
The estimated devel opment effort i s obtained by multi pl ying t he nominal effort I 1 ë
h 1 5 mul t pl i ers The r ati ngs of t hes e mul t pl i ers and t hei r val ues ar e gi ven i n i (
s num ber then is used in additional formulas to determ ine dollar costs develop- 1 1
l l
s ment schedules, phase and activity distributions,computer costs annual maintenance I , j
costs, and other related items' , for detai ls, see gBoehm, l 98 1 1 lntermedi ate COCOM O l I
j is a com plete algorithm ic cost estim ation m odel, giving the user virtually every con- ( li ' i
I termediate CO CO M O has been validated with respect to a broad sam ple of i 1 '
r I j
63 projects covering a wi de variety of appli cation areas The results of applying j ; I !
E ;i