Domain-Driven Design: Tackling Complexity in the Heart of Software


Figure 16.7. Refactoring the model to conform to the new layering



Download 7,21 Mb.
Pdf ko'rish
bet309/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   305   306   307   308   309   310   311   312   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

Figure 16.7. Refactoring the model to conform to the new layering
structure


This factoring makes the 
Route Bias Policy
more explicit while making 
Transport Leg
more
focused on the fundamental concept of transportation capability. A large-scale structure based on
a deep understanding of the domain will often push the model in directions that clarify its meaning.
This new model now smoothly fits into the large-scale structure.
Figure 16.8. The restructured and refactored model
A developer accustomed to the chosen layers can more readily discern the roles and dependencies
of the parts. The value of the large-scale structure increases as the complexity grows.
Note that although I'm illustrating this example with a modified UML diagram, the drawing is just a
way of 
communicating
the layering. UML doesn't include this notation, so this is additional
information imposed for the sake of the reader. If code is the ultimate design document for your
project, it would be helpful to have a tool for browsing classes by layer or at least for reporting
them by layer.
How Does This Structure Affect Ongoing Design?


Once a large-scale structure has been adopted, subsequent modeling and design decisions must
take it into account. To illustrate, suppose that we must add a new feature to this already layered
design. The domain experts have just told us that routing restrictions apply for certain categories
of hazardous materials. Certain materials may not be allowed on some transports or in some
ports. We have to make the 
Router
obey these regulations.
There are many possible approaches. In the absence of a large-scale structure, one appealing
design would be to give the responsibility of incorporating these routing rules to the object that
owns the 

Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   305   306   307   308   309   310   311   312   ...   343




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