Building a Weather Application From Scratch

Episode 1

Introduction

In Mastering MVVM With Swift, we refactor a weather application, Cloudy, built with MVC to use MVVM instead. One of the most common questions I receive is how to build Cloudy from scratch. This series is an answer to that question. We build a weather application that is inspired by Cloudy. The application is aptly named Rainstorm.

Episode 2

Setting Up the Project

Few things are more enjoyable than setting up a brand new project. Fire up Xcode and choose New > Project from Xcode's File menu. Select the Single View App template from the iOS section and click Next.

Episode 3

View Controller Containment

View controller containment is an indispensable pattern in iOS projects. Several key components of the UIKit framework take advantage of view controller containment, including the UINavigationController class, the UITabBarController class, and the UISplitViewController class. As I mentioned earlier in this series, view controller containment is a pattern I adopt in every iOS project and Rainstorm is no exception.

Episode 4

Fetching Weather Data

In the previous episode, we laid the foundation of Rainstorm's user interface. Before we continue building the user interface, I'd like to know what the weather data the application will use to populate its user interface looks like. In this episode, we fetch weather data from Dark Sky. The Dark Sky API is very easy to use. Create a Dark Sky developer account if you'd like to follow along. It's free and it only takes a minute.

Episode 5

Removing Object Literals

Project hygiene is very important in my opinion and it immediately shows you what type of developer you're working with. The Xcode theme I usually use for development highlights string literals in bright red, showing me when a string literal has made its way into the codebase.