Description
Course info
Rating
(65)
Level
Intermediate
Updated
Dec 5, 2016
Duration
1h 27m
Description

Dealing with asynchronous code in .NET has always been problematic, as it is very different from synchronous, linear code. In this course, Taming Asynchronous .NET Code with Rx, you will learn how to model applications as streams of data with Rx. First, you will learn how to create sequences of observable data. Next, you'll learn how to consume these sequences in different ways. Finally, you'll learn how to easily synchronize multiple threads and data streams. When you finish this course, you will have working knowledge of reactive programming with .NET that will help you write asynchronous and event-driven code that is simpler and easier to maintain.

About the author
About the author

Edin Kapic is a SharePoint MVP, Architect, Tinker and Geek in Spenta consulting, and the MCT Regional Lead for Spain.

More from the author
Human Behavior for Technical People
Beginner
3h 17m
Jun 16, 2014
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone, my name is Edin Kapic, and welcome to my course Taming Asynchronous. NET Code with Rx. I'm a senior software architect Sogeti Spain in the sunny city of Barcelona. Writing responsive and performant applications means writing asynchronous code, which is a messy business, I have to admit. If only there were another cleaner way of doing asynchronous or event-driven code, well there is, and it's called reactive programming. This course will teach you how to tame your asynchronous and event-drive code with Reactive Extensions or Rx. We will cover an introduction to reactive programming and its concepts, creating sequences of observable values for many sources, filtering and manipulating observables using Linq operators, manage concurrency and multithreading in a cleaner way with schedulers. By the end of this course, you will know how to rewrite those messy callbacks into observables, and make them more maintainable and testing friendly. Before beginning the course, you should be familiar with. NET Framework concepts of tasks, delegates, and events. From here, you should feel comfortable diving into reactive programming with JavaScript with courses on RxJS. I hope you'll join me on this journey to learn reactive programming with Taming Asynchronous. NET Code with Rx course here at Pluralsight.

Introducing Reactive Programming
Hello, my name is Edin Kapic from Pluralsight. Welcome to my course about Taming Asynchronous. NET Code with Rx. Don't worry if you have no idea what Rx is, you are just a few minutes away from learning it. One of the most difficult concepts in modern. NET and JavaScript programming is how to write maintainable asynchronous code. More often than not, it evolves into a sequence of callbacks or event handlers disconnected from one another, making for isolated pieces of code that are hard to grasp or understand. The situation has improved with new async and await keywords and task library in. NET 4. 5, but it's not a deal as you still have to cope with all the APIs or languages that don't have that luxury. Many times you have to ask yourself if there is another way of programming asynchronous or event-driven code. The answer is yes, and the solution is called Rx, or Reactive Extensions. Let's see a quick example.

Creating Sequences of Observables
Hello, this is Edin Kapic from Pluralsight. In this module, I will show you how to create sequences of observable objects from scratch or from existing data structures. Creating the data flow structure of our application starts by identifying and creating the appropriate observable sequences, and that's what you'll be doing very soon. As you should remember from the previous module, the basics of our sequences are the two simple interfaces in the System. Reactive namespace, IObservable and IObserver. However, you won't be using them directly in your work with Reactive Extensions. You'll be using higher-level constructs such as factories and subjects, it'll be much easier, and your code will start looking more declarative, almost looking like functional programming. In general, there are three ways to create an observable in Rx. The first one is to return a simple one-time result. The second one is to wrap an existing result in an observable. And the third one is to write a generation function. As you can imagine, the difficulty increases from left to right. I will show them in more detail in the following section.

Filtering and Controlling the Sequences
Hello, this is Edin Kapic from Pluralsight. In this module, I will show how you can control and tame the sequences with built-in Linq operators. The power and ease of use of Linq operators is one of the main strengths of using Reactive Extensions in the first place. So far, you have learned how to generate observable sequences from a variety of sources. Also you have seen how to consume those observables. In this module, I'm going to focus on the missing piece of Rx Framework, the rich Linq operators for filtering and controlling of the sequence. There are roughly four categories of Linq operators in Rx. The ones that you are going to be using most frequently are the filtering operators. They constrain the sequence output to only those values that fit certain criteria. The second group of operators are the ones that are used to combine two or more sequences. With Rx, it's very easy to derive a combined sequence of values using only a few lines of code. The third group of operators are the ones that calculate aggregated values. They are a way of flattening the sequence into a single value, leaving the push model, and getting a scalar value as a result. The last group of operators are utility operators. They are used for side effects and overall configuration of the sequences. With these four groups of operators, I'll show you how they behave, and when it's appropriate to use them in your applications.

Simplifying Asynchrony and Multithreading
Hello, this is Edin Kapic from Pluralsight. In this module, I'm going to dig deeper in the concurrency, asynchrony, and multithreading in Reactive Extensions, and how these concepts are elegantly obstructed away for you, the developer. In more detail, I'm going to remind you how asynchronous operations are well suited for Reactive Extensions. Then I'm going to explain concurrency and multithreading that happens under the cover with many of the Rx operations. Finally I will introduce the concept of schedulers in Rx, and how they are used to achieve concurrency.