• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Reactive extensions itjam
 

Reactive extensions itjam

on

  • 460 views

 

Statistics

Views

Total Views
460
Views on SlideShare
460
Embed Views
0

Actions

Likes
0
Downloads
2
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
  • давайте вспомним buzzwords: Azure, Silverlight, Windows Phone
  • Speaker tips:The essential difference is who controls how the data is received.Philosophically this is nothing but how the application and the environment work together.Looking from the application’s point of view:Does it ask the environment – interactively – for data?  enumerableDoes it passively wait for the environment to send data and react to it?  observableBoth are complementary models. One doesn’t (aim to) replace the other.Matter of which one aligns more closely to which model:SQL’ s TDS protocol is pull-based, hence IE is the best fit.Stock broker services may be push-based, hence IO is a better match.Will see how one can convert between those.

Reactive extensions itjam Reactive extensions itjam Presentation Transcript

  • reactive extensions
  • about me
    Kharkov – Ciklum (Scale Point) - .NET – podcasts – open source
  • rxcurrent version
    • Base interfaces in BCL .NET 4 and WP7
    • Stable version: v1.0.10621
    • Experimental Release: v1.1.10621
    • Last update: June 29, 2011
    • http://msdn.microsoft.com/en-us/data/gg577609
  • rxfor
    .NET
    .NET 3.5 SP1
    .NET 4
    Silverlight
    Silverlight 4
    Silverlight 5
    Windows Phone
    Java script
  • rxmission
    “Rx is a library for composingasynchronous and event-based programs using observable collections.”
  • “asynchronous”
  • “observable”
    interfaceIObservable<out T>
    {
    IDisposableSubscribe(IObserver<T> observer);}
    interface IObserver<inT>
    {
    voidOnNext(T value);
    voidOnError(Exception ex);
    voidOnCompleted();
    }
    interfaceIEnumerable<out T>
    {
    IEnumerator<T> GetEnumerator();}
    interface IEnumerator<out T> : IDisposable
    {
    boolMoveNext();
    T Current { get; }
    void Reset();
    }
  • Application
    Got next?
    MoveNext
    OnNext
    Have next!
    Interactive
    Reactive
    Environment
    IObservable<T>
    IObserver<T>
    IEnumerable<T>
    IEnumerator<T>
  • IDisposable
    interfaceIObservable<out T>
    {
    IDisposableSubscribe(IObserver<T> observer);}
    interface IObserver<inT>
    {
    voidOnNext(T value);
    voidOnError(Exception ex);
    voidOnCompleted();
    }
  • “composing”
    • Linq(Where, Take, Skip, Sum, Max, Any, …)
    • Statements(If, Case, For, While, DoWhile)
    • Combinators(Merge, Zip, Amb, …)
    • Exceptions(Catch, Retry, ..)
    • Rx(Delay, Throttle, Interval, Publish, …)
  • “event-based”
    Observable.FromEventPattern()
    Observable.FromAsyncEventPattern()
  • IScheduler
    Observable.OnserveOn()
    Observable.SubscribeOn(Scheduler.TaskPool)
  • demo
  • rxunit testing
  • more rx
    Rx Contribhttp://rxcontrib.codeplex.com/
    Reactive Extensions - Extensions (Rxx)http://rxx.codeplex.com/
    Rx Power Toys
    http://rxpowertoys.codeplex.com/
  • examples
  • ReactiveUI
    http://www.reactiveui.net/
  • domain events
    http://chaliy.name/archive/2010/1/business_logic_rx_example
  • TweetSharp.Rx
    https://github.com/jhollingworth/TweetSharp.Rx
  • rxin books
  • information
    Rx team blog http://blogs.msdn.com/rxteam
    DevLabshttp://msdn.microsoft.com/en-us/data/gg577609MSDN forums http://social.msdn.microsoft.com/Forums/en-US/rx
    Channel9 http://channel9.msdn.com/Tags/Rx
    Wiki http://rxwiki.wikidot.com
  • summary
  • questions?
    dimapasko@gmail.com
    pad@ciklum.net
    @dimapasko