Chapters

Hide chapters

iOS Test-Driven Development by Tutorials

Second Edition · iOS 15 · Swift 5.5 · Xcode 13

7. Introducing Dog Patch
Written by Joshua Greene

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

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.
© 2024 Kodeco Inc.

You’re accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now