Copyright Š 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: March 2017
Production reference: 1230317
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78646-287-9
www.packtpub.com
Martin Sikora has been professionally programming since 2006 for companies such as Miton CZ, Symbio Digital, and PRIA in various languages, mostly PHP and TypeScript. Since 2017, he's freelancing, trying to work on open source projects in TypeScript, PHP, Dart, C, and Python. He's been actively contributing to RxPHP and RxJS 5 on both Github and StackOverflow. He is a Zend certified engineer and was a member of the winning team during Google Dart Hackathon 2012 in Prague. His first publication was Dart Essentials, by Packt, published in May 2015. Occasionally, Martin writes articles for https://www.smashingmagazine.com/. You can connect with him on LinkedIn at https://cz.linkedin.com/in/martin-sikora-a63b9a30 or GitHub at https://github.com/martinsik.
Alexandru-Emil Lupu has about 10 years of experience in the web development area, during which he has developed a range of skills, from the implementation of e-commerce platforms and presentation sites to writing code for online games. He is one of those developers who is constantly learning new programming languages, and he has no problem understanding Ruby, PHP, Python, JavaScript, and Java code.
He is passionate about programming and computer science. When he was a teenager, he did not own a computer or have an Internet connection and would constantly go to an Internet cafe to read all about his programming problems, then go home and struggle to implement what he read. He gladly recounts those days and likes to believe that he's the same guy he was 10 years ago, but with much more experience. For him, "passion" is the word that describes the challenge he had when he was a youngster willing to learn new stuff, getting home at 2 or 3 AM determined to install Linux just to learn something new-this too when he had a Pentium I at 133 MHz in the Pentium IV at 1800 MHz era!
Alexandru-Emil is learning all the time and likes to stay close to well-trained and passionate people who better motivate him. He also likes teams that work intelligently and are energetic, which is why he joined the eJobs team--to face a challenge.
As a proof of his perseverance, Alexandru-Emil Lupu is a certified Scrum Master who is passionate about Agile Development. His resume also includes 3 years as a Ruby on Rails developer and a CTO at 2Performant Network (2Parale); 4 years at eRepublik.com, an online game, during which he was responsible for a long list of tasks, including feature development, performance optimization, and a Tech Lead for an internal project. He has learned the hard way the necessary skills to fulfill his day-to-day tasks at 2Performant.com and, later, all the experience he's got, he is using at eJobs.ro to face new kinds of challenges.
In his little free time, he develops small personal projects. And if he still has any spare time, he reads some technical or project management books or articles. When he's relaxing, he watches thriller movies and likes playing shooter or strategy games.
He doesnât talk too much, but he's willing to teach others programming. If you meet him for a coffee, prepare yourself to be entertained, he likes to tell a lot of contextual jokes.
You can connect with him on LinkedIn at https://www.linkedin.com/in/alecslupu and interact with him on http://github.com/alecslupu.
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at
www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
[email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.
- Fully searchable across every book published by Packt
- Copy and paste, print, and bookmark content
- On demand and accessible via a web browser
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://goo.gl/5qqL4V.
If you'd like to join our team of regular reviewers, you can e-mail us at
[email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!
Reactive programming has gained distinct popularity in recent years. This is partly thanks to JavaScript web frameworks such as Angular2 or React, but also because of the increasing popularity of functional and asynchronous programming in languages that support multiple programming paradigms, such as JavaScript, Java, Python, or PHP.
Nowadays, reactive programming is closely associated with Reactive Extensions (also called ReactiveX or just Rx); the most popular library to leverage reactive programming. Notably, RxJS 5, the JavaScript implementation of Rx, is very likely to be the first encounter with reactive programming for many developers. In this book, we will mostly focus on using the PHP port of Rx, called RxPHP (https://github.com/ReactiveX/RxPHP).
Asynchronous programming is not what PHP developers typically deal with. In fact, itâs kind of an uncharted territory because there arenât many resources available on this topic in PHP. Since reactive programming goes hand in hand with asynchronous programming, weâll work a lot with event loops, blocking and non-blocking code, subprocesses, threads, and IPC.
Our primary intention, however, will be learning Reactive Extensions and reactive programming with RxPHP. This book includes both RxPHP 1 and RxPHP 2. All examples are written for RxPHP 1 because the API is almost the same, and at the time of writing this book, RxPHP 2 is still in developmen...