Coding Fun Java Observer Design Pattern in Java

Observer Design Pattern in Java





The observer pattern is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods.

Design Pattern in Java :

Tags: , , , , , , , , , ,

36 thoughts on “Observer Design Pattern in Java”

  1. Sameer M says:

    #telusko I have a doubt, has u said this is observer design pattern. Why these pattern exists? This is a kind of giving a solution to a real time problem. Why these solutions given a term? is it necessary?

  2. Sri Harsha says:

    Sir, i am studying 3 sem btech. I this semester i must do a project on data structures. Could you suggest me one??

  3. Channel channel = new Channel() is tight coupling and is not good in Subscriber class

  4. Bhupathi Anr says:

    Every time…learn new from telusko, and waiting for micro services series

  5. Reddy Kiran says:

    How about subscribers subscribeChannel method calling channel's subscribe method… Instead of both channel n subscriber calling subscribe method.

  6. Dave Graham says:

    I enjoyed it but man please slow down a bit to give me a chance to absorb and think about what you're doing… Also a link to the code would be a nice touch.

  7. Good.
    Should you explain the same pattern using java.util.Observable?

  8. Amy D says:

    Great content! Thank you so much ??

  9. Ranjith V says:

    Hi Navin, I really have to say this. thank you. you surely are changing my life for good. keep up the good work.

  10. Winner15 says:

    Wow simply explained observer design pattern easily .. thank so

  11. Can you please make videos on vaadin !

  12. yallen2010 says:

    Great job explaining that using a real world example.

  13. Your thinking way is very appreciatable.Thanks to show me this way of logic building.

  14. Since you are making videos of Design Patterns, can you provide explanations of the various patterns using functional style?

  15. Yazil Khan says:

    Its really amazing that….this lengthy process is very easy to understand by you Sir????

  16. Par excellence ! Perfect explained. Perfect example. Especially direct programming in the java. Keep on !

  17. Hi sir,
    Is there any future for vaadin framework???

  18. Nikki Singh says:

    how the hell is update method is called?

  19. Ashish Jain says:

    Can you share this code in git

  20. Please upload about RXJava

  21. Just a random question, I have lot of nested if else statement in my project, how to avoid using nested if else?

  22. It was nice dear sir.

  23. the artist says:

    Actually the observer pattern is much more abstract and braod than that. It has to be general. I know that you are trying to make it simple so everyone understands it, but in doing so, you missed the principle of the observer pattern which is to make code flexible and easy to be added to by creating interfaces and classes that implement the interfaces and then under these implementing classes we can have as many subscribers and channels as we want. The way you did it is just normal java code with no design pattern.

  24. Prasad Bonam says:

    I can say one thing " ur examples are so Realistic easy 2 understand" keep it up Good work bro n Thank you 🙂

  25. Yeah I always waiting for your video content …. Everytime

  26. Yi Zhang says:

    Teacher~ I need caption button…

  27. saikrish k says:

    Please make more python videoss

  28. Thank you sir. I was looking for visitor pattern video and found this new concept. Thanks a lot

  29. saninspace says:

    telesco.subscribe(sn) seems incorrect as channels do not subscribe. Instead s1.subscribeChannel(teleaco) should have called it internally.

Leave a Reply

Your email address will not be published. Required fields are marked *