1 / 15

Observer Pattern Mediator Pattern

Observer Pattern Mediator Pattern. 인공지능 연구실 변윤관. Observer Pattern VS Mediator Pattern. The Observer pattern: Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. The Mediator pattern:

scolburn
Télécharger la présentation

Observer Pattern Mediator Pattern

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Observer PatternMediator Pattern 인공지능 연구실 변윤관

  2. Observer Pattern VS Mediator Pattern • The Observer pattern: • Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. • The Mediator pattern: • Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.

  3. Observer Pattern Structure

  4. Observer Pattern Class Diagram

  5. Observer Pattern Sequence Diagram

  6. Subject(Observable) Interface

  7. Subject Implement 옵저버리스트에 있는 모든 옵저버에게 update() 메소드 콜

  8. Observer Interface

  9. Observer Implement

  10. Observer Test 서브젝트를 관찰할 옵저버 등록 서브젝트의 내용이 바뀌어서 옵저버에게 notify

  11. Mediator Pattern Structure

  12. 경보발령시스템 receiver1 경보메시지 경보메시지 경보메시지 receiver2 alerter gateway 경보메시지 receiverN

  13. Mediator Pattern Class Diagram

  14. Mediator Pattern Sequence Diagram

  15. Mediator Pattern Sequence Diagram

More Related