Preface

Reactive Extensions (Rx) for .NET was first published in November 2009 under the short description “Rx is a .NET Library that allows programmers to write succinct declarative code to orchestrate and coordinate asynchronous and event-based programs based on familiar .NET idioms and patterns.” (See http://mng.bz/gQ31.)

I remember watching the first examples and reading the discussions. I was amazed by the elegance of the solutions and how simple they looked. Unfortunately, when I sat down and tried to use Rx, things were harder than I thought, and the mental change I needed to make toward reactive programming was significant. In those days, there wasn’t a lot of material on the subject, and I had to struggle to solve my issues and learn things the hard way with a lot of trial and error.

In 2012, at end of my military service and upon joining CodeValue (www.codevalue.net), I had two major projects that enabled me to really appreciate my Rx knowledge. The first was about a cybersecurity application that needed to react to multiple events and coordinate them in order to show the end user the state of various incidents all happening in parallel. The second was a video chat application, running on mobile and PC devices. The video chat application reacted to events such as users logging in and out of the system and receiving messages of various types that had to be dealt with differently. Though these two systems were different, they shared the same problems of writing a flow based on events—a flow that involves filtering of received values, dealing with asynchronicity and concurrency, and identifying patterns of recurring events so that the application could respond efficiently and correctly. I introduced Rx to both of those systems, and it was one of the things that made each a success. We exceeded expectations and preceded our schedule.

Still, even though I had knowledge of Rx, problems still happened from time to time, and little material on Rx, such as books and guides, was available. Many times problems originated because of my colleagues’ lack of knowledge or situations that were new to us. Luckily, after I identified the problem source, it would be easy to fix, mostly because of the flexibility of Rx operators. In the following years, I started to blog and speak about Rx and how it made solving complex problems easy. That is when the idea for this book started to grow. My vision was to create a step-by-step guide that holds the pieces needed for the .NET programmer to get the maximum out of the Rx library and the reactive programming paradigm. I also wanted to write about the practices that I acquired over the years, as well as the pitfalls and their solutions.

It took hard and careful work to make sure the book fulfills its aim. Some chapters had to be rewritten, topics were changed, and some material had to be left out in order to concentrate on the important and fundamental features. The result of this hard work is Rx.NET in Action, a book that you can read front to back or go directly to a specific chapter to solve a problem or refresh your memory.

Rx is an evolving technology that was also ported to numerous other platforms and languages. It is an open source project and part of the .NET Foundation (www.dotnetfoundation.org). My hope is that Rx will become the de facto way to program, orchestrate, and coordinate asynchronous and event-based programs in .NET and that this book will give you everything you need to be ready for this new and exciting world of Rx.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.152.58