background preloader

Rx

Facebook Twitter

Windows Phone 7, Reactive Extensions, OData, MVVM - Learn. Teach. Share. Download source: RxTests.zip No, this is not an attempt to get spidered by putting every hot technology in the title! It’s actually self-induced attempt to give myself a brain hemorrhage by stuffing as many new to me technologies in one sample application as possible and trying to building it out … In this corner, you have me! Your humble author. And, in the other corner, you have a Windows Phone 7 sample application that uses Rx to retrieve data from an OData web service and display it into a data bound list all using the MVVM pattern and ready to support tombstoning using ViewModel pairing and Anchoring patterns.

Here are some resources I used … Windows Phone 7 Tools (RTM) Reactive Extensions (Rx) Introducing the Reactive Framework (in 5 parts!) You will need to install Reactive Extensions for Silverlight in order to get the IObservable interface. And, here is a preview of what I built … Looks pretty simple, right? Let’s start at the beginning, the Solution … That’s the setup. Reactive Extensions for .NET an Introduction. Scott Weinstein on .Net. I have an idea that it may be possible to predict build success/failure based on commit data.

Why Scala? It’s a JVM language, has lots of powerful type features, and it has a linear algebra library which I’ll need later. Project definition and build Neither maven or the scala build tool (sbt) are completely satisfactory. This maven **archetype** (what .Net folks would call a VS project template) 1.mvn archetype:generate `-DarchetypeGroupId=org.scala-tools.archetypes `-DarchetypeArtifactId=scala-archetype-simple `-DremoteRepositories= `-DgroupId=org.SW -DartifactId=BuildBreakPredictor gets you started right away with “hello world” code, unit tests demonstrating a number of different testing approaches, and even a ready made `.gitignore` file - nice! Sbt has some nice features And some real limitations Side note: If a language has a fast compiler, why keep the slow compiler around? I choose sbt, for the faster development speed it offers. Syntax Community 01. 01.

Reactive Extensions Team Blog. Reactive Extensions for .NET (Rx) Forum. (not yet) 101 Rx Samples - Reactive Framework (Rx) Wiki. You! Yes, you, the one who is still scratching their head trying to figure out this Rx thing. As you learn and explore, please feel free add your own samples here (or tweak existing ones!) Anyone can (and should!) Edit this page. (edit button is at the bottom right of each page) (and sorry for the years of spam pages there - they should be gone now. Start - Run Code Asynchronously Run a method asynchronously on demand Execute a long-running method asynchronously. // Synchronous operation public DataType DoLongRunningOperation(string param) { ... } public IObservable<DataType> LongRunningOperationAsync(string param) { return Observable.Create<DataType>( o => Observable.ToAsync<string,DataType>(DoLongRunningOperation)(param).Subscribe(o) ); } CombineLatest - Parallel Execution Merges the specified observable sequences into one observable sequence by emitting a list with the latest source elements whenever any of the observable sequences produces an element.

Observing an Event - Simple Window Zip. Fun with Rx. Download source code - 292 KB Introduction This article is an exploratory look into the Microsoft DevLabs project called Reactive Framework (Rx for short). I feel kind of weird saying this, but the demo solution that comes with this article will provide you nothing re-usable at all, but what it should hopefully do is give you an understanding of how Rx works.

Prerequisites As the Reactive Framework is still effectively a DevLabs project, and not entirely in the mainstream .NET Framework (yet), you are still required to download and install an MSI, which you can find at the following URL: where the demo app relies on the "Rx for .NET 4.0" option being downloaded and installed. The other thing you will need is Visual Studio 2010, and .NET 4.0 Rx Rx is a library for composing asynchronous and event-based programs using observable collections. - Reactive Framework home page up on date 07/09/10.

Discussing the Demo Apps RxDraw (.NET 4.0) Using Reactive Extensions in Silverlight. This article is compatible with the latest version of Silverlight. This is part 1 of the series “Reactive Extensions in Silverlight”. 1. Introduction One of the coolest features which is part of .NET Framework and also available for Silverlight applications is the RX Framework. The arising interest around the RX Framework made me roll up my sleeves and start playing around this. So the first step was to answer several important questions such as: “what is Linq to Events?” , “what is RX Framework?” Take a look at the next code snippet: How many times have you done this in your application? What we have here is an implementation of the Iterator pattern (IEnumerable\IEnumerator). Now, if we take a look at the RX style collection, they are push collections. We are handling the MouseMove event. On one side – we have the Iterator pattern ( IEnumerable<T>\IEnumerator<T>) and on the other side we have the Observer pattern (IObservable<T>\IObserver<T>).

Ok, But what can be done with the RX Framework? Rx%20HOL%20.NET. Exploring Reactive Extensions (Rx) through Twitter and Bing Maps Mashups. Download source - 43.36 KB NOTE: You can view the Silverlight examples in action on my blog. Contents Introduction Whether reacting to user-input or handling responses from web services, Silverlight applications are typically asynchronous in nature. The framework provides UI controls that fire events in response to user interactions. There are also classes like the DispatcherTimer and WebControl that perform some background work, firing events which are helpfully marshalled back onto the UI thread. However, Silverlight and the other .NET UI frameworks lack a way of orchestrating these asynchronous activities. In this article, I will look at how the Reactive Extensions (Rx) library provides a common interface for asynchronous events and actions giving a consistent way to composite, orchestrate and marshal events between threads (and also have some fun creating a few cool mashups along the way!)

What is the Rx? The “mission statement” for the Rx library can be summarised as follows: Let It Snow. Exploring Reactive Extensions (Rx) through Twitter and Bing Maps Mashups | Colin Eberhardt's Adventures in WPF.