Using the Windows Azure Service Bus - Message relaying

My last post was a bit light on the coding side I know. I also know that I promised to make up for that with a post with some actual code. And this is it! Actually, this is one of them. My plan is to walk through several of the features over the next few posts in the n00b kind of way.

That is, I am going to go through the basics for each of the features I deem interesting, making it easy to follow for people who are new to the Service Bus. And please don’t be offended by the “n00b” comment. We are all “n00bs” at some point in every thing we do.

More...

What is the Windows Azure Service Bus?

For the last year, there have been few things in the development space I have heard as much about, as I have heard about Windows Azure. Microsoft has been pushing the Azure platform hard, we all know that, but not all of us have had the chance to try it out though.

Luckily I have had the fortune of being on a few projects that have been using it, but to be honest, I haven’t been really blown away yet. Yes…it does offer some awesome features that work extremely well in certain scenarios, but I would still claim that it isn’t for everyone. Having that said, I admit that I have only scratched the surface of the platform…

Lately however, more or less every time I hear Azure, it comes bundled with the term Service Bus. Either in “this would be such a great scenario for the service bus”, or in “wonder if we can get the service bus in there so that we can try it out”. Ok…so one of these are ok, the other isn’t to be honest… Playing with the service bus isn’t hard, as I will show you in future posts, and thus does not need to be added to a project to be tried. But before I start coding, I want to have a little rant about what it is. Or at least a rant about how I have understood it…

More...

WCF service clients for the complete n00b

Ok, so in my last post, I gave a brief introduction to WCF for the complete n00b. As a follow up to this, I would like to have a look at some different ways to consume these services.

The “normal” way to do it is obviously by adding a service reference to the project in VS, but there are alternatives that can make sense.

The samples I am going to use are specifically for Silverlight as they focus on simple bindings and features that Silverlight supports, but it can still be used for any .NET client.

More...

A WCF introduction for the complete n00b

Ok…So I am more of a general .NET and Silverlight developer, but it is hard to get around the fact that WCF infiltrates most of the projects I ever work on. And after having read a substantial part of Juval Löwy’s book about WCF, I have realized that there was a lot that I didn’t know and didn’t fully understand. Not that I am saying that I get it all now, but I have a better understanding at least.
The thing is that WCF isn’t really very hard in most cases, but having a basic understanding makes it a lot easier. And to be honest, the basics will take you a long way when working with Silverlight, since Silverlight doesn’t support a lot of the more advanced features. To be honest, the WCF support  in Silverlight is fairly basic, but it is enough…
So based on this, I thought I would try and write a down to earth and simple introduction to the main concepts in WCF.

Xml namespaces for custom control libraries

Ok, it has been a while since I posted now, but there has been a too much going on, and I guess I should be blogging about Silverlight 5, as it is on the agenda for MIX. I have even had the possibility to early access to the Silverlight 5 bits, but I have had too much to do to come up with some good posts about it. That is not to say that there isn’t a huge amount of really good stuff in the next release! But besides not having had time to play with it, I am not allowed to blog about it until it is actually available…

But, in the mean time, I thought I would do a quick post about a little feature that I am not seeing a lot of people using. It is nothing ground breaking, or even very necessary, but still helpful. I am talking about the ability to declare custom Xml namspaces to your assemblies…

More...

Removing Design Time references at compile time

As you might have noticed on my blog, I like working with Silverlight, and I like using the MVVM pattern when I do so. As a part of this, I generally create design time ViewModels to get the best help from the tools (VS and Blend). VMs

The annoying thing about this, is that project containing the design time information need to be referenced by the application for the whole thing to work. But when the app is built and released, I really don’t want the extra ViewModels to be included in the xap file. I guess, in most cases, they are fairly simple and small, making the xap bloat minimal. But it still feels wrong. And it feels even worse when your design time VMs become large due to embedded resources such as images and data…

More...

MVVM and animation, revisited

A while back, quite a while back to be honest, I wrote a blog post about using animations in the MVVM pattern. And even if the way of doing it mentioned in the post still works, I would not recommend using it.

Adding the animation support in the way that that blog post says, will couple your VM to the StoryboardManager. Not that this really matters, as it will still be quite testable and so on. But it feels wrong…and I don’t like things that feel wrong…

In this post, I aim to cover a couple of ways that we can trigger animations and state changes based on the VM. And yes, these techniques have been hashed and rehashed on several other blogs, and you might already have read about it, but I still have people come to my blog to read the old post. So apparently it is still an issue for some…

More...

Using querystring parameters with the WebBrowserTask on WP7

I have just built a Windows Phone 7 app that is hopefully about to pop up on the marketplace within a couple of days. It is a fairly simple app, with very few impressive features. The most complicated part was to get the SQLite db used by the iPhone version of the app, to work on Windows Phone 7. Unfortunately I did not get SQLite to work on WP7. I ended up transferring the data to XML and adding some index tables, also in XML. But that isn’t the topic for this post.

The reason that I am writing this, is that I got stuck on a little thing while doing. Nothing complicated, but worth noting…

More...

Finding and mitigating memory leaks in managed code using ANTS

A week or so ago, I got a call from a client who had some issues with an application that I had built. The application is a WPF 4 “media player” that is supposed to runs 24/7. The issue they were facing was that it only ran for about 12 hours before crashing. And at startup it used less than 100Mb of memory, and at the end (before crashing) it used about 1500Mb. So it clearly had a memory leak. And I needed to find it…fast!

And since this is the first time I have had to do this, I decided to share my experiences. Hopefully it will help someone…

More...

Data binding images with MVVM

The title for this post make it sound like the world’s simplest thing. And to be honest, it sort of is. It is not hard to get images from the ViewModels into the view, but there are several ways of doing it. Each with its own pros and cons.

In my world, my VMs often get urls/uris to images instead of the actual image. The reason for this I guess is sort of the same thing as why you shouldn’t store your images in the database. The models can become huge if they include the images, especially if we add a couple different image sizes and so on. And that is without considering the possibility of us transferring a whole array of these objects across the wire. And in a lot of cases we don’t even show all the images in the UI, so why would we pass the images along if we don’t need them…

More...