Rx – for beginners (part 13): Publish (broadcast to many subscribers)

2010/03/31

Rx - for beginners (part 13): Publish (broadcast to many subscribers) this post is the 13th in a series of posts about the new Reactive Framework (Rx). the series TOC can found here. in this post we will focus on the Publish operator.   the code for this post available here.   let guess how many times the select statement will be invoke for the following code, the underline stream will produce 2 value (0, 1)? Code Snippet IObservable<long> observableRoot = Observable.Interval(TimeSpan.FromSeconds(1));   var producer...

Rx – for beginners (part 12): RxJs

2010/03/30

this post is the 11th in a series of posts about the new Reactive Framework (Rx). the series TOC can found here. in this post we will focus on Rx for JavaScript.   the recently the Rx team release JavaScript library that capable to get observable stream from events.   for example the syntax for mouse move event will be: var mouseMove = Rx.Observable.FromJQueryEvent($(document), "mousemove");   all you have to do in order of using this library is to rx.js...

Rx – for beginners (part 11): ObserveOn

2010/03/29

Rx - for beginners (part 11): ObserveOn this post is the 11th in a series of posts about the new Reactive Framework (Rx). the series TOC can found here. in this post we will focus on the ObserveOn…   the code sample for this post can be found here.   sometime it is important that the observation will occurs on specific thread. for example GUI application like (WinForm, WPF and Silverlight) throw exception whenever UI component accessed on thread different than its creation thread.   ObserveOn...

Chess – Deterministic parallel testing

2010/03/28

Chess - Deterministic parallel testing   modern software development is drifting in the direction of Parallel Computing. even those the tools and libraries for Parallel Computing is continuously improving,  we still left with the old problem of how to test the non deterministic execution nature of Parallel Computing programming.   this post will focus on the Chess testing framework, which is trying to solve the non deterministic testing issue.   you can download the chess framework from here. the code for this post is available...
no comments

Pex – test input generator

2010/03/27

Pex – test input generator   this post will focus on the Pex tool. Pex is an automatically test input generates. it try to get both high code coverage and potential failures.   you can download Pex from here.   So why do we need another testing tool? Pex does not intend to replace any of the existing testing frameworks, in matter of fact, its generated test can be saved as testing code using any of the leading testing frameworks.   When to...
tags:
2 comments

recommending VS 2010 XAML IntelliSense Extension

2010/03/26

recommending VS 2010 XAML IntelliSense Extension a pal named Karl had published a very useful plug-in to VS 2010. this plug-in is making Xaml writing so much better experience with enhanced IntelliSense.   if you doing some Xaml work using VS 2010 you should consider to download this plug-in. the download is available from the following link: http://karlshifflett.wordpress.com/2010/03/21/visual-studio-2010-xaml-editor-intellisense-presenter-extension/#comment-2228   Features Pascal case lookup Optional narrowing list filter Filtering based on item type xmlns IntelliSense options...
no comments

Moles – isolate your test unit

2010/03/25

Moles – isolate your test unit   this post will focus on the Moles - Isolation framework for .NET. you can download the Moles framework from here, or even better download the Pex testing framework (that includes Moles) from here. (I will survey the Pex framework in one of the upcoming posts).   the code sample for this post is available here.   How do you test the correctness of the following method? Code Snippet public class MyComponent {     private DateTime...
tags:
3 comments

MEF for Beginner (Import from Xaml) – part 11

2010/03/20

MEF for Beginner (Import from Xaml) - part 11 this is the 11th post of the MEF for Beginner series, the series TOC is available here. this post will focus on Importing mef parts directly from the Xaml. the code sample for this post is available here.   assuming that we have the following exports: Code Snippet class DemoStrings {          public string Text1 { get { return "Hello world"; } }          public string Text2 { get { return "export using custom attribute"; } }...
no comments

Recommendation

Recommendation   this is a post recommendation about using Rx framework with WPF events, I'm recommending this post from bobby's blog, the post is demonstrating the use of creating observable stream from WPF event. it is a short post with nice little code sample. bobby did a real good job by wrapping the observable event (Observable.FromEvent) into more human readable format (using T4 template).
no comments

Rx – for beginners (part 10): Concat expression

2010/03/16

Rx - for beginners (part 10): Concat expression this post is the 10th in a series of posts about the new Reactive Framework (Rx). the series TOC can found here. in this post we will focus on the Concat expression.   the code for this post can be download from here.   What does it do? the Concat expression is used to concatenate one Observable stream into the end of another Observable stream. once the first Observable stream is completed the the concat...