Rx - Reactive Extensions

2,487 views

Published on

Slides from my Bleeding Edge 2010 Conference Reactive Extensions Talk.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,487
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
16
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Rx - Reactive Extensions

  1. 1.
  2. 2. ANDREJ TOZON<br />Microsoft MVP: Client App Dev<br />ANT Andrej Tozon s.p., Ljubljana<br />@andrejt| andrej@tozon.info | http://tozon.info/blog<br />
  3. 3. Preštevanje zahteva svoj čas<br />foreach (Slikca slikca in pokecSlikc){    if (!prjatu.ImaSlikco(slikca))    {        prjatu.MenjajSlikco(slikca);    }}<br />
  4. 4. Preštevanje<br />IEnumerator<br />prešteva<br />IEnumerable<br />
  5. 5. Opazovanje<br />Opazovalec<br />opazuje<br />Opazovanega<br />
  6. 6. Opazovanje<br />IObserver<br />opazuje<br />IObservable<br />
  7. 7. Opazovanje<br />public interface IObservable<out T>{    IDisposable Subscribe(IObserver<T> observer);}<br />public interface IObserver<in T>{    void OnNext(T value);    void OnError(Exception error);    void OnCompleted();}<br />
  8. 8. Preštevanje ali opazovanje?<br />IEnumerator<br />prešteva<br />IEnumerable<br />IObserver<br />opazuje<br />IObservable<br />
  9. 9. Eden vleče, drugi poriva<br />IEnumerator<br />IEnumerable<br />IObserver<br />IObservable<br />
  10. 10. Rx - <br /> ReactiveExtensions<br />Andrej Tozon<br />Microsoft MVP: Client App Dev<br />ANT Andrej Tozon s.p., Ljubljana<br />@andrejt| andrej@tozon.info | http://tozon.info/blog<br />
  11. 11. Rx - <br /> ReactiveExtensions<br />Library for composing asynchronous and event-based programs using observable collections<br />
  12. 12. Rx - <br /> ReactiveExtensions<br />Library for composing asynchronous and event-based programs using observable collections<br />
  13. 13. Rx - <br /> ReactiveExtensions<br />Library for composing asynchronous and event-based programs using observable collections<br />
  14. 14. Rx - <br /> ReactiveExtensions<br />Library for composingasynchronous and event-based programs using observable collections<br />
  15. 15. demo<br />
  16. 16. Kje to dobim?<br />http://tiny.cc/rxnet<br />.NET FX 3.5 SP1 in 4.0<br />Silverlight 3 in 4<br />Windows Phone 7<br />JavaScript<br />
  17. 17. Kje to dobim?<br />System.Observable.dll<br />IObservable in IObserver sta že vključena v .NET FX 4.0 Core<br />System.CoreEx.dll<br />System.Reactive.dll<br />System.Interactive.dll<br />EnumerableEx<br />
  18. 18. Operatorji v EnumerableEx<br />Konstruktorji<br />Return<br />Throw<br />StartWith<br />Generate<br />Defer<br />Enumerable -> Observable -> Enumerable<br />var o1 = Enumerable.Range(1, 10).ToObservable();var o2 = Enumerable.Range(51, 10).ToObservable();var en = o1.Amb(o2).ToEnumerable();<br />Kombinatorji<br />Concat<br />Repeat<br />Scan<br />SelectMany<br />
  19. 19. Viri<br />Rx DevLabs http://tiny.cc/rxnet<br />Rx Blog http://blogs.msdn.com/rxteam<br />Rx Wiki http://rxwiki.wikidot.com/<br />Channel9 http://channel9.msdn.com/tags/Rx/<br />
  20. 20. vprašanja?<br />Andrej Tozon<br />Microsoft MVP: Client App Dev<br />ANT Andrej Tozon s.p., Ljubljana<br />@andrejt| andrej@tozon.info | http://tozon.info/blog<br />
  21. 21. HVALA<br />

×