Book Image

Reactive Programming with Swift 4

By : Navdeep Singh
Book Image

Reactive Programming with Swift 4

By: Navdeep Singh

Overview of this book

RxSwift belongs to a large family of Rx implementations in different programming languages that share almost identical syntax and semantics. Reactive approach will help you to write clean, cohesive, resilient, scalable, and maintainable code with highly configurable behavior. This book will introduce you to the world of reactive programming, primarily focusing on mobile platforms. It will tell how you can benefit from using RxSwift in your projects, existing or new. Further on, the book will demonstrate the unbelievable ease of configuring asynchronous behavior and other aspects of the app that are traditionally considered to be hard to implement and maintain. It will explain what Rx is made of, and how to switch to reactive way of thinking to get the most out of it. Also, test production code using RxTest and the red/ green approach. Finally, the book will dive into real-world recipes and show you how to build a real-world app by applying the reactive paradigm. By the end of the book, you’ll be able to build a reactive swift application by leveraging all the concepts this book takes you through.
Table of Contents (15 chapters)
Free Chapter
Migrating from Swift 3 to Swift 4
FRP Fundamentals, Terminology, and Basic Building Blocks
Set up RxSwift and Convert a Basic Login App to its RxSwift Counterpart
RxTest and Custom Rx Extensions – Testing with Rx
Schedule Your Tasks, Don't Queue!
Subscribe to Errors and Save Your App
Functional and Reactive App-Architecture


In this chapter, we covered some really exciting concepts related not only to RxCocoa and RxSwift, but also other community libraries. We learned about data binding to View elements and, most importantly, binding to the View elements that are used most pervasively in the Swift language, that is, UITableViews and UICollectionViews. We covered how we can bind data to these two and perform complex operations, keeping our code base tidy, readable, and concise at the same time. This chapter provided you with real-world information about how to work with RxSwift and RxCocoa code in a real-world application. We not only created a new functionality using reactive concepts but also transformed an existing application from traditional Swift to RxSwift. In the coming chapters, we will learn more about handling errors, work with schedulers, learn more about design patterns, and create...