Design Patterns : Elements of Reusable Object-Oriented Software



Download 4,06 Mb.
Pdf ko'rish
bet263/288
Sana07.04.2022
Hajmi4,06 Mb.
#535140
1   ...   259   260   261   262   263   264   265   266   ...   288
Bog'liq
GOF Design Patterns

A Target for Refactoring 
One of the problems in developing reusable software is that itoften has to be 
reorganized or 
refactored
[OJ90]. Designpatterns help you determine how to 
reorganize a design, and theycan reduce the amount of refactoring you need to 
do later. 
The lifecycle of object-oriented software has several phases.Brian Foote 
identifies these phases as the 
prototyping

expansionary
, and 
consolidating 
phases 
[Foo92]. 


Design Patterns: Elements of Reusable Object-Oriented Software 
391 
The prototyping phase is a flurry of activity as the software isbrought to life 
through rapid prototyping and incremental changes,until it meets an initial set 
of requirements and reaches adolescence.At this point, the software usually 
consists of class hierarchies thatclosely reflect entities in the initial problem 
domain. The main kindof reuse is white-box reuse by inheritance. 
Once the software has reached adolescence and is put into service, itsevolution 
is governed by two conflicting needs: (1) the software mustsatisfy more 
requirements, and (2) the software must be more reusable.New requirements usually 
add new classes and operations and perhapswhole class hierarchies. The software 
goes through an expansionaryphase to meet new requirements. This can't continue 
for long,however. Eventually the software will become too inflexible andarthritic 
for further change. The class hierarchies will no longermatch any problem domain. 
Instead they'll reflect many problemdomains, and classes will define many 
unrelated operations andinstance variables. 
To continue to evolve, the software must be reorganized in a processknown as 
refactoring
. This is the phase in which frameworksoften emerge. Refactoring 
involves tearing apart classes into special-and general-purpose components, 
moving operations up or down the classhierarchy, and rationalizing the interfaces 
of classes. Thisconsolidation phase produces many new kinds of objects, often 
bydecomposing existing objects and using object composition instead ofinheritance. 
Hence black-box reuse replaces white-box reuse. Thecontinual need to satisfy more 
requirements along with the need formore reuse propels object-oriented software 
through repeated phases ofexpansion and consolidation

expansion as new 
requirements aresatisfied, and consolidation as the software becomes more general. 
This cycle is unavoidable. But good designers are aware of thechanges that can 
prompt refactorings. Good designers also know classand object structures that 
can help avoid refactorings

their designsare robust in the face of requirement 
changes. A thoroughrequirements analysis will highlight those requirements that 



Download 4,06 Mb.

Do'stlaringiz bilan baham:
1   ...   259   260   261   262   263   264   265   266   ...   288




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish