Design Patterns: Observer and Publish-Subscribe

Sign in to queue

The Discussion

  • User profile image
    Stefan_​Tellurian

    Why aren't you using IObserver and IObservable. Is it wrong to implement a Subscribe method that returns an IDisposable like in this example: https://docs.microsoft.com/en-us/dotnet/standard/events/how-to-implement-an-observer

  • User profile image
    japikse

    @Stefan_Tellurian: There's nothing wrong with using IObserver and IObservable, I actually had an example in the talk, but when I flushed it out, I realized that it hid a lot of the pattern, and didn't advance the talk any. So I removed the example since the goal of the talk was to explain the pattern.

  • User profile image
    PS87

    I really love the series and cant thank enough for the same. This helped me a good understanding on the patterns which initially seemed daunting.

    If I may, can you please make one session on Interface Vs Abstract class, as Robert suggested? In the examples I have seen for the patterns here, Phil is using interfaces but the examples in DoFactory uses Abstract classes. So, I want to understand if this variation will affect pattern in any way.

    Thanks again for this great series

Add Your 2 Cents