Benefits:
• It abstracts the coupling between the subject and the observer.
• It provides support for broadcast type communication.
Applicable Scenarios:
• A change to an object requires changing other objects, and the number of objects that need to be changed is unknown.
• An object needs to notify other objects without making any assumptions about the identity of those objects.
博客介绍了对象的相关特性,其优势在于抽象了主体与观察者间的耦合,支持广播式通信。适用场景包括对象变更需改变其他未知数量对象,以及对象需通知其他对象却无需假定其身份。
600

被折叠的 条评论
为什么被折叠?



