none
Writing your first Rx Application

    Question

  • http://channel9.msdn.com/blogs/j.van.gogh/writing-your-first-rx-application

    Is this a recommended resource for absolute beginners to Rx or are there more modern introductions out there?

    The part I am having trouble with is:

    var q = from start in mouseDown
      from delta in mouseMove.StartWith(start).Until(mouseUp)
        .Let(mm=> mm.Zip(mm.Skip(1), (prev, curr) ==>
                  new { X = curr.X - prev.X, Y = curr.Y - prev.Y}))
      select delta;

    There is no longer a Let operator in the package from NuGet. Found http://stackoverflow.com/questions/7190750/rx-let-function on StackOverflow, but it didn't work for me...compiler didn't like the Zip parameters. If anyone can provide some guidance on how to get this code snippet to work or direct me to some up-to-date beginner resources, that would be great!



    • Edited by narohi Friday, February 22, 2013 4:23 PM
    Friday, February 22, 2013 4:22 PM

All replies

  • I wrote a free online book last year that is targeted specifically at beginners like you.

    www.IntroToRx.com

    I hope it is of use to you.

    With regards to your question on the C9 video. I found this a really cool example of Rx it is great for show casing the succinct nature of Rx queries. However I do find that it is over complex for newbies.

    You may find that splitting the query into two parts helps

    var dragSequence = from start in mouseDown
      from mm in mouseMove.StartWith(start)
    	  .Until(mouseUp)
      select mm;
    
    var deltaSequence = dragSequence
      .Zip(
        dragSequence.Skip(1),
        (prev, curr) => new { X = curr.X - prev.X, Y = curr.Y - prev.Y});

    It is probably time someone produced the cookbook of Rx samples that actually work with the recent releases of Rx

    :-s

    Lee


    Lee Campbell http://LeeCampbell.blogspot.com

    Friday, February 22, 2013 5:50 PM
  • Wow, your book looks like a great resource; thanks for all the hard work on it.
    • Edited by narohi Friday, February 22, 2013 9:19 PM
    Friday, February 22, 2013 9:18 PM