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


When there is a lot of interaction between subdomains in separate



Download 7,21 Mb.
Pdf ko'rish
bet296/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   292   293   294   295   296   297   298   299   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

When there is a lot of interaction between subdomains in separate 
MODULES
, either
many references will have to be created between 
MODULES
, which defeats much of the
value of the partitioning, or the interaction will have to be made indirect, which makes
the model obscure.
Consider slicing horizontally rather than vertically. Polymorphism gives us the power to ignore a lot
of the detailed variation among instances of an abstract type. If most of the interactions across
MODULES
can be expressed at the level of polymorphic interfaces, it may make sense to refactor
these types into a special 
CORE MODULE
.
We are not looking for a technical trick here. This is a valuable technique only when the
polymorphic interfaces correspond to fundamental concepts in the domain. In that case,
separating these abstractions decouples the 
MODULES
while distilling a smaller and more cohesive
CORE DOMAIN
.
Therefore:
Identify the most fundamental concepts in the model and factor them into distinct


classes, abstract classes, or interfaces. Design this abstract model so that it expresses
most of the interaction between significant components. Place this abstract overall
model in its own 
MODULE
, while the specialized, detailed implementation classes are left
in their own 
MODULES
 defined by subdomain.
Most of the specialized classes will now reference the 
ABSTRACT CORE MODULE
but not the other
specialized 
MODULES
. The 
ABSTRACT CORE
gives a succinct view of the main concepts and their
interactions.
The process of factoring out the 
ABSTRACT CORE
is not mechanical. For example, if all the classes
that were frequently referenced across 
MODULES
were automatically moved into a separate
MODULE
, the likely result would be a meaningless mess. Modeling an 
ABSTRACT CORE
requires a deep
understanding of the key concepts and the roles they play in the major interactions of the system.
In other words, it is an example of refactoring to deeper insight. And it usually requires
considerable redesign.
The 
ABSTRACT CORE
should end up looking a lot like the distillation document (if both were used on
the same project, and the distillation document had evolved with the application as insight
deepened). Of course, the 
ABSTRACT CORE
will be written in code, and therefore more rigorous and
more complete.
[ Team LiB ]


[ Team LiB ]

Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   292   293   294   295   296   297   298   299   ...   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