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



Download 7,21 Mb.
Pdf ko'rish
bet305/343
Sana17.11.2022
Hajmi7,21 Mb.
#867526
1   ...   301   302   303   304   305   306   307   308   ...   343
Bog'liq
Eric Evans 2003 - Domain-Driven Design - Tackling Complexity in the Heart of Software

Responsibility Layers
Throughout this book, individual objects have been assigned narrow sets of related responsibilities.
Responsibility-driven design also applies to larger scales.
When each individual object has handcrafted responsibilities, there are no guidelines,
no uniformity, and no ability to handle large swaths of the domain together. To give
coherence to a large model, it is useful to impose some structure on the assignment of
those responsibilities.
When you gain a deep understanding of a domain, broad patterns start to become visible. Some
domains have a natural stratification. Certain concepts and activities take place against a
background of other elements that change independently and at a different rate for different
reasons. How can we take advantage of this natural structure, make it more visible and useful?
This stratification suggests layering, one of the most successful architectural design patterns
(Buschmann et al. 1996, among others).
Layers are partitions of a system in which the members of each partition are aware of and are able
to use the services of the layers "below," but unaware of and independent of the layers "above."
When the dependencies of 
MODULES
are drawn, they are often laid out so that a 
MODULE
with
dependents appears below its dependents. In this way, layers sometimes sort themselves out so
that none of the objects in the lower levels is conceptually dependent on those in higher layers.
But this ad hoc layering, while it can make tracing dependencies easier—and sometimes makes
some intuitive sense—doesn't give much insight into the model or guide modeling decisions. We
need something more intentional.
Figure 16.2. Ad hoc layering: What are these packages about?


In a model with a natural stratification, conceptual layers can be defined around major
responsibilities, uniting the two powerful principles of layering and responsibility-driven design.
These responsibilities must be considerably broader than those typically assigned to individual
objects, as examples will illustrate shortly. As individual 
MODULES
and 
AGGREGATES
are designed,
they are factored to keep them within the bounds of one of these major responsibilities. This
named grouping of responsibilities by itself could enhance the comprehensibility of a modularized
system, since the responsibilities of 
MODULES
could be more readily interpreted. But combining
high-level responsibilities with layering gives us an organizing principle for a system.
The layering pattern that serves best for 
RESPONSIBILITY LAYERS
is the variant called
RELAXED LAYERED SYSTEM
(Buschmann et al. 1996, p. 45), which allows components of a
layer to access any lower layer, not just the one immediately below.
Therefore:

Download 7,21 Mb.

Do'stlaringiz bilan baham:
1   ...   301   302   303   304   305   306   307   308   ...   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