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


Account to another. Figure 11.3. A transaction model



Download 7,21 Mb.
Pdf ko'rish
bet202/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   198   199   200   201   202   203   204   205   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

Account
to another.
Figure 11.3. A transaction model
This is the well-established concept of 
double-entry book-keeping
: Every credit has a
matching debit. Of course, like other conservation principles, it applies only to a closed
system, one that includes all sources and sinks. Many simple applications do not require this
rigor.
In his book, Fowler includes more elaborate forms of these models and considerable
discussion of the trade-offs.
This reading gives the developer (
Developer 1
) several new ideas. She shows the chapter to a
colleague (
Developer 2
) who has been working on some of the interest calculation logic with her
and who wrote the nightly batch program. Together, they rough out a change to their model,
incorporating some of the model elements they've read about.
Figure 11.4. The new model proposal


Then they pull in their domain expert (
Expert
) for a discussion of their new model ideas.
Developer 1:
With this new model, we make an 
Entry
into the 
Interest Account
for the interest
earned, rather than just adjusting the interestDueAmount. Then, another 
Entry
for the payment
balances it out.
Expert:
So now we'd be able to see a history of all the interest accruals as well as the payment
history? That's something we've been wanting.
Developer 2:
I'm not sure we've used "
Transaction
" quite right. The definition talks about
moving money from one 
Account
to another, not two entries that balance each other in the same
Account
.
Developer 1:
That's a good point. I was also worried that the book seems to make quite a point
about the transaction being created all at once. The interest payments can be several days late.

Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   198   199   200   201   202   203   204   205   ...   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