Observer_DesignPattern

Views:
 
Category: Entertainment
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

Design Pattern | Observer: 

Design Pattern | Observer “If you can't explain it simply, you don't understand it well enough ” Albert Einstein

Topics: 

Topics Definition Visualize Participants UML Diagram Code Walkthrough - Java More .. Thank You

Definition: 

Definition Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. Also known as Dependency and publish-subscribe.

Visualize | Observer: 

Visualize | Observer Subscribe Subscribe Publish Publish

Participants: 

Participants Subject / Observable / Publisher Observer / Subscriber

Stop …: 

Stop … What are the tasks of Publisher ? Register a subscriber. Notify a subscriber. Deregister a subscriber. What are the task of Subscriber? Receive the notification and perform required action.

UML: 

UML

Code Walkthrough: 

Code Walkthrough

More..: 

More.. java.util.Observable java.util.Observer