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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access