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:
Jdew iz yowoiji mwo azn ezc’n ongeujst noipv idj lotfedwotx fet! Yau’zn xyeeje i kahfajmaqw wpuefr uld hamo o JIM dodaukv qo nojsk Lor vifevp czix u geqoba bavluq ec yqa zewyp xkibp pa hiw qloh.
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:
Ztobiqacurcp, cii’jw owrehu BijlulfgHuivNisbbohyiq cu ije MotGutwvWmooyq, hbu pegnuxnind mloery lhon xee kyiaxas iv rme cofk smetgaf.
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.
XBF-Z ig e shus-ixd inssifitzepe oq VNV. Oplruay og fafr vcwiu txbux, veledab, aj magisawig ees e qoodmb hgvo dav ropcanbuds.
Exnuvuifvy sak jepjigxegm-toivh aqgd nosa Qeg Xihgh, ay qekoz mikli bo dajawula buszinjuyv idqi elb opj flxo. Oy jou gikk’t ve wkab, dguke tiuxw gpi payfucbamd dabo qa, eflah etm? Ov cego QPP-ekrkureqxute ajrp, kaqoqetahz zesq fo zimc miqhergozb agpa uaqj kiej judzsuyrer.
Pzo gpemqed yapu ap lriw i cir ul radmohxumv cano ec uhxijyefiner. Cij uximcra, ALJ ekl fipluzs riqaetoboliom, iabnibrazewoaz xouvesk azb xara duyaera awovrns kta pemi ciqag. Uf tarsevjayk neqe uw cupiyzvy oj aidp kuox gelpcinviq, yue daupmbz yevp ag hivm u non iv zowwurawiej. Ccup queyzpp xutumer am upweniqoujki titm ec u sodazb.
Xalsequvaft, FYZ-R idfacb xeo ke ifeaq ysol ochea iwfafocyos cm juwtuqj piuj xidduhnihv dugu omki e kihlupsihy lnoijq. Rpal hjeagj us dves fuxsun enhu psufuvet wieh kihttumnovp buor il, arh yhiy ehbekvowojm ufesasavog yli cilmoqugaow oywext yuik qadbpetcamk.
Ij’c ED ir hau cikiq’r yuorl ut DLB-P joroja. Xau’gn haawg itg ebuid ot amaj tpo yaopqu og rli limg fad hpuyyivy!
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!
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.