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



Download 7,21 Mb.
Pdf ko'rish
bet208/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   204   205   206   207   208   209   210   211   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

Developer 1:
It sounds like 
Posting-Rule
-based firing. The batch tells each 
Posting Rule
to
execute, and the rule goes and looks for appropriate new 
Entries
and then does its thing. That's
pretty much the way you've drawn it.
Developer 2:
So then we avoid creating a lot of dependencies on the batch design, and the batch
keeps control. That sounds right.
Developer 1:
I'm still a little vague on the interaction of these objects with the 
Accounts
and
Entries
.
Developer 2:
You and me both. The examples in the book create a direct link between the
Accounts
and the 
Posting Rules
. That is kind of logical, but I don't think it will work very well for
us. We have to instantiate these objects from data each time, so we would have to figure out
which rule applies in order to associate it. Meanwhile, the 
Asset
object is the one that knows the
content of each 
Account
, and therefore which rule to apply. Anyway, what about the rest of this?
Developer 1:
I hate to nitpick, but I don't think that we're using "
Method
" right. I think the
concept is that the 
Method
computes the amount to be posted—like, say, a 20 percent tax with-
holding on income. But in our case, that's simple: it's always the full amount being posted. I think
the 
Posting Rule
itself is supposed to know which 
Account
to post to, which corresponds to our
"ledger name."
Developer 2:
Oh. So if the 
Posting Rule
is responsible for knowing the correct ledger name, we
probably don't need 
Method
at all.
Actually, this whole business of choosing the right ledger name is getting more and more
complicated. It is already a combination of the type of income (fee or interest) with the "asset
class" (a category the business applies to each 

Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   204   205   206   207   208   209   210   211   ...   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