Clean Architecture


Chapter 29 Clean Embedded Architecture



Download 6,37 Mb.
Pdf ko'rish
bet162/259
Sana26.02.2022
Hajmi6,37 Mb.
#465587
1   ...   158   159   160   161   162   163   164   165   ...   259
Bog'liq
Clean Architecture A Craftsman’s Guide to Software Structure and Design by Robert C. Martin (z-lib.org)

Chapter 29 Clean Embedded Architecture 
262
A C l e a n E m b e d d e d A rc h it e c t u r e I s a Te s ta b l e 
E m b e d d e d A rc h it e c t u r e
Let’s see how to apply some of the architectural principles to embedded 
software and firmware to help you eliminate the target-hardware bottleneck. 
Layers
Layering comes in many flavors. Let’s start with three layers, as shown in 
Figure 29.1. At the bottom, there is the hardware. As Doug warns us, due to 
technology advances and Moore’s law, the hardware will change. Parts 
become obsolete, and new parts use less power or provide better performance 
or are cheaper. Whatever the reason, as an embedded engineer, I don’t want 
to have a bigger job than is necessary when the inevitable hardware change 
finally happens.
Figure 29.1 
Three layers
The separation between hardware and the rest of the system is a given—at 
least once the hardware is defined (Figure 29.2). Here is where the problems 
often begin when you are trying to pass the App-titude test. There is nothing 
that keeps hardware knowledge from polluting all the code. If you are not 
careful about where you put things and what one module is allowed to know 
about another module, the code will be very hard to change. I’m not just 
talking about when the hardware changes, but when the user asks for a 
change, or when a bug needs to be fixed.
www.EBooksWorld.ir


The Target-Hardware Bottleneck
263
Figure 29.2 
Hardware must be separated from the rest of the system
Software and firmware intermingling is an anti-pattern. Code exhibiting this 
anti-pattern will resist changes. In addition, changes will be dangerous, often 
leading to unintended consequences. Full regression tests of the whole system 
will be needed for minor changes. If you have not created externally 
instrumented tests, expect to get bored with manual tests—and then you can 
expect new bug reports.

Download 6,37 Mb.

Do'stlaringiz bilan baham:
1   ...   158   159   160   161   162   163   164   165   ...   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