Today we’re going to be working through the first part of our application, and in particular we’re going to be getting our data right. I realize that data isn’t terribly exciting, but as your skills grow you’ll start to see how data really defines what your app can do – no matter what fancy designs you add, or what slick animations you introduce, if your data isn’t right your app just won’t work.
Along the way you’re going to meet an important Swift feature called generics. This is a feature I definitely class as well outside of beginner Swift, but as you’ll see generics let us create highly reusable code with only a little extra thinking.
Reusable code is important, because it helps us accomplish bigger and better results with less work. However, as Ralph Johnson once said, “before software can be reusable it first has to be usable” – as nice as generics are, we’ll only start using them once we’ve solved the problem the easier way first.
Today you have three topics to work through, in which you’ll get more hands-on experience with
Codable, take generics for a test drive, and more.
If you use Twitter, the button below will prepare a tweet saying you completed today, along with a celebratory graphic, the URL to this page, and the challenge hashtag. Don't worry – it won't be sent until you confirm on Twitter!
Need help? Tweet me @twostraws!
SPONSORED In-app subscriptions are a pain. The code can be hard to write, full of edge cases, and time-consuming to maintain. RevenueCat provides a backend and wrapper around StoreKit to make things simple so you can focus on building your app.
Link copied to your pasteboard.