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


Cargo . Figure 7.10. The Allocation Checker acts as an



Download 7,21 Mb.
Pdf ko'rish
bet126/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   122   123   124   125   126   127   128   129   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

Cargo
.
Figure 7.10. The Allocation Checker acts as an 
ANTICORRUPTION LAYER
presenting a selective interface to the Sales Management System in
terms of our domain model.


The 
Allocation Checker
will translate between 
Enterprise Segments
and the category names
of the external system. The 
Cargo Repository
must also provide a query based on the
Enterprise Segment
. In both cases, collaboration with the 
Enterprise Segment
object can be
used to perform the operations without breaching the 
Segment's
encapsulation and complicating
their own implementations. (Notice that the 
Cargo Repository
is answering a query with a count,
rather than a collection of instances.)
There are still a few problems with this design.
We have given the 
Booking Application
the job of applying this rule: "A 
Cargo
is accepted
if the space allocated for its 
Enterprise Segment
is greater than the quantity already
booked plus the size of the new 
Cargo
." Enforcing a business rule is domain responsibility
and shouldn't be performed in the application layer.
1.
It isn't clear how the 
Booking Application
derives the 
Enterprise Segment
.
2.
Both of these responsibilities seem to belong to the 
Allocation Checker
. Changing its interface
can separate these two 
SERVICES
and make the interaction clear and explicit.
Figure 7.11. Domain responsibilities shifted from Booking Application
to Allocation Checker


The only serious constraint imposed by this integration will be that the 

Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   122   123   124   125   126   127   128   129   ...   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