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


the purpose of an object or operation based on its implementation, that new developer



Download 7,21 Mb.
Pdf ko'rish
bet167/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   163   164   165   166   167   168   169   170   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

the purpose of an object or operation based on its implementation, that new developer
may infer a purpose that the operation or class fulfills only by chance. If that was not
the intent, the code may work for the moment, but the conceptual basis of the design
will have been corrupted, and the two developers will be working at cross-purposes.
To obtain the value of explicitly modeling a concept in the form of a class or method, we must give
these program elements names that reflect those concepts. The names of classes and methods
are great opportunities for improving communication between developers, and for improving the
abstraction of the system.
Kent Beck wrote of making method names communicate their purpose with an 
INTENTION-
REVEALING SELECTOR
(Beck 1997). All public elements of a design together make up its interface,
and the name of each of those elements presents an opportunity to reveal the intention of the
design. Type names, method names, and argument names all combine to form an 
INTENTION-
REVEALING INTERFACE
.
Therefore:
Name classes and operations to describe their effect and purpose, without reference to
the means by which they do what they promise. This relieves the client developer of
the need to understand the internals. These names should conform to the 
UBIQUITOUS
LANGUAGE
 so that team members can quickly infer their meaning. Write a test for a
behavior before creating it, to force your thinking into client developer mode.
All the tricky mechanism should be encapsulated behind abstract interfaces that speak in terms of
intentions, rather than means.
In the public interfaces of the domain, state relationships and rules, but not how they are
enforced; describe events and actions, but not how they are carried out; formulate the equation


but not the numerical method to solve it. Pose the question, but don't present the means by which
the answer shall be found.

Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   163   164   165   166   167   168   169   170   ...   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