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...

My thoughts about Expression Blend 3, aka Blend rant

I want to start off this blog post with saying that I love Expression Blend! I have only used Blend 2 SP 1 before today, but I love the idea, the interface and the program in general. But in Blend 2, there were a few things I missed. The most obvious flaw in Blend 2 is the missing intellisense. It also expected me to do ALL my coding in VS, which to be perfectly honest is a good thing. Coding should not be done in Blend. Blend is the tool for the interaction designer, or possibly the “devigner” and not for the developer.

But this is where I start getting a little ambivalent. I want to be a good developer and say that that is the way that I generally do my Silverlight problems. The developer doing the coding in VS and the designer doing the layout on Design and then the interaction designer/”devigner” putting it all together in Blend. Unfortunately that doesn’t add up in my world…sorry Microsoft…I love the idea, but in my world it doesn’t work, even though I wished it did.

More...