Rx forwp7

612 views

Published on

Published in: Sports, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
612
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Rx forwp7

  1. 1. Becoming an Rx Pusher on WP7<br />Jim Wooley<br />Consultant<br />
  2. 2. CodeStock is proudly partnered with:<br />RecruitWise and Staff with Excellence - www.recruitwise.jobs<br />Send instant feedback on this session via Twitter:<br />Send a direct message with the room number to @CodeStock<br />d codestock 503 This session is great!<br />For more information on sending feedback using Twitter while at CodeStock, please see the “CodeStock README” in your CodeStock guide.<br />
  3. 3. The Hardest Problems <br />Solved By the Best Engineers <br />CADRE5<br />
  4. 4. Reactive Framework<br />“Rx is a library for <br />composingasynchronousand<br />event-based programs using <br />observable collections.”<br />
  5. 5. Observable Collection - Common Uses<br />
  6. 6. Flavors of Rx<br />JavaScript<br />
  7. 7. Pulling with Enumerables<br />False<br />var query = from candy in bagOfCandies<br />            where candy.HasNuts<br />            group candy by candy.Name into GroupedCandies<br />            select new {Name = GroupedCandies.Key,                         CandyCount = GroupedCandies.Count()};<br />foreach (var aggregate in query)<br />Move Next<br />Move Next<br />Move Next<br />Move Next<br />
  8. 8. IEnumerator vs. IObserver<br />public interface IEnumerator<br />{<br />   object Current { get; }<br />   bool MoveNext();<br />   void Reset();<br />}<br />Blocking<br />public interface IObserver<T><br />{<br />    void OnCompleted();<br />    void OnError(Exception exception);<br />    void OnNext(T value);<br />}<br />
  9. 9. Pushing with Observables<br />var query = from candy in bagOfCandies<br />            where candy.HasNuts<br />            group candy by candy.Name into GroupedCandies<br />            select new {Name = GroupedCandies.Key,                         CandyCount = GroupedCandies.Count()};<br />query.Subscribe(group => DoSomething(group)); <br />OnCompleted<br />OnNext<br />OnNext<br />OnNext<br />OnNext<br />Subscribe<br />OnNext<br />
  10. 10. Moving from Enumerable to Observable<br />demo <br />
  11. 11. Rx Interfaces<br />
  12. 12. Composing with Events<br />demo <br />
  13. 13. Observable Events<br />First Class Objects<br />Disposable<br />Supports DI/IOC<br />Mockable<br />
  14. 14. Asynchronous Service Requests<br />Throttle<br />Randomizer service<br />BeginRollDie<br />IObservable<int><br />UI Thread<br />
  15. 15. Asynchronous Services<br />demo <br />
  16. 16. Further Information<br />Rx Data Developer Center: http://msdn.microsoft.com/data/gg577609<br />Reactive Extensions Team Blog: http://blogs.msdn.com/rxteam<br />Channel9: http://channel9.msdn.com/Tags/Rx<br />
  17. 17. Call to Action<br />Get the bits<br /><ul><li>Shipped in Windows Phone 7 ROM
  18. 18. Install with NuGet
  19. 19. Download at MSDN Data Developer Center</li></ul>Join the Community (MSDN forums)<br />http://social.msdn.microsoft.com/Forums/en-US/rx<br />
  20. 20. questions<br />Jim Wooley@jimwooleyhttp://www.ThinqLinq.com<br />
  21. 21. Fill out your Surveys<br />reminder<br />

×