Clean Architecture



Download 6,37 Mb.
Pdf ko'rish
bet141/259
Sana26.02.2022
Hajmi6,37 Mb.
#465587
1   ...   137   138   139   140   141   142   143   144   ...   259
Bog'liq
Clean Architecture A Craftsman’s Guide to Software Structure and Design by Robert C. Martin (z-lib.org)

Clean Architecture?
223
Let’s also assume that the state of the game is maintained on some persistent 
store—perhaps in flash, or perhaps in the cloud, or maybe just in RAM. In 
any of those cases, we don’t want the game rules to know the details. So, 
again, we’ll create an API that the game rules can use to communicate with 
the data storage component.
We don’t want the game rules to know anything about the different kinds of 
data storage, so the dependencies have to be properly directed following the 
Dependency Rule, as shown in Figure 25.2.
Figure 25.2 
Following the Dependency Rule
C l e a n A rc h ite c t u r e ?
It should be clear that we could easily apply the clean architecture approach in 
this context,
1
with all the use cases, boundaries, entities, and corresponding data 
structures. But have we really found all the significant architectural boundaries?
For example, language is not the only axis of change for the UI. We also 
might want to vary the mechanism by which we communicate the text. For 
example, we might want to use a normal shell window, or text messages, or a 
chat application. There are many different possibilities.
That means that there is a potential architectural boundary defined by this 
axis of change. Perhaps we should construct an API that crosses that 
boundary and isolates the language from the communications mechanism; 
that idea is illustrated in Figure 25.3.
1. It should be just as clear that we would not apply the clean architecture approach to something as trivial as 
this game. After all, the entire program can probably be written in 200 lines of code or less. In this case, 
we’re using a simple program as a proxy for a much larger system with significant architectural boundaries.
www.EBooksWorld.ir



Download 6,37 Mb.

Do'stlaringiz bilan baham:
1   ...   137   138   139   140   141   142   143   144   ...   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