Protocol oriented programming has been a cool buzz word since last year’s WWDC. A follow up session was presented in this year’s WWDC and although I didn’t had a chance to watch the new session yet I think that Protocol oriented programming will become main-stream fast, especially since Swift becomes more and more popular. Anyways, this is a long and very detailed example on how to apply this approach and implement a simple network stack on iOS.
A great post on how to apply protocol oriented programming principles for a common scenario: fetching data from the network for displaying in a ViewController. Including how to write testable code. Great stuff.
I really recommend this post. It includes a great simple example of how to use protocol extensions instead of having an if/else-if statements. It also includes a few very good arguments to why the result is much better. Just read it.