Chapter 3. Writing a Reddit Reader with RxPHP
In previous chapters, we talked a lot about asynchronous programming in PHP and how this relates to reactive programming, in particular, how to start using RxPHP, and how to use common PHP functions such as proc_open()
and cURL
asynchronously.
This chapter will cover writing a CLI Reddit reader app using RxPHP, Symfony Console, and Symfony Process components. We're also going to use most of what we've learned in the previous chapter:
We'll look in more depth into what happens internally when creating Observable chains and subscribing to Observables.
We'll see how Disposables are used in the default classes that come with RxPHP, and how these are going to be useful for unsubscribing from Observables in our app.
Subjects can sometimes simplify our lives when working with operator chains.
How to use
Observable::create()
andObservable::defer()
static methods to create new Observables with custom logic on subscription.Symfony Console library is going...