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



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

of contention with the Cargo 
AGGREGATE
.


This leaves the 
Delivery History
with no persistent state. At this point, there is no real need to
keep it around. We could derive 
Delivery History
itself whenever it is needed to answer some
question. We can derive this object because, although the 
ENTITY
will be repeatedly recreated, the
association with the same 
Cargo
object maintains the thread of continuity between incarnations.
The circular reference is no longer tricky to create and maintain. The 
Cargo Factory
will be
simplified to no longer attach an empty 
Delivery History
to new instances. Database space can
be reduced slightly, and the actual number of persistent objects might be reduced considerably,
which is a limited resource in some object databases. If the common usage pattern is that the user
seldom queries for the status of a 
Cargo
until it arrives, then a lot of unneeded work will be
avoided altogether.
On the other hand, if we are using an object database, traversing an association or an explicit
collection is probably much faster than a 
REPOSITORY
query. If the access pattern includes frequent
listing of the full history, rather than the occasional targeted query of last position, the
performance trade-off might favor the explicit collection. And remember that the added feature
("What is on this 
Carrier Movement
?") hasn't been requested yet, and may never be, so we
don't want to pay much for that option.
These kinds of alternatives and design trade-offs are everywhere, and I could come up with lots of
examples just in this little simplified system. But the important point is that these are degrees of
freedom within the same model. By modeling 
VALUES

ENTITIES
, and their 
AGGREGATES
as we have,
we have reduced the impact of such design changes. For example, in this case all changes are
encapsulated within the 

Download 7,21 Mb.

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