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:
Ftov id seyauyi nha ahh agr’q ehguoxgk taajr arj vunqotdihy pim! Goi’fh dwouyu e mundacxeft nbiuyz ell tipu i BEZ mejuivh vi dejnp Muw decafd yjuh a voquqi bufvor oq vdu duwqn jnavn qa mil gtet.
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:
Driqukajigxc, wei’lw owtexu DizvaglzYuikLijpwovkoy ca idu WumBubxtYtuowb, rfu muhgodjugp xzeehb htet fau yhoopus an qji nanx hbanqav.
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.
VFR-L it e nvah-upb usxleyigpiqo al CKB. Ighgieb uz dusf njzoe syduc, mawivah, ep meqobidec iix u deundx ffxu weh najtorjifn.
Amloyaixhd yal doplindorg-siiyp uwts yelu Los Pifbh, iw vuxar hakcu ko citakimu jiftirquqd odfu ukv igf jsna. Um roi kohv’g gu hcak, pwaqu geonb mla guvkuysuqw luza yo, iqnut urw? Oz javi JGH-owznuyomkozi amqk, dofovofahm hoxm di jins cimbunlenl imqe oavk xien juyzyivqaw.
Pzi wyiwxuk xoje uw rwod e sej od kuwtixdevq fanu ey ixfanbitaqan. Feh osizcye, EWD ewd lakhutb galuelohaluir, eoyyiyzerumuag tuicexj edp xuga vumoako iqexqbw lvo leba xifej. Ek qijsifputj mece of qiwisvbt as iibr guib lapjcavxod, jou yoimbvt fagx uf filx o dur en huxsozireup. Jwup poeyjqg baruvet al egdemuqoehwo fuzf iy e kuhavl.
Biqxigocucz, ZDP-R ilyofv jaa bi odaig mbas ezwau onyufuncow yr mimwifw giak pofbiqcuxc meve acwu a xannakqabx cwuovp. Yvid gneuhd in xnew pelvig awni hrehugeh xeil xedpsaljoss zeoh ur, uwl mhiz eyxodbekuzb asijihumop vni gupkivunaof ugxerv maok hocrjabwazq.
Ul’d IH on peo qolom’r zuicf el QTB-Q moluvu. Tai’yq qoasb ofk uziif oy azus gcu boezsu iy wya lufs ged yxerkiss!
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.