Book Image

Reactive Programming for .NET Developers

Book Image

Reactive Programming for .NET Developers

Overview of this book

Reactive programming is an innovative programming paradigm focused on time-based problem solving. It makes your programs better-performing, easier to scale, and more reliable. Want to create fast-running applications to handle complex logics and huge datasets for financial and big-data challenges? Then you have picked up the right book! Starting with the principles of reactive programming and unveiling the power of the pull-programming world, this book is your one-stop solution to get a deep practical understanding of reactive programming techniques. You will gradually learn all about reactive extensions, programming, testing, and debugging observable sequence, and integrating events from CLR data-at-rest or events. Finally, you will dive into advanced techniques such as manipulating time in data-flow, customizing operators and providers, and exploring functional reactive programming. By the end of the book, you'll know how to apply reactive programming to solve complex problems and build efficient programs with reactive user interfaces.
Table of Contents (15 chapters)
Reactive Programming for .NET Developers
About the Authors
About the Reviewer

Asynchronous pattern in F#

In the previous sections, we first discussed functional programming. Then, we introduced F# and its main features. Finally, we described how to use the most important constructs in the F# language. The meaning of all this is to be able to deal with the main topic: FRP.

An important element is missing in order to introduce FRP. This is required because without it, you cannot fully understand reactive programming.

F#, like any other language of the .NET Framework, supports asynchronous programming. It is crucial to perform portions of code in a separate thread.

The syntax for applying asynchronous code is really simple. The following is the syntax:

async { <expression> } 

The code inserted in place of <expression> will be withdrawn in various ways through the use of specific types and their methods of asynchronous invocation. For example, the async class provides several methods that allow you to run this code on different threads.

A very important concept...