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



Download 7,21 Mb.
Pdf ko'rish
bet181/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   177   178   179   180   181   182   183   184   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

Pigment
Color
class, where most of the computational complexity lies, can be studied 
and tested
alone.
Low coupling is a basic way to reduce conceptual overload. A 
STANDALONE CLASS
is an extreme of
low coupling.
Eliminating dependencies should not mean dumbing down the model by arbitrarily reducing
everything to primitives. The final pattern of this chapter
CLOSURE OF OPERATIONS
, is an example of
a technique for reducing dependency while keeping a rich interface. . . .
[ Team LiB ]


[ Team LiB ]
Closure of Operations
If we take two real numbers and multiply them together, we get another real number. [The
real numbers are all the rational numbers and all the irrational numbers.] Because this is
always true, we say that the real numbers are "closed under the operation of multiplication":
there is no way to escape the set. When you combine any two elements of the set, the result
is also included in the set.

The Math Forum, Drexel University
Of course, there will be dependencies, and that isn't a bad thing when the dependency is
fundamental to the concept. Stripping interfaces down to deal with nothing but primitives can
impoverish them. But a lot of unnecessary dependencies, and even entire concepts, get introduced
at interfaces.
Most interesting objects end up doing things that can't be characterized by primitives
alone.
Another common practice in refined designs is what I call "
CLOSURE OF OPERATIONS
." The name
comes from that most refined of conceptual systems, mathematics. 1 + 1 = 2. The addition
operation is closed under the set of real numbers. Mathematicians are fanatical about not
introducing extraneous concepts, and the property of closure provides them a way of defining an
operation without involving any other concepts. We are so accustomed to the refinement of
mathematics that it can be hard to grasp how powerful its little tricks are. But this one is used
extensively in software designs as well. The basic use of XSLT is to transform one XML document
into another XML document. This sort of XSLT operation is closed under the set of XML documents.
The property of closure tremendously simplifies the interpretation of an operation, and it is easy to
think about chaining together or combining closed operations.
Therefore:

Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   177   178   179   180   181   182   183   184   ...   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