Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PHP Reactive Programming

You're reading from   PHP Reactive Programming Build fault tolerant and high performing application in PHP based on the reactive architecture

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781786462879
Length 364 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Martin Sikora Martin Sikora
Author Profile Icon Martin Sikora
Martin Sikora
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Introduction to Reactive Programming FREE CHAPTER 2. Reactive Programming with RxPHP 3. Writing a Reddit Reader with RxPHP 4. Reactive versus a Typical Event-Driven Approach 5. Testing RxPHP Code 6. PHP Streams API and Higher-Order Observables 7. Implementing Socket IPC and WebSocket Server/Client 8. Multicasting in RxPHP and PHP7 pthreads Extension 9. Multithreaded and Distributed Computing with pthreads and Gearman 10. Using Advanced Operators and Techniques in RxPHP Appendix. Reusing RxPHP Techniques in RxJS

Chapter 1. Introduction to Reactive Programming

Reactive programming has become a very popular and in demand topic over the last few years, and even though the ideas behind it aren't new, it takes the good parts from multiple different programming paradigms. This book's purpose is to teach you how to start writing PHP applications with principles of reactive programming in mind and in combination with pre-existing libraries.

In this chapter, we'll learn the most important principles that will guide us throughout this entire book:

  • Recap well-known programming paradigms and quickly explain their meaning for humans.
  • We'll see how we can use functional PHP programming, even today, using practical examples. We pay special attention to how we can use anonymous functions.
  • Explain what reactive programing is and what good parts it takes from other programming paradigms.
  • We'll have a look at some examples of widely spread JavaScript and PHP libraries that already use very similar principles to reactive programming.
  • Introduce Reactive Extensions and see how these fit into the world of reactive programming.
  • Show what using Reactive Extensions looks like using RxJS and how it fits into the grand scheme of things.
  • Create a first simple demo with RxPHP library.

Since reactive programming is a programming paradigm, we'll take a quick look at other common paradigms that all of us have probably already heard of and that you'll see mentioned every time you read or hear about reactive programming.

You have been reading a chapter from
PHP Reactive Programming
Published in: Mar 2017
Publisher: Packt
ISBN-13: 9781786462879
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image