Tuesday, July 21, 2009

Migration from Silverlight 2 to Silverlight 3

In one word: Smooth. In two words: Very Smooth! Read on if you want to know my experience of migrating http://www.primetimetable.com from Silverlight 2 to Silverlight 3:

Step 1 - Introduction

I have rechecked information published by Silverlight team here.

Step 2 - Installation

Downloaded and installed new stuff:Step 3 - Visual Studio Conversion Wizard

Started the old Silverlight 2 solution and converted it using Visual Studio Conversion Wizard.

Step 4 - Rebuild solution(s) and fix errors
  • As expected, Silverlight Toolkit controls needed the new Silverlight Toolkit July 2009 references
  • AutoCompleteBox has been moved into System.Windows.Controls.Input namespace as stated in the migration document.
  • WCF services showed errors even after updating them. Re-adding was enough for errors to disappear.
  • HierarhicalDataTemplate namespace for TreeView custom item template is now in System.Windows.Controls namespace instead of System.Windows.Controls.Toolkit.
Step 5 - Final touches
  • Minimum runtime version for Silverlight 3 object tag needs to be: 3.0.40624.0
  • Silverlight Toolkit NumericUpDown control needed some fixes for background color (?).
Step 6 - Testing

After exhaustive testing I found it hard to believe that all code just worked: custom window, ribbon, other custom controls, mouse wheel, mouse right click and all other stuff just worked. I have also experienced some fixes to Silverlight 3 controls which bugged me previously.

Step 7 - Publishing

Nothing new here. That's it. It's live since Silverlight 3 release date :) here: http://www.primetimetable.com/demo/

Conclusion:

Migrating from Silverlight 2 to Silverlight 3 took me only 1 hour(!) and I did it while I was on my vacation ;). This was the best upgrading experience I have ever had. I remember the old days when I tried converting Flash/ActionScript code to newer Flash version, and the code needed complete rewrite from the scratch - that's where I decided to completely stop developing Flash. Also, I remember converting Asp.Net 1.1 projects into 2.0 and later into 3.0 and 3.5. That was smooth, because the code basically remained the same, but there were always some gotchas and it took some time. Definitely, a pleasant surprise from Silverlight team. Thank you guys for great work!

4 comments:

  1. Hi Danijel,

    Nice article! I've tried demo link you've mentioned. It works absolutely fine in Chrome and IE but it doesn't work in Firefox 3.5, says Silverlight is not there, I have SL 3.0.40624.0. Think there is an issue with detecting SL in your code.

    ReplyDelete
  2. Fixed. Thanks for the notice! I saw your errors in application log ;). Prime Timetable works and is tested in IE 6+, Firefox 3+, Chrome and latest Opera. I don't have Mac, but according to logs it looks like it is actually working there ;). Thank you once again.

    ReplyDelete
  3. you are welcome, BTW I like your app! Well done!

    ReplyDelete
  4. Paolo@video-monitoring.comNovember 4, 2009 at 4:09 PM

    Wow, i just upgraded my project and it all went smooth without ANY ERRORS AT ALL!! Even my wcf references worked right away, no updating them needed! Excellent job Silverlight Team!!

    ReplyDelete