Clean Architecture


Th e E f f e c t o f a C yc l e i n t h e C o m p o n e n t



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

Th e E f f e c t o f a C yc l e i n t h e C o m p o n e n t 
D e pe n d e n c y G r a ph
Suppose that a new requirement forces us to change one of the classes in 
Entities
such that it makes use of a class in 
Authorizer
. For example, let’s 
say that the 
User
class in 
Entities
uses the 
Permissions
class in 
Authorizer
. This creates a dependency cycle, as shown in Figure 14.2.
This cycle creates some immediate problems. For example, the developers 
working on the 
Database
component know that to release it, the component 
www.EBooksWorld.ir


Chapter 14 Component Coupling
116
must be compatible with 
Entities
. However, with the cycle in place, the 
Database
component must now 
also
be compatible with 
Authorizer
. But 
Authorizer
depends on 
Interactors
. This makes 
Database
much more 
difficult to release. 
Entities

Authorizer
, and 
Interactors
have, in 
effect, become one large component—which means that all of the developers 
working on any of those components will experience the dreaded “morning 
after syndrome.” They will be stepping all over one another because they 
must all use exactly the same release of one another’s components.
Figure 14.2 
A dependency cycle
But this is just part of the trouble. Consider what happens when we want to 
test the 
Entities
component. To our chagrin, we find that we must build 
and integrate with 
Authorizer
and 
Interactors
. This level of coupling 
between components is troubling, if not intolerable.
You may have wondered why you have to include so many different libraries, 
and so much of everybody else’s stuff, just to run a simple unit test of one of 
your classes. If you investigate the matter a bit, you will probably discover that 
there are cycles in the dependency graph. Such cycles make it very difficult to 
isolate components. Unit testing and releasing become very difficult and error 
prone. In addition, build issues grow geometrically with the number of modules.
www.EBooksWorld.ir



Download 6,37 Mb.

Do'stlaringiz bilan baham:
1   ...   70   71   72   73   74   75   76   77   ...   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