Functional Core in a Shipping App
April 15, 2019
In this workshop, we’ll look at how to build a functional, testable core and how to use it with different iOS app architectures.
In Swift we emphasize immutability, value types, and the use of generics, higher-order functions, and closures. We may be writing Swift apps, but the frameworks our iOS and Mac apps are built on are still written in Objective-C. Foundation, UIKit, AppKit, and other frameworks are based around reference types and the familiar design patterns we’ve used for years with these frameworks.
Our goal is to explore strategies to successfully blend these two worlds.
We’ll begin the workshop by test-driving an immutable model. We’ll then use this model in a basic table based app. We’ll then experiment with different architectures to emphasize how we can isolate and take advantage of the best of Swift in a robust and flexible iOS app.
The actual contents may vary on the day of training but the likely topics are:
We begin by test-driving a simple model
We adjust to make the model instance immutable
We specialize the model to take advantage of recent additions in generics
We build out a use of the model that illustrates MVC
We introduce a view model
We rearchitect using MVVM
We evolve to a reactive like architecture
It is assumed that you are an experienced programmer who has spent time with Swift. You will need a Mac running the latest version of Xcode.
About your instructor
Daniel is the author of the best selling books A Swift Kickstart and Developing iOS 7 Apps for iPad and iPhone (the official companion book to the popular iTunes U series from Stanford University taught by Paul Hegarty).
He has written apps for the iPhone and the iPad since the SDKs first appeared and has written programs for the Mac all the way back to System 7.
Daniel presents iPhone, Cocoa, and Swift training and consults through his company Dim Sum Thinking. His books are available on the iBookstore. When he’s not coding or talking about coding for the Mac, the iPhone, and the iPad he’s probably cooking or hanging out with his daughter.