Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Enhancing user experiences with reactive extensions tccc10

624 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Enhancing user experiences with reactive extensions tccc10

  1. 1. Enhancing User Experiences With Reactive Extensions<br />Bryan Anderson<br />
  2. 2. What is Rx?<br />Reactive Extensions are a set of extension methods that allow you to compose and operate on streams with LINQ operators in the same way you would a list.<br />
  3. 3. Compose and operate on streams? Sounds like it’s time for me to take a nap.<br />
  4. 4. Streams?<br />A stream can be thought of as a list of events that take place over time.<br />
  5. 5. Compose?<br />Sticking functions together, like Legos. Say we have two functions f and g.<br />Math: f(g(x))<br />Unix: x | g | f<br />
  6. 6. What is Rx?<br />Reactive Extensions are a set of extension methods that allow you to compose and operate on streams with LINQ operators in the same way you would a list.<br />
  7. 7. It’s too early to think abstractly and a nap sounds really good right now.<br />
  8. 8. IObservable vs IEnumerable<br />IObservable and IEnumerable are mathematical duals. Which just means they’re equivalent. Every IEnumerable could be turned into an IObservable and vice-versa (with enough time).<br />
  9. 9. If they’re equivalent what does IObservable give us?<br />
  10. 10. IObservable vs IEnumerable<br />IEnumerable let’s you pull items from it.<br />IObservable pushes items to you.<br />
  11. 11. IObservable vs IEnumerable<br />When it comes down to it<br />IObservable = IEnumerable + Time<br />
  12. 12. Marble Diagrams<br />Running observable:<br />Completed normally:<br />Completed with an exception:<br />Input goes above output: <br />
  13. 13. I think you’ve lost your marbles.<br />
  14. 14. Questions so far?<br />Please feel free to ask questions as we go.<br />
  15. 15. The LINQ you’re used to<br />Common LINQ queries work the same<br />Select<br />Where<br />First<br />Skip<br />Take<br />
  16. 16. Time adds more options<br />Throttle<br />Delay<br />BufferWithTime, BufferWithCount<br />Scan<br />Zip, Merge, CombineLatest<br />
  17. 17. Dude, this is a CODE camp. You need to stop talking and show me some code!<br />
  18. 18. Questions?<br />I love feedback!<br />Bryan Anderson<br />bryan.anderson@ilmservice.com<br />@SolaAesir<br />

×