Silverlight Hack

About Me

Welcome to Silverlighthack.com. This is a site where you can find many articles on Silverlight, Windows Phone 7 and .NET related technologies.

My name is Bart Czernicki. I have been working with computers since 1988 and have over 12 professional years in the IT field focusing on architecture, technology strategy and product management. I currently work as a Sr. Software Architect at a large software development company.

Below is the cover of my new book that shows how Silverlight's unique RIA features can be applied to create next-generation business intelligence (BI 2.0) applications.

Contact: bartczernicki@gmail.com

NONE of the comments or opinions expressed here should be considered ofmy past or current employer(s). The code provided is as-is without anyguarantees or warranties.

PDC 2008 - Silverlight 2 Wrap-Up

PDC (Professional Developers Conference) 2008 is over and there was a lot of information released over the course of the 4 days. You probably have heard some of it if not all of it. I wanted to write a post to summarize the information pertaining to Silverlight either directly or not directly that was released last week. Over the course of the week, Silverlight developers were bombarded with information that was coming out and this post's goal is to help developers get a handle on all of the information. Here is the summary of what has been released during the week of the PDC 2008:

Silverlight Tools for Visual Studio 2008 SP1

Silverlight Control Toolkit

Expression Encoder SP1

PDC Silverlight Videos (directly related)

PDC Silverlight Videos (indirectly related)

Silverlight 2 for Mobile Devices

WCF REST Starter Kit

Silverlight and SEO

Silverlight Tools for Visual Studio 2008 SP1

Silverlight Tools for Visual Studio 2008 SP1 were released over 3 weeks ago. However, for those people who are detailed oriented, this release was labeled as RC1. I posted a question on this on the forum the day this was released. Apparently, this was NOT the final release of the tools. On 10/30/2008 Microsoft released a new build of the Silverlight Tools. I don't think anything has changed, but regardless, you will want to update your tools to this new build. The new build of the tools can be downloaded here: http://www.microsoft.com/downloads/details.aspx?FamilyId=c22d6a7b-546f-4407-8ef6-d60c8ee221ed&displaylang=en

Silverlight Control ToolKit

The Silverlight Contol Toolkit was announced at the PDC 2008. It has a bunch of great controls, themes and charting cababilities. The big news is that the toolkit is open sourced and it you can extend it or build your own controls. Not only is it a great way to enhance your current Silverlight applications, but it is also a great way to learn about Silverlight control development and architecture. Shawn Burke's team has also included a bunch of unit tests using the Silverlight Framework so you can learn how to implement some TDD with Silverlight. You can download the toolkit here: http://www.codeplex.com/Silverlight

Expression Encoder SP1

Expression Encoder SP1 has been released. I like the approach Microsoft took by adding service packs to both Blend and Encoder rather than forcing people to upgrade. Therefore, people who have invested in version 2 are getting their money's worth. SP1 of Encoder allows you to create custom Silverlight 2 video player skins. It also includes H.264/AAC support. The service pack is available here: http://www.microsoft.com/expression/try-it/default.aspx?filter=servicepacks (Note: Expression Encoder also has an Express version which will work after the trial expires allowing you to do some basic things.)

PDC 2008 Silverlight Related Videos Online

If you weren't at the PDC, Microsot published the videos from the 4 days to the web. You can watch the PDC 2008 Videos online here: https://sessions.microsoftpdc.com/timeline.aspx. Here are the videos that are either directly or indicrectly related to Silveright development and I have some notes on the ones I watched.

If you are an architect, development manager, etc., I highly recommend watching some of these videos and then getting your team together for a lunch or a meeting and watching this together. I find this spurs developers thinking together about the current and future technology earlier.

Lots of great Blend information. They have some good tips on Fonts towards the end. There is lots of great information about Blend 3. If you are a Silverlight/WPF developer, I would recommend checking this one out.

Seema has a lot of great tips on making your Silverlight applications run faster. If you're going to watch one video from all of the PDC, this one should be it. Lots of great debugging tips and tools are shown as well.

Silverlight cannot consume data directly from objects or databases located on servers (even if it is the same server Silverlight is hosted on). Silverlight is all about consuming data from services. These videos are an absolute MUST to watch if you are a Silverlight developer and consume data from services.

Great introduction on developing WCF services that are based on REST. Towards the end of the video there is a great example of consuming these services via a Silverlight client. Unless you are a REST expert, you will gain a lot of information from this video.

Excellent video that deals with ADO.NET Data Services development and the Entity Framework. This video shows some of the cool interceptors for security and enhancing services that exist in ADO.NET Data Services. If you are building a simple Silverlight client that needs, call batching, smart data and/or security concurrency management, ADO.NET Data Services provide a lot of great features here.

Silverlight 2 For Mobile Devices

Microsoft is porting Silverlight to mobile devices. This is a really welcome feature. Many users who have an iPhone know that Apple is currently "blocking" the availability of Flash to mobile devices. This is where Silverlight has a potential advantage and put a dent in the Flash market share by targeting mobile devices. Most of this information is coming from this video here from the PDC: http://channel9.msdn.com/pdc2008/PC10/

Here are some of the highlights from the PDC:

By 2010 statistics show that there will be about 4 billion mobile phones in the planet. There is a huge opportunity here! So how do you write applications that are rich to thousands of users? Silverlight :)

Silverlight 2 (That's right; the same Silverlight 2 on desktops) has been announced for the mobile space.

Plublic CTP will be available in 2009 (Q1). My guess is that they will release this at the same time as MIX 2009.

The really cool part is that the SL 2 on mobile requires NO CODE changes to work on a mobile device where Silverlight is installed!! That is really nice and very powerful and one code works on both the desktop and mobile devices.

The Baby Smash demo really drives this point home further. So not only can you share code between WPF and Silverlight 2, you can share code between WPF, Silverlight 2 and Silverlight 2 Mobile! That is impressive; three platforms with one codebase.

WCF REST Starter Kit

One of the ways that Silverlight can consume data is through RESTful services. WCF was part of the .NET 3.0 framework back in 2006. In 2006 REST services were just starting to get traction as many Web 2.0 companies used this design as a preferred method for their service APIs. WCF .NET 3.5 has added some features for REST services. However, there was still a lot of plumbing code in order to write proper RESTful services in .NET 3.5. The MySpace API is a great example of what can be done with WCF and REST on a very large implementation.

In order to make writing some of the WCF REST services easier, Microsoft released the WCF REST Starter Kit during the PDC.

The WCF Starter Kit makes building RESTful services a lot easier. It also shows the impressive architecture of WCF. It can be enhanced with using attributes and interceptors to build a REST architecture for services.

Silverlight and SEO

Several months ago Google announced that it can now crawl Flash-based applications. This is pretty important because now Flash-based content is searchable and this is critical to any revenue model that is based on high-page ranks on Google (sales, ads, etc). Silverlight currently cannot be crawled by Google (maybe in the future). However, there are couple things you can do right now to make sure your Silverlight application gets crawled by Google:

Ensure that the page hosting your Silverlight content has proper meta tags and place the SEO there.

You can also place a page for a "deprecated" client. Therefore, if you receive a hit from a user that doesn't have Silverlight, you can bring them to an HTML page rather than the full Silverlight client. This way when the Google robot tries to crawl your site, it will crawl it based on the HTML page.

This information is really important for developers that are jumping into RIA. Most architects are ready to jump right into the technologies and try to solve problems with RIA. However, things like SEO sometimes might fall through the cracks and might not be acceptable to a client. Check out this post for more information on Silverlight SEO Optimization: http://nerddawg.blogspot.com/2008/10/search-engine-optimization-for.html