Clean Architecture


Chapter 34 The Missing Chapter



Download 6,37 Mb.
Pdf ko'rish
bet195/259
Sana26.02.2022
Hajmi6,37 Mb.
#465587
1   ...   191   192   193   194   195   196   197   198   ...   259
Bog'liq
Clean Architecture A Craftsman’s Guide to Software Structure and Design by Robert C. Martin (z-lib.org)

Chapter 34 The Missing Chapter
320
This is very much an idealistic solution, though, because there are real-world 
performance, complexity, and maintenance issues associated with breaking up 
your source code in this way. 
A simpler approach that some people follow for their ports and adapters code 
is to have just two source code trees:

Domain code (the “inside”)

Infrastructure code (the “outside”)
This maps on nicely to the diagram (Figure 34.9) that many people use to 
summarize the ports and adapters architecture, and there is a compile-time 
dependency from the infrastructure to the domain.
Figure 34.9 
Domain and infrastructure code
This approach to organizing source code will also work, but be aware of the 
potential trade-off. It’s what I call the “Périphérique anti-pattern of ports and 
adapters.” The city of Paris, France, has a ring road called the Boulevard 
Périphérique, which allows you to circumnavigate Paris without entering the 
www.EBooksWorld.ir


Conclusion: The Missing Advice 
321
complexities of the city. Having all of your infrastructure code in a single 
source code tree means that it’s potentially possible for infrastructure code in 
one area of your application (e.g., a web controller) to directly call code in 
another area of your application (e.g., a database repository), without 
navigating through the domain. This is especially true if you’ve forgotten to 
apply appropriate access modifiers to that code. 
C o n c lu s i o n : Th e M i s s i n g A dv i c e 
The whole point of this chapter is to highlight that your best design 
intentions can be destroyed in a flash if you don’t consider the intricacies of 
the implementation strategy. Think about how to map your desired design 
on to code structures, how to organize that code, and which decoupling 
modes to apply during runtime and compile-time. Leave options open where 
applicable, but be pragmatic, and take into consideration the size of your 
team, their skill level, and the complexity of the solution in conjunction with 
your time and budgetary constraints. Also think about using your compiler to 
help you enforce your chosen architectural style, and watch out for coupling 
in other areas, such as data models. The devil is in the implementation 
details.
www.EBooksWorld.ir


This page intentionally left blank 
www.EBooksWorld.ir



Download 6,37 Mb.

Do'stlaringiz bilan baham:
1   ...   191   192   193   194   195   196   197   198   ...   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