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



Download 7,21 Mb.
Pdf ko'rish
bet246/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   242   243   244   245   246   247   248   249   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

Figure 14.8. The structure of an 
ANTICORRUPTION LAYER
You'll usually need some communications mechanism to connect the two subsystems, and
they could well be on separate servers. In this case, you have to decide where to place these
communication links. If you have no access to the other subsystem, you may have to put the


links between the 
FACADE
and the other subsystem. However, if the 
FACADE
can be integrated
directly with the other subsystem, then a good option is to put the communication link
between the 
ADAPTER
and 
FACADE
, because the protocol of the 
FACADE
is presumably simpler
than what it covers. There also will be cases where the entire 
ANTICORRUPTION LAYER
can live
with the other subsystem, placing communication links or distribution mechanisms between
your subsystem and the 
SERVICES
that make up the 
ANTICORRUPTION LAYER
's interface. These
are implementation and deployment decisions to be made pragmatically. They have no
bearing on the conceptual role of the 
ANTICORRUPTION LAYER
.
If you do have access to the other subsystem, you may find that a little refactoring over
there can make your job easier. In particular, try to write more explicit interfaces for the
functionality you'll be using, starting with automated tests, if possible.
Where integration requirements are extensive, the cost of translation goes way up. It may be
necessary to make choices in the model of the system under design that keep it closer to the
external system, in order to make translation easier. Do this very carefully, without
compromising the integrity of the model. It is only something to do selectively when
translation difficulty gets out of hand. If this approach seems the most natural solution for
much of the important part of the problem, consider making your subsystem a 
CONFORMIST
pattern, eliminating translation.
If the other subsystem is simple or has a clean interface, you may not need the 
FACADE
.
Functionality can be added to the 
ANTICORRUPTION LAYER
if it is 
specific to the relationship of
the two subsystems
. An audit trail for use of the external system or trace logic for debugging
the calls to the other interface are two useful features that come to mind.
Remember, an 
ANTICORRUPTION LAYER
is a means of linking two 
BOUNDED CONTEXTS
. Ordinarily, we
are thinking of a system created by someone else; we have incomplete understanding of the
system and little control over it. But that is not the only situation where you need a little padding
between subsystems. There are even situations in which it makes sense to connect two
subsystems of your own design with an 
ANTICORRUPTION LAYER
, if they are based on different
models. Presumably, in such a case, you will have full control over both sides and typically can use
a simple translation layer. However, if two 
BOUNDED CONTEXTS
have gone 
SEPARATE WAYS
yet still
have some need of functional integration, an 
ANTICORRUPTION LAYER
can reduce the friction
between them.

Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   242   243   244   245   246   247   248   249   ...   343




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2025
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