 
						App Architecture
iOS Application Design Patterns in Swift
by Chris Eidhof, Matt Gallagher, and Florian Kugler
This book explains a range of application design patterns and their implementation techniques using a single example app, fully implemented in five design patterns.
Instead of advocating for any particular pattern, we lay out the problems all architectures are trying to address: constructing the app's components, communicating between the view and the model, and handling non-model state. We show high-level solutions to these problems and break them down to the level of implementation for five different design patterns — two commonly used and three more experimental.
The common architectures are Model-View-Controller and Model-View-ViewModel + Coordinator. In addition to explaining these patterns conceptually and on the implementation level, we discuss solutions to commonly encountered problems, like massive view controllers.
On the experimental side we explain Model-View-Controller+ViewState, ModelAdapter-ViewBinder, and The Elm Architecture. By examining these experimental patterns, we extract valuable lessons that can be applied to other patterns and to existing code bases.
Videos
The videos accompanying the book give you a better sense of the different application design patterns in practice. In more than seven hours of live-coding and discussion we compare and contrast different design patterns, build new features in all of them, and show how The Elm Architecture framework used in the book is implemented.
Video introduction
Book Contents
- 
												Why Architecture?Understand the common problems all patterns are trying to solve. 
- 
												Common Design PatternsLearn what common patterns such as MVC and MVVM are all about. 
- 
												Experimental ArchitecturesLearn from experimental architectures like View State-Driven MVC and The Elm Architecture. 
- 
												NetworkingHow Networking fits into common design patterns. 
- 
												Implementation TechniquesUnderstand how each pattern is implemented at the code level. 
- 
												In-Depth ComparisonsUnderstand the commonalities, differences, and trade-offs between architectures. 
- 
												Take-Aways for Any Code BaseLearn lessons from each architecture that make any code base better. 
- 
												Common RefactoringsTechniques to factor out shared code and deal with large view controllers. 
- 
												Complete ImplementationsThe accompanying voice-notes sample app is fully implemented in five architectures. 
Video Episodes
- 
												Introduction 10minOverview of this video series. 
- 
												One App — Eight Architectures 1h17minLive-coding a minimal application in eight different application design patterns. 
- 
												Building a Mini-Player — MVC 47minShowing how to add a mini-player in plain MVC. 
- 
												Building a Mini-Player — MVVM-C 50minWorking with view-models, coordinators, and RxSwift. 
- 
												Building a Mini-Player — MVC+VS 57minApplying the observer pattern for view state communication. 
- 
												Building a Mini-Player — MAVB 47minWorking with bindings, model-adapters, and view-binders. 
- 
												Building a Mini-Player — TEA 28minUsing reducers and a declarative view layer. 
- 
												Building a Mini-Player — MVC Refactoring 46minImproving the MVC code by refactoring the player API. 
- 
												The Elm Architecture Framework 1h06minImplementing the framework behind TEA. 
Formats & Extras
- 
											Code- 
														Complete sample app in five different architectures 
- 
														Two additional versions with networking 
- 
														Written in Swift 4 
 
- 
														
- 
											Ebook- 
														PDF 
- 
														ePub 
- 
														mobi 
 
- 
														
- 
											Video- 
														7+ hours of video 
- 
														Comprehensive design pattern overview 
- 
														Live-coding of new features in all application design patterns 
- 
														Building The Elm Architecture framework 
 
- 
														
Buy Book
Bundles
Save on each additional book
About the Authors
- 
									  Chris EidhofChris is one of the objc.io co-founders, and host of Swift Talk. He also co-authored the Functional Swift, Advanced Swift, and Thinking in SwiftUI books. Before, he wrote apps such as Deckset. 
- 
									  Matt GallagherMatt works as a software developer and consultant based in Melbourne, Australia; both independently and through his streaming media technologies company Zqueue. 
- 
									  Florian KuglerFlorian is one of the objc.io co-founders. He worked on Mac Apps like Deckset, co-authored the Thinking in SwiftUI book amongst others, and hosts the weekly Swift Talk video series. Recently, he also started running Anton Reisemobile part time, a workshop for fine campervan conversions. 
FAQ
- 
										Do you offer student discounts?Yes, please email us and let us know what and where you're studying. 
- 
										Will you update the book?Yes. for more information on our policy, see book updates. 
- 
										Can I get a “reverse charge” invoice without VAT?Just click the "Generate Invoice" link in the receipt email and fill out your company data to get a VAT refund. 
- 
										Are the videos available on Swift Talk as well?No, the videos are completely separate from Swift Talk. 
Updates
- 
										May, 2018Initial release 
- 
										January, 2018Early Access