Asynchronous Callbacks with Rx

Reactive Programming, Posting # 8

One of the tried and true patterns in .NET programming is to call an Asynchronous service (e.g., BeginGetResponse) and to then provide a callback to a second method for when the call completes.  This can get very complex very quickly if you have chained calls (call this, then when you finish, call that)

Let’s take a look at how you can simplify such a call with Rx by examining making a HTTPWebRequest.

Continue reading →

Posted in Data, Essentials, Reactive | Tagged | 11 Comments

Silverlight Sans Xaml?

Are we far enough along in the development of WYSIWYG tools, specifically both the NoXaml design surface in Visual Studio, and even more so, Expression Blend, that the right way to teach Silverlight and Windows Phone programming is without Xaml?

I hear your screams of protest already:

“That’s fine for some things but not for… “ 

What?  What can’t you do in the UI designer?

“But… when you get in trouble you’ll need Xaml…”

This argument rings of the old standby “you can’t really program in foo unless you understand Assembler. When was the last time you needed assembler? Those days are over. Are the days of coding with underlying Xaml over?

Certainly at some point tools like Blend will create better Xaml than will be created by hand-coding, and with fewer errors.  Are we there yet?

Obviously you want to go to Visual Studio for code, but that is not an alternative to Xaml. All I’m suggesting here is that new books and new tutorials on Silverlight or Windows Phone do not need to teach Xaml – that everything you can do in Xaml you can do as well or better in Blend (or using the Visual Studio design surface).

Posted in Community, Essentials, Opinion, WindowsPhone | Tagged | 36 Comments

Yet Another Podcast #25–Glenn Block / WCF

Talking with the esteemed Mr. Glenn Block about WCF, HTTP and ever so much more.

Glenn is the Program Manager for the WCF Web APIs, former PM for MEF and generally brilliant.

Listen | Return to Yet Another Podcast

Call in comments:  1-347-YAP-CAST

rssiTunesalt

Posted in Patterns & Skills | Tagged | 8 Comments

Reactive Drag and Drop Part 2

Reactive Programming, Posting # 7

In Part 1 of this 2 part posting we looked at capturing the mouse movements.  The key code in Part 1 was,

var q = from start in mousedown
        from pos in mousemove.StartWith( start )
        .TakeUntil( mouseup )
        select pos;

Now, in part 2, rather than just getting the coordinates of the mouse, we want to find the delta so that we can move the image with the changes in the mouse position. 

Continue reading →

Posted in Linq, Mini-Tutorial, Reactive, WindowsPhone | Tagged , , | 2 Comments

Lambda–Not as weird as it sounds

Windows Phone From Scratch #36

Yesterday I wrote a few posts on LINQ but carefully avoided using Lambda expressions. Now it is time to look at this feature that sounds fierce but is really fairly straight-forward.

Lambda expressions are just a short-hand notation for declaring delegates.

Continue reading →

Posted in Patterns & Skills | 7 Comments

Linq to XML

A LINQ Tutorial

Earlier, we took a look at two variants on Linq statements, one against a collection of integers, and then another against a collection of user-defined objects (Customers).

Now, we’ll read an XML file and select from that with Linq.

Continue reading →

Posted in Linq, Mini-Tutorial | Tagged | 8 Comments

Linq with Objects

A LINQ Tutorial

 

In my earlier post, we took a first look at a Linq query against a collection of integers. In this posting, we’ll look at creating a Linq query against a collection of objects.

Continue reading →

Posted in Linq, Mini-Tutorial | Tagged | 2 Comments

Getting Started With Linq

A LINQ Tutorial

If you are serious about Windows Phone programming then it is imperative to become at least familiar with LINQ.  This is given additional impetus by the emerging importance of Reactive Programming, a full understanding of which requires at least a working understanding of LINQ.

Over the next few weeks or more, I’ll explore LINQ in a series of episodic postings.  None of this is terribly difficult, though there are some syntactic bits that take a little getting used to.

Continue reading →

Posted in Linq, Patterns & Skills | Tagged | 1 Comment

Video: Reactive Phone Programming For Windows Phone 7

Reactive Programming: Posting #6

I just posted a new video on Reactive Programming for Windows Phone 7, here. This is timed nicely to go with the more in-depth podcast on Reactive Programming, available here.

Posted in Reactive | Tagged | 3 Comments

Yet Another Podcast #24–Reactive Extensions

Reactive Programming: Posting #5

Talking with Matthew Podwysocki and Bart De Smet about Reactive Extensions.

Bart is a Software Development Engineer – SQL Cloud Programmability Team and actively involved in the design and implementation of Reactive Extensions.  Matt is a Senior developer working for Microsoft and contributing to the Reactive Extensions framework.

Listen | Return to Yet Another Podcast

Call in comments:  1-347-YAP-CAST

rssiTunesalt

Posted in Podcast, Reactive | Tagged | 1 Comment

Nokia and Microsoft

Nokia and Microsoft made a joint announcement today that they are creating a strategic partnership which includes (among other points):

  • Nokia will adopt Windows Phone as its principal smartphone strategy
  • Nokia will help drive the future of Windows Phone, contributing its expertise on hardware design, language support, etc.

There is much  more, covered in depth here, but this is a significant announcement for Windows Phone developers and certainly one we’ll all be keeping a close eye on.

Posted in News | 1 Comment

Reactive Drag and Drop Part 1

Reactive Programming, Posting # 4

Continuing the discussion of Reactive Programming, this posting, based on a video from the Rx team, will create and annotate Drag and Drop using the Rx toolkit.  In part 1 we’ll track mouse movements, in part 2 we’ll implement drag and drop on an image.

Continue reading →

Posted in Mini-Tutorial, Patterns & Skills, Reactive | Tagged | 4 Comments