Design Patterns : Elements of Reusable Object-Oriented Software


Design Patterns: Elements of Reusable Object-Oriented Software



Download 4,06 Mb.
Pdf ko'rish
bet212/288
Sana07.04.2022
Hajmi4,06 Mb.
#535140
1   ...   208   209   210   211   212   213   214   215   ...   288
Bog'liq
GOF Design Patterns

Design Patterns: Elements of Reusable Object-Oriented Software 
315 
self addSubpane: (ListPane new 
paneName: 'myListPane'; 
owner: self; 
when: #select perform: #listSelect:). 
Another application of the Mediator pattern is in coordinating complexupdates. 
An example is the ChangeManager class mentioned in Observer (326). ChangeManager 
mediates betweensubjects and observers to avoid redundant updates. When an 
objectchanges, it notifies the ChangeManager, which in turn coordinates theupdate 
by notifying the object's dependents. 
A similar application appears in the Unidraw drawingframework [VL90] and uses 
a class called CSolver toenforce connectivity constraints between "connectors." 
Objects ingraphical editors can appear to stick to one another in differentways. 
Connectors are useful in applications that maintainconnectivity automatically, 
like diagram editors and circuit designsystems. CSolver is a mediator between 
connectors. It solves theconnectivity constraints and updates the connectors' 
positions toreflect them. 
Related Patterns 
Facade (208) differsfrom Mediator in that it abstracts a subsystem of objects 
to providea more convenient interface. Its protocol is unidirectional; thatis, 
Facade objects make requests of the subsystem classes but notvice versa. In 
contrast, Mediator enables cooperative behaviorthat colleague objects don't or 
can't provide, and the protocol ismultidirectional. 
Colleagues can communicate with the mediator using the Observer (326) pattern. 


Design Patterns: Elements of Reusable Object-Oriented Software 
316 
Memento 
Intent 
Without violating encapsulation, capture and externalize an object'sinternal 
state so that the object can be restored to this state later. 

Download 4,06 Mb.

Do'stlaringiz bilan baham:
1   ...   208   209   210   211   212   213   214   215   ...   288




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