Home iOS & Swift Books iOS Test-Driven Development by Tutorials

7
Introducing Dog Patch Written by Joshua Greene

You’ve learned the basics of TDD, and you should be starting to feel comfortable with it. However, you haven’t learned how to do TDD for a very critical part of most apps: networking!

Over the next several chapters, you’ll learn the ins-and-outs of writing networking code in a test-driven fashion. The goal of this chapter is to introduce you to this section’s sample project and highlight what work remains to be completed.

Getting started

You’ll complete a puppy-adoption app called Dog Patch throughout this section. This app connects dog lovers with kind, professional breeders to find the puppy of their dreams.

Let’s go over what needs to be done to make this possible.

Networking client

In Chapter 8, you’ll learn how to start TDD for RESTful networking. You’ll first explore the starter project and find that ListingsViewController always shows an error:

Using a networking client

In chapter 9, you’ll follow TDD to use your networking client in a view controller. Ultimately, your app will be able to display networking results to the user, except for images:

Image client

In chapter 10, you’ll create an image client and update ListingsViewController to use it to display images:

Understanding Dog Patch’s architecture

You’ll use Model-View-Controller-Networking (MVC-N) for this app’s architecture. If you’ve done any work in iOS before, you’re very likely familiar with the Model-View-Controller (MVC) architecture, wherein you separate objects into three types. These are aptly named models, views and controllers, of course.

Where to go from here?

This chapter introduced Dog Patch and what you’ll be doing over the next few chapters. Continue onto the next chapter to dive into the code!

Have a technical question? Want to report a bug? You can ask questions and report bugs to the book authors in our official book forum here.

Have feedback to share about the online reading experience? If you have feedback about the UI, UX, highlighting, or other features of our online readers, you can send them to the design team with the form below:

© 2021 Razeware LLC

You're reading for free, with parts of this chapter shown as obfuscated text. Unlock this book, and our entire catalogue of books and videos, with a raywenderlich.com Professional subscription.

Unlock Now

To highlight or take notes, you’ll need to own this book in a subscription or purchased by itself.