Visual Studio 2008 Silverlight Web Site Template
Rik pointed out to me that there is a new “Web Site” template for Silverilght (I don’t use Web Sites but almost always use “Web Applications” so I never noticed it). So I fired up Visual Studio 2008 to take a look and this template is kinda wierd to me. It seems like a step backwards from other templates (and there still isn’t a ‘good’ Silverlight 1.0 template in my mind). This template differs from others by doing two things:
- First, it creates the call to CreateObjectEx as inline script on the sample.html page. This is problematic as incorporating a Silverlight project into a larger project means you’ll need to refactor this code into a separate .js file. Of course, perhaps this is to coincide with the ASP.NET Extension’s Silverlight control (which I am not a big fan of either, but we’ll see what this latest version looks like).
- Secondly, it overrides the onerror call to fill a DIV with the error information. Cool idea instead of a standard alert() but this is a lot of code that will likely be replaced over and over again.
If they are going to release a new tempalte, i’d rather they actually change the XAML and Load code since the default button isn’t interesting and wiring things up by ordinal (as the template does) is not a best practice.
Thanks Rik for pointing me at it, but I am going to stick with my old template for now!