The observer pattern is a behavioral pattern that lets several objects, observers, subscribe to state changes at another object, the Subject.
As with the Iterator, the .NET framework contains interfaces that are recommended when implementing the design pattern. These are named IObservable and IObserver. The subject should implement the IObservable interface while the observers implement IObserver.
Of course, you do not absolutely need to use these interfaces in order to implement the observer pattern but it is good to know that they exist.
As with the Iterator, the .NET framework contains interfaces that are recommended when implementing the design pattern. These are named IObservable and IObserver. The subject should implement the IObservable interface while the observers implement IObserver.
Of course, you do not absolutely need to use these interfaces in order to implement the observer pattern but it is good to know that they exist.
Kommentarer
Skicka en kommentar