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


Invoice and make the determination. Figure 9.13. A more elaborate delinquency rule factored out as a



Download 7,21 Mb.
Pdf ko'rish
bet155/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   151   152   153   154   155   156   157   158   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

Invoice
and make the determination.
Figure 9.13. A more elaborate delinquency rule factored out as a
SPECIFICATION


The 
SPECIFICATION
keeps the rule in the domain layer. Because the rule is a full-fledged object, the
design can be a more explicit reflection of the model. A 
FACTORY
can configure a 
SPECIFICATION
using information from other sources, such as the customer's account or the corporate policy
database. Providing direct access to these sources from the 
Invoice
would couple the objects in a
way that does not relate to the request for payment (the basic responsibility of 
Invoice
). In this
case, the 
Delinquent Invoice Specification
was to be created, used to evaluate some
Invoices
, and then discarded, so a specific evaluation date was built right in—a nice simplification.

SPECIFICATION
can be given the information it will need to do its job in a simple, straightforward
way.
The basic concept of 
SPECIFICATION
is very simple and helps us think about a domain modeling
problem. But a 
MODEL-DRIVEN DESIGN
requires an effective implementation that also expresses the
concept. To pull that off requires digging a little deeper into how the pattern will be applied. A
domain pattern is not just a neat idea for a UML diagram; it is a solution to a programming
problem that retains a 
MODEL-DRIVEN DESIGN
.
When you apply a pattern appropriately, you can tap into a whole body of thought about how to
approach a class of domain modeling problem, and you can benefit from years of experience in
finding effective implementations. There is a lot of detail in the discussion of 
SPECIFICATION
that
follows: many options for features and approaches to implementation. A pattern is not a
cookbook. It lets you start from a base of experience to develop your solution, and it gives you
some language to talk about what you are doing.
You may want to skim the key concepts when first reading. Later, when you run into the situation,
you can come back and draw on the experience captured in the detailed discussion. Then you can
go and figure out a solution to your problem.

Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   151   152   153   154   155   156   157   158   ...   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