For our 4th coding dojo, we spent our time demonstrating various implementations of the Observer pattern as applied to the Tennis Kata problem. Susheel implemented a version where the players were subjects and the scoreboard was the observer. We had a spirited discussion around whether or not the scoreboard’s keeping a reference to the players was a violation of the observer pattern, and decided it was not. Chris implemented two versions where the players were held in a group class which was the subject and the scoreboard was the observer. One implementation used the Even/Delegate constructs provided by .NET and the other used the IObserver/IObserverable constructs used by the Reactive Extensions (Rx) in .NET.
Now that my eyes have been opened to these Reactive Extensions, I plan to look a little deeper into this topic. In terms of plans for our next dojo, we will look at the Gilded Rose Kata and creating effective test cases.
My thanks go out to Susheel and his contributions to the dojo today.