Rants
Silverlight.net has announced a new Community Recognition program!. They've instituted a new point system to recognize community contributions to the site.
I am humbled that I made their Hall of Fame:
http://silverlight.net/community/recognition/hall-of-fame/
Bill Reiss is at it again. He's converted his Dr. Popper game to the Silverlight 2 Beta 2 bits and has released the source code (you can find it here). The source code is different from the version of the game on his site as that version allows users to compete by storing high scores on his server. If you want to compete for the high score, view the one on his site at:
http://www.bluerosegames.com/brg/games.aspx
In the documentation and change documents in Silverlight 2 Beta 2, they mention that the format of the Deep Zoom files have changed from a binary to an XML file. In fact, then mention that the file is called .DZI for a single image, and .DZC for an image collection.
Unfortunatley the DeepZoom Composer people didn't get the story. When they create the images for you, they create DZI_OUTPUT.XML or DZC_OUTPUT.XML as the file that you should be pointing at. You can manually change these to .dzi or .dzc if you like (I would as I expect this is just a bug).
You can test this by creating a Silverlight Wrapper from DeepZoom Composer when you output your files and see that the URI they are specifying is the *_OUTPUT.XML file.
HTH
I want to thank Erik Mork for talking with me on his Sparkling Client PodCast. We talk about Silverlight 2 Beta 2, some caveats about upgrading and where I think Silverlight 2 is headed. Its a short, fun talk.
Don't forget to subscribe if you like the content as this PodCast is exclusively Silverlight talk....
I am headed to Europe this fall for two .NET conferences on the continent. I am excited to be speaking at these two great conferences:
First up is the SDN Conference 2008 in Amsterdam, The Netherlands on October 6-7th, 2008. I will be speaking on Silverlight 2 Control Customization, Visual State Manager and ADO.NET Data Services. I am excited to see my old adopted home again! Et Lekker!
Second up is
DevReach in Sofia, Bulgaria on October 13-15th, 2008. The schedule hasn't been finalized so I am not sure yet what I'll be speaking on but you can probably guess the usual Silverlight,
ADO.NET Data Services,
Entity Framework or DSL stuff I am interested in.
If you're in either of these locations this fall, look me up!
My recent post on upgrading your Silverlight 2 Beta 2 projects has fairly brief as I expected the blogosphere to be full of blog posts on it. Unfortunately, there hasn't been a lot of posts so I decided to expand the blog post to deal with most of the big issues. If you're upgrading, take a look at this more lengthy version of the post.
G. Andrew Duthie has done me a big favor by organizing a Geek Dinner while I am in the DC area next week. If you're in DC and want to gab about Silverlight, ADO.NET, Astoria, how cool your phone is or why the destruction of the Roman empire was the start of the modern era...come on by. Please visit Andrew's Blog to RSVP.
While I try not to do too much link spam in my blog, this link is worth it.
Ian Griffiths (of "Programming WPF" fame) has a great tutorial and explanation of the Visual State Manager. If you are trying to get your head around this and how it differs from the Beta 1 Storyboard TemplateParts, this is a great introduction. Unlike Scott Guthrie's great introduction, Ian (as usual) digs deep into the XAML and code to explain what and why, not just how. I thoroughly recommend it.
I can't vouch for his plug at the end as I am biased towards my own workshop ;)
There is only a week left before my Washington, DC stop on the Silverlight Tour. This event is special because its the first workshop based on the Silverlight 2 Beta 2 bits. If you are on the cutting edge and want to get the latest experience with Silverlight 2, don't forget to register! There are only a few seats left for this tour stop. See the site for details!
When I deployed the small test application (http://www.silverlightdata.com/simple), it was pretty apparent that it was performing really badly. Some of this is because my ISP upload speed isn't great but it was still taking far too long I thought. This was a simple app with not much data, so I knew I wanted to find out what was happening. If you haven't seen the site, its basically an editor for the Product table in the Northwind database. Nothing special really.
ADO.NET Data Services does a lot of work for you under the covers. This is good because we're not being asked to write a lot of serialization and transportation code, but it can be bad because it becomes more difficult to see why things are happening. Fiddler2 to the rescue!
If you're not familiar with Fiddler2, its basically a great tool for watching web traffic so you can see what is actually happening over the wire. For ADO.NET Data Services, we want to see the actual communication over the wire to see what was being sent to and from the Silverlight application. First, grab the Fiddler2 tool (http://fiddler2.com/) and come with me!
So I fire up Fiddler2 and run the example page. What do I see? Nothing. None of the traffic is showing up. A quick Google search reveals that Fiddler doesn't work on localhost or 127.0.0.1 (kinda the same thing). I found an odd workaround...add a period after the IP address. So my "http://localhost:8000/Default.aspx" test page became "http://127.0.0.1.:8000/Default.aspx". The period after the "1" is not a mistake. Once I did that, the requests were showing up in Fiddler2. Wahoo!
So what did I see? Here's a look at the Fiddler2 window (You can click it for a bigger view):

Looking at the request to Products.svc, I picked the "TextView" tab to see the actual body of the message. Looking at it I noticed this Picture property that was base-64 encoded. Uh oh...I didn't even notice that we are getting pictures...in fact we're getting duplicate data. My LINQ request was:
var qry = from p in TheContext.Products.Expand("Supplier")
.Expand("Category")
orderby p.ProductName
select p;
I knew that I would be getting duplicate data by using the Expand extension method. Expand says to embed the related entity (the Supplier and the Category) so that our object model doesn't have to lazy load them. Of course I wasn't paying attention. The Category has a picture stored in the database. I am not even using it (and couldn't since the image is a GIF and Silverlight can't display GIFs) so retrieving it is pretty useless. Here's a quick view of the underlying Entity model:

The fix for me was to simply remove it from the model, but I am looking at different ways of really solving it including delving into how the "select" statement might filter these out, though I expect that doing three queries (one for Products then just returning Suppliers and Categories to remove the duplicate data would be much more efficient yet.
One caveat, this is the first release of the ADO.NET Data Services' Silverlight Client Library so give it time to improve some of the performance issues. But like other data access libraries, sometimes small changes can make large improvements in performance.
Hope this helps you debug your own ADO.NET Data Services projects.