Clean Architecture


Chapter 14 Component Coupling



Download 6,37 Mb.
Pdf ko'rish
bet77/259
Sana26.02.2022
Hajmi6,37 Mb.
#465587
1   ...   73   74   75   76   77   78   79   80   ...   259
Bog'liq
Clean Architecture A Craftsman’s Guide to Software Structure and Design by Robert C. Martin (z-lib.org)

Chapter 14 Component Coupling
120
Th e Sta b l e D e pe n d e n c i e s Pr i n c i pl e
Depend in the direction of stability.
Designs cannot be completely static. Some volatility is necessary if the design 
is to be maintained. By conforming to the Common Closure Principle (CCP), 
we create components that are sensitive to certain kinds of changes but 
immune to others. Some of these components are 
designed 
to be volatile. We 
expect 
them to change.
Any component that we expect to be volatile should not be depended on by a 
component that is difficult to change. Otherwise, the volatile component will 
also be difficult to change.
It is the perversity of software that a module that you have designed to be easy to 
change can be made difficult to change by someone else who simply hangs a 
dependency on it. Not a line of source code in your module need change, yet your 
module will suddenly become more challenging to change. By conforming to the 
Stable Dependencies Principle (SDP), we ensure that modules that are intended to 
be easy to change are not depended on by modules that are harder to change.
Sta b i l it y
What is meant by “stability”? Stand a penny on its side. Is it stable in that 
position? You would likely say “no.” However, unless disturbed, it will remain 
in that position for a very long time. Thus stability has nothing directly to do 
with frequency of change. The penny is not changing, but it is difficult to 
think of it as stable.
Webster’s Dictionary
says that something is stable if it is “not easily moved.” 
Stability is related to the amount of work required to make a change. On the 
one hand, the standing penny is not stable because it requires very little work 
to topple it. On the other hand, a table is very stable because it takes a 
considerable amount of effort to turn it over.
How does this relate to software? Many factors may make a software 
component hard to change—for example, its size, complexity, and clarity, among 
www.EBooksWorld.ir



Download 6,37 Mb.

Do'stlaringiz bilan baham:
1   ...   73   74   75   76   77   78   79   80   ...   259




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