Oreilly - Getting started with PHP Reactive Programming
by Martin Sikora | Publisher: Packt Publishing | Release Date: July 2017 | ISBN: 9781788391986
Leverage the power of Reactive Programming in PHP About This VideoDevelop an interesting multiplayer browser game written in RxJS and re-implement it using RxPHPEnhance existing reactive applications by building a CLI tool combining Symfony ConsoleImplement Gearman and Rabbit MQ for asynchronous communicationIn DetailReactive Programming helps us write code that is concise, clear, and readable. Combining the power of reactive programming and PHP, one of the most widely used languages, will enable you to create web applications more pragmatically. PHP Reactive Programming will teach you the benefits of reactive programming via real-world examples with a hands-on approach. You will create multiple projects showing RxPHP in action alone and in combination with other libraries.The book starts with a brief introduction to reactive programming, clearly explaining the importance of building reactive applications. You will use the RxPHP library, built a reddit CLI using it, and also re-implement the Symfony3 Event Dispatcher with RxPHP. You will learn how to test your RxPHP code by writing unit tests. Moving on to more interesting aspects, you will implement a web socket backend by developing a browser game. You will learn to implement quite complex reactive systems while avoiding pitfalls such as circular dependencies by moving the RxJS logic from the frontend to the backend. The book will then focus on writing extendable RxPHP code by developing a code testing tool and also cover Using RxPHP on both the server and client side of the application. With a concluding chapter on reactive programming practices in other languages, this book will serve as a complete guide for you to start writing reactive applications in PHP.
- Chapter 1 : Introduction to Reactive Programming
- The Course Overview 00:02:39
- Imperative and Declarative Programming 00:02:17
- Sequential, Parallel, and Asynchronous Programming 00:02:49
- Functional Programming 00:10:34
- Reactive Programming 00:05:07
- Reactive Extensions 00:04:35
- Chapter 2 : Reactive Programming with RxPHP
- Introducing RxPHP 00:06:46
- Basic Principles of Reactive Extensions 00:05:13
- Naming Conventions in Reactive Extensions 00:02:14
- Components of RxPHP 00:14:40
- Writing the DebugSubject Class 00:02:09
- Writing JSONDecodeOperator and CURLObservable 00:12:29
- The proc_open() and non-blocking fread() 00:01:59
- Event Loop and RxPHP 00:01:47
- Chapter 3 : Writing a Reddit Reader with RxPHP
- Examining RxPHP's Internals 00:11:19
- Observable::create() and Observable::defer() 00:03:25
- Writing a Reddit Reader Using RxPHP 00:09:55
- Non-Blocking CURLObservable 00:06:28
- Types of Disposable Classes 00:02:11
- Chapter 4 : Reactive Versus a Typical Event-Driven Approach
- Handling Error States in Operator Chains 00:09:43
- The concat() and merge() Operators 00:04:02
- Writing a Reactive Event Dispatcher 00:16:05
- Chapter 5 : Testing RxPHP Code
- The doOn*() Operators 00:02:03
- Installing the PHPUnit Package 00:01:28
- Basics of Writing Tests Using PHPUnit 00:06:54
- Testing RxPHP Code 00:07:56
- Testing SumOperator 00:03:31
- Testing ForkJoinObservable 00:03:52
TO MAC USERS: If RAR password doesn't work, use this archive program:
RAR Expander 0.8.5 Beta 4 and extract password protected files without error.
TO WIN USERS: If RAR password doesn't work, use this archive program:
Latest Winrar and extract password protected files without error.