App Architecture book

The final version of App Architecture: iOS Application Design Patterns in Swift, the new book by Chris Eidhof, Matt Gallagher, and Florian Kugler is now available. As with previous objc.io books, I had a small part in its creation as the technical reviewer, a job that I enjoy immensely.

I’m obviously biased, but I really recommend the book if you write iOS apps. Although you’ll probably be familiar with some of the architecture patterns discussed in the book, I’m sure you’ll learn something new in each chapter — I certainly did. The authors managed to bring a fresh perspective even to well-known patterns like MVC. While reading the book, I had several aha moments about concepts that are obvious in hindsight but that I never really thought about in the way they are presented in the book.

The book also includes discussions of three more experimental architectures. Writing a full iOS app in one of these patterns requires a stronger commitment to deviate from typical UIKit code (you’ll sometimes be fighting against Apple’s frameworks). But the good news is that you don’t have to switch your whole app to a new architecture to take advantage of its lessons. Most patterns are based on a relatively small set of core ideas, which often can be applied in isolation to existing MVC- or MVVM-based apps.

At any rate, if you haven’t had the chance to try out declarative UI programming (like React), the book is a good learning opportunity. UIKit’s imperative style is getting long in the tooth, and I wouldn’t be surprised if Apple’s rumored cross-platform UI project also took inspiration from Elm/React.

Another plus: at a little more than 200 pages, the book is a relatively quick read. And if that’s not enough, there’s an option to buy an additional 7 hours video content that complements the book.