Reactive Extensions for .NET
Upcoming SlideShare
Loading in...5
×
 

Reactive Extensions for .NET

on

  • 834 views

 

Statistics

Views

Total Views
834
Views on SlideShare
834
Embed Views
0

Actions

Likes
0
Downloads
12
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Reactive Extensions for .NET Reactive Extensions for .NET Presentation Transcript

    • Reactive Extensions for .NET Andrei Marukovich contact@lunarfrog.com twitter: @amarukovich
    • Rx is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators. Rx = Observables + LINQ + Schedulers
    • Observables • IObservable<T> • IObserver<T>
    • Enumerables interface IEnumerable<out T> { IEnumerator<T> GetEnumerator(); } interface IEnumerator<out T> : IDisposable { T Current { get; } bool MoveNext(); void Reset(); }
    • Pull and Push Consumer Pull Any new data? IEnumerable • • • • Sensors UI events Web services Social media Source IObservable Push New data available!
    • Observables interface IObservable<out T> { IDisposable Subscribe(IObserver<T> observer); } interface IObserver<out T> { void OnNext(T value); void OnError(Exception error); void OnCompleted(); }
    • Using observables IObservable IObserver Subscribe OnNext OnNext OnComplete
    • Contract OnNext* [OnComplete | OnError] 1 2 1 3 2 1 2 1 2 3 4 3 3 4 4 5 6
    • Demo: Observable sequences • Subject<T> • Observable • Never, Empty, Return, Throw, Create • Range, Generate, Repeat • Interval, Timer
    • LINQ Filtering • Where, Distinct, Skip(While|Last|Until), Take Inspection • Any, All Aggregation and transformation • Count, Min, Max, Average, Select
    • Demo: LINQ • Common LINQ operators • Combining sequences • Pairing • Sequentially • Concurrently
    • Rx bridges • Observable.FromAsync() • Observable.FromEvent() • Observable.FromEventPattern()
    • Demo: LINQ to events • Time shifting • Throttle • Sample • Buffer • Delay
    • Concurrency SubscribeOn • Invocation of the subscription ObserveOn • Observing of notifications
    • Demo: Concurrency • Schedulers
    • Schedulers • ImmediateScheduler • CurrentThreadScheduler • DispatcherScheduler • EventLoopScheduler • NewThreadScheduler • Thread/Task Pool • TestScheduler
    • Flavors of Rx .NET • WinForms, WPF, Silverlight • Windows Phone, WinRT • ASP .NET Beyond .NET • RxJS, RxCpp • RxPy, Rx.rb
    • Resources • http://rx.codeplex.com/ • http://bit.ly/Rx-Home
    • Thank you! Andrei Marukovich contact@lunarfrog.com twitter: @amarukovich