Getting familiar with the setup
For beginners, the MVC architecture can make you uncertain about where things should go. As we progress through the book, you will learn where to put things and why. So, you need not worry about where things should be placed, as we will work through this process together step by step.
As your project grows, the MVC architecture will place a lot of responsibility on the Controller. Therefore, in this book, we will tweak the MVC pattern in order to not put so much pressure on the Controller.
Before we continue with our coding, we need to discuss classes and structures.
Classes and Structures
Classes and structures (also known as structs) are files that contain properties and methods. You use these properties and methods to add functionality. You have been working with structs since Chapter 1, Getting Familiar with Xcode. Strings, Ints, Bools, Arrays, Dictionaries, and Sets are all structs.
Earlier in the book, we created functions. As noted in Chapter 6, Setting...