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



Download 7,21 Mb.
Pdf ko'rish
bet212/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   208   209   210   211   212   213   214   215   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

Strategy (A.K.A.Policy)
Define a family of algorithms, encapsulate each one, and make them interchangeable.
S
TRATEGY
lets the algorithm vary independently from clients that use it. [Gamma et al. 1995]
Domain models contain processes that are not technically motivated but actually
meaningful in the problem domain. When alternative processes must be provided, the
complexity of choosing the appropriate process combines with the complexity of the
multiple processes themselves, and things get out of hand.
When we model processes, we often realize that there is more than one legitimate way of doing
them. As we start to describe these options, our definition of the process becomes clumsy and
complicated. The actual behavioral alternatives we are choosing between are obscured as they are
mixed in with the rest of the behavior.
We would like to separate this variation from the main concept of the process. Then we would be
able to see both the main process and the options more clearly. The 
STRATEGY
pattern, already
well established in the software design community, addresses this very issue, though the focus is
technical. Here it is being applied as a concept in a model and reflected in the code implementation
of that model. There is the same need to decouple the highly variable part of the process from the
more stable part.
Therefore:
Factor the varying part of a process into a separate "strategy" object in the model.
Factor apart a rule and the behavior it governs. Implement the rule or substitutable
process following the 
STRATEGY
 design pattern. Multiple versions of the strategy object
represent different ways the process can be done.
Whereas the conventional view of 
STRATEGY
as a design pattern focuses on the ability to substitute
different algorithms, its use as a domain pattern focuses on its ability to express a concept, usually
a process or a policy rule.



Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   208   209   210   211   212   213   214   215   ...   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