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


Some concepts from the domain aren't natural to model as objects. Forcing the



Download 7,21 Mb.
Pdf ko'rish
bet71/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   67   68   69   70   71   72   73   74   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

Some concepts from the domain aren't natural to model as objects. Forcing the
required domain functionality to be the responsibility of an 
ENTITY
 or 
VALUE
 either
distorts the definition of a model-based object or adds meaningless artificial objects.

SERVICE
is an operation offered as an interface that stands alone in the model, without
encapsulating state, as 
ENTITIES
and 
VALUE OBJECTS
do. S
ERVICES
are a common pattern in technical
frameworks, but they can also apply in the domain layer.


The name 
service
emphasizes the relationship with other objects. Unlike 
ENTITIES
and 
VALUE
OBJECTS
, it is defined purely in terms of what it can do for a client. A 
SERVICE
tends to be named for
an activity, rather than an entity—a verb rather than a noun. A 
SERVICE
can still have an abstract,
intentional definition; it just has a different flavor than the definition of an object. A 
SERVICE
should
still have a defined responsibility, and that responsibility and the interface fulfilling it should be
defined as part of the domain model. Operation names should come from the 
UBIQUITOUS
LANGUAGE
or be introduced into it. Parameters and results should be domain objects.
S
ERVICES
should be used judiciously and not allowed to strip the 
ENTITIES
and 
VALUE OBJECTS
of all
their behavior. But when an operation is actually an important domain concept, a 
SERVICE
forms a
natural part of a 
MODEL-DRIVEN DESIGN
. Declared in the model as a SERVICE, rather than as a
phony object that doesn't actually represent anything, the standalone operation will not mislead
anyone.
A good 
SERVICE
has three characteristics.
The operation relates to a domain concept that is not a natural part of an 
ENTITY
or 
VALUE
OBJECT
.

Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   67   68   69   70   71   72   73   74   ...   343




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
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