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



Download 7,21 Mb.
Pdf ko'rish
bet120/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   116   117   118   119   120   121   122   123   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

Handling Events
without contention.
This pushes us to consider a different
design.
Replacing the 
Delivery History's
collection of 
Handling Events 
with a query would allow
Handling Events
to be added without raising any integrity issues outside its own 
AGGREGATE
. This
change would enable such transactions to complete without interference. If there are a lot of
Handling Events
being entered and relatively few queries, this design is more efficient. In fact, if
a relational database is the underlying technology, a query was probably being used under the
covers anyway to emulate the collection. Using a query rather than a collection would also reduce
the difficulty of maintaining consistency in the cyclical reference between 
Cargo
and 
Handling
Event
.
To take responsibility for the queries, we'll add a 
REPOSITORY
for 
Handling Events
. The 
Handling
Event Repository
will support a query for the 
Events
related to a certain 
Cargo
. In addition, the
REPOSITORY
can provide queries optimized to answer specific questions efficiently. For example, if a
frequent access path is the 
Delivery History
finding the last reported load or unload, in order to
infer the current status of the 
Cargo
, a query could be devised to return just that relevant
Handling Event
. And if we wanted a query to find all 
Cargoes 
loaded on a particular 
Carrier
Movement
, we could easily add it.
Figure 7.6. Implementing Delivery History's collection of Handling
Events as a query makes insertion of Handling Events simple and free

Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   116   117   118   119   120   121   122   123   ...   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