Cover page by Graham Lee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

8. Networking Code

The code in BrowseOverflow can parse data received from the Stack Overflow website and use it to build model objects that will be used in the app. The problem of fetching the data from the website in the first place still remains. In this chapter you’ll see how to build that code, and how to deal with the problem of talking to the outside world in a test-driven fashion.

On the face of it, the problem we have to deal with next in BrowseOverflow seems intractable: looking back to Chapter 3, “How to Write a Unit Test,” you’ll remember that unit tests are supposed to be fast, repeatable, and reliable. How do you achieve those properties when dealing with network code? So many issues can affect the performance and reliability of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required