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


Swift is a fairly new language, and the Apple developers keep updating the underlying APIs and language syntax while enhancing the language features by adding new APIs. In this chapter, we learned about the changes and additions to Swift with its latest release, that is, Swift 4. We covered how to migrate our current IDE to support the latest Swift release, and then we went ahead and covered major changes to the existing APIs, followed by the new additions to the language. We highlighted the major changes that you will encounter most in your day-to-day programming practices. Toward the end of the chapter, we also covered how to migrate an existing code base to Swift 4 and tackle some of the issues that you might come across while trying to update the code base. This book is more about Reactive programming, so we will start working with Reactive concepts from Chapter 2, FRP Fundamentals, Terminology, and Basic Building Blocks, onward, but since we will be working with Swift 4 throughout the book, it made sense to start by getting you up to date with the development language; next up will be the setup of the overall development environment.