Design Patterns : Elements of Reusable Object-Oriented Software



Download 4,06 Mb.
Pdf ko'rish
bet31/288
Sana07.04.2022
Hajmi4,06 Mb.
#535140
1   ...   27   28   29   30   31   32   33   34   ...   288
Bog'liq
GOF Design Patterns

Designing for Change 
The key to maximizing reuse lies in anticipating new requirements and changes 
to existing requirements, and in designing your systems so that they can evolve 
accordingly. 
To design the system so that it's robust to such changes, you must consider how 
the system might need to change over its lifetime. A design that doesn't take 
change into account risks major redesign in the future. Those changes might involve 
class redefinition and reimplementation, client modification, and retesting. 


Design Patterns: Elements of Reusable Object-Oriented Software 
37 
Redesign affects many parts of the software system, and unanticipated changes 
are invariably expensive. 
Design patterns help you avoid this by ensuring that a system can change in specific 
ways. Each design pattern lets some aspect of system structure vary independently 
of other aspects, thereby making a system more robust to a particular kind of 
change. 
Here are some common causes of redesign along with the design pattern(s) that 
address them:
1.
Creating an object by specifying a class explicitly.
Specifying a class 
name when you create an object commits you to a particular implementation 
instead of a particular interface. This commitment can complicate future 
changes. To avoid it, create objects indirectly.
Design patterns: Abstract Factory (99), Factory Method (121), Prototype 
(133). 
2.
Dependence on specific operations.
When you specify a particular operation, 
you commit to one way of satisfying a request. By avoiding hard-coded 
requests, you make it easier to change the way a request gets satisfied 
both at compile-time and at run-time.
Design patterns: Chain of Responsibility (251), Command (263). 
3.
Dependence on hardware and software platform.
External operating system 
interfaces and application programming interfaces (APIs) are different on 
different hardware and software platforms. Software that depends on a 
Download 4,06 Mb.

Do'stlaringiz bilan baham:
1   ...   27   28   29   30   31   32   33   34   ...   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