Building Reactive Applications With Combine

Introduction

Building Reactive Applications With Combine

Welcome to Building Reactive Applications With Combine. As the name suggests, this series zooms in on Apple's Combine framework. We cover the the ins and outs of the framework and you learn everything you need to know to make your projects reactive with the Combine framework.

Xcode 12 and Swift 5.3

This series uses Xcode 12 and Swift 5.3. If you want to follow along, make sure you have Xcode 11 or later installed on your machine.

What You Will Learn

This series takes a deep dive into Combine, the framework Apple introduced in 2019. Combine is Apple's answer to the increasing popularity of functional reactive programming. It is exciting to see that Apple embraces this revolutionary approach to building software. Calling it revolutionary may seem like an overstatement, but I argue that it isn't. If you are familiar with imperative programming, then functional reactive programming will be revolutionary. Every project I work on uses either Combine or RxSwift, and that won't change anytime soon.

To use Combine effectively, you need to become familiar with a few key concepts, including functional reactive programming. How is functional reactive programming different from imperative programming?

We also cover the key components of the Combine framework, such as publishers, subscribers, and operators. Later in this series, you learn how to use schedulers to define when and how code is executed.

Along the way, I show you how to debug the code you write. This is important. Debugging asynchronous code isn't as easy as debugging synchronous code. Combine has a few tricks up its sleeve to make this easier.

This series wouldn't be complete without a section about testing. Unit testing asynchronous code has its challenges. Don't worry, though. I show you several tips and tricks to unit test your Combine code.

Compared to RxSwift, the learning curve of the Combine framework is modest. This has its pros and cons. The key benefit is that it won't take you long to get up to speed with Combine.

Following Along

This series covers a lot of ground, but I am here to guide you along the way. To follow along with me, I recommend downloading the source files of each episode. The episodes that include code each have a starter project and a finished project. This makes it easy to follow along or pick a random episode of this series. If you are new to the Combine framework, then I recommend watching every episode of this series in chronological order.

In the first episode of this series, we explore what functional reactive programming is and how it differs from imperative programming.

Next Episode "What Is Reactive Programming"