| Comments

First a congratulations to the Moonlight team for reaching their official release of 1.0!  Miguel and team have done a great job providing parity with Silverlight 1.0 and should be proud of their accomplishments.  Miguel, when is Moonlight 2 coming out :-) -- no rest!!

But seriously, this is a good accomplishment for the ecosystem.  Last month I wrote and recorded my experience of the Moonlight installer/rendering on an OpenSUSE environment.  What this demonstrated was that we’d integrated the Moonlight redirection/installer into the server-side installer detection from Microsoft.  Users on Linux visiting a Silverlight 1.0 application and not having the plugin would be directed to the Moonlight installer, using the same install link that other Silverlight applications currently leverage.  I think this shows great partnership to both teams to acknowledge and integrate that process.

Today, I updated the user agent detection script for Silverlight to also accommodate this release.  For those who don’t know, there are two helper scripts for Silverlight developers you can leverage:

  • Silverlight.js – this script helps to detect if the plugin is installed and if so, create’s the appropriate <object> tag representation.
  • Silverlight.supportedUserAgent.js – this script is also a helper script that can be used with Silverlight.js or alone.  The purpose of this script is to do some pre-checking to see if the browser/platform combination (based on the reporting User Agent string of the browser) will support Silverlight.

It is the second script that I’m referring to.  The updated release on the release site for the script (2.0.40211.0) now includes checking for Linux and reporting correctly.  Using this script is as simple as:

   1: var canSilverlightRun = Silverlight.supportedUserAgent("2.0");

This code above is basically asking: I’ve got this combination, is this version of Silverlight going to be supported?  This helper can be used by developers to pre-check if Silverlight can run on the platform of the user. 

If you are using the UA detection script, you’ll want to update it to the latest version if you have a Silverlight 1.0 solution and want to expand to Linux users.  That is the only change in this update.  No changes to Silverlight.js have occurred as a result of this, as remember, that only checks if the desired version is installed on the user machine.

If you want to play around with some settings, you can visit a quick-and-dirty page I created that uses both scripts and reports the results (Version Supported reports Silverlight.isInstalled, and UA Supported reports Silverlight.supportedUserAgent).  Hope this may help.

Hey what about this Google Chrome hack you mentioned?

Officially Google Chrome is not a supported browser, but most (your mileage may vary) Silverlight applications run.  Since the detection scripts are Ms-PL licensed, you’re welcome to change them to fit your needs.  The official copy on the release site will map to the supported matrix for Silverlight for now.  If you want to add support for Google Chrome, here’s what you’d do.

On line 93 in Silverlight.supportedUserAgent.js, insert this line:

   1: else if (ua.indexOf('Chrome') >= 0) {
   2:     slua.Browser = 'Chrome';
   3: }

Before the Safari check is important because Chrome’s user agent reports Safari in it as well as Chrome.  Then you will have Chrome detection working in your script.  Again, only if you need/want it.  We continue to evaluate the browser support matrix for Silverlight and before you ask – no decisions have been made just yet to change the current supported matrix.

Hope this helps!  Congratulations Moonlight team!

| Comments

If you haven’t been aware, there has been a team at Novell working hard to make a version of Silverlight for Linux.  This version, called Moonlight, has been in development since WPF/e it was first shown at the MIX conference (which by the way is happening in March with some really exciting stuff, so be sure to register for MIX09!).  Moonlight hit beta this past December 2008 and the team has already been working on Moonlight 2 which is the Silverlight 2 compatible version.

Right now, Moonlight 1.0 serves as a functional equivalent to the Silverlight 1.0 runtime, which was released a while back.  Moonlight 1.0 will not enable to you to view Silverlight 2 content right now.  If you want to track Moonlight 2 status, you can do so on the Moonlight project page (various links to Moonlight 2 hacking and discussion lists).

One of the things recently accomplished with this partnership was to enable the click-through install experience.  What do I mean by this?  Well most of the Silverlight templates use a single link for the installer.  In the background this maps to a function to detect browser, platform, etc. and deliver the right bits to the user.  In the event of an unsupported combination, this redirected to a page displaying the system requirements for the requested version of Silverlight.  With Moonlight 1.0 out in beta now, that function now detects the platform correctly and redirects the user to the Moonlight 1.0 install instructions.  In a recent survey I did, many of the respondents had requested this.  They didn’t expect that Microsoft would provide the installer, but rather that at a minimum it should redirect to the installer for Moonlight…which it now does. 

NOTE: Moonlight 1.0 is in BETA format.  Please understand that Moonlight is a project from Novell and any progress updates will be provided from them.  Since the product is in beta right now, read their documentation and caveats about any live deployment dependent upon Moonlight support.

Take a look at my experience below – I used an image of OpenSUSE which was built for me by the most awesome SUSE Studio.  I simply have a plain OpenSUSE image (with Mozilla) and connected to my network.  If the latency in the internet in the video seems slow, it is because it is a virtual machine on a laptop using a wireless connection – not exactly ideal conditions :-).  But as you can see even the non-optimized install experience (using the default install badge from Silverlight 1.0) does the redirection accordingly and I was able to get Silverlight content running on my Linux instance.

(you may want to choose the fullscreen option for better scale)
Install Microsoft Silverlight

I would imagine as Moonlight progresses (as well as progresses to v2) that this will even get better.  Our functions map to web handlers that the Novell team control so they have the ability to redirect their installers accordingly.  You can see that there are some nag screens that come up from Firefox (for security on installing web software as well as installing the XPI – these are both Firefox standard dialogs and not associated with Moonlight/Silverlight).

We plan on releasing some guidance samples on creating the best install experience using the Silverlight.js script.  Once we do, I’ll update a post/example to show the fullest experience on all platforms.  For now, I wanted to simply share this.  If the application requests the Silverlight 2 installer, then the handler on our end will still inform the user that Linux isn’t yet a supported platform.

It’s great that the Microsoft and Novell teams were able to partner to ensure some great continuity in experience.  It’s also great that some people have noticed…I found these comments from Joel Kelley on Twitter:

"MS Silverlight installation for FF on Linux is ridiculously painless. I' m impressed.” – Joel Kelly on Twitter

“I didn't finish it, but the installation for MS Silverlight seemed easier on Linux than Flash is. Well played, Mic rosoft. Well played.” on Twitter

I’m sure there are people that won’t like the process as well, but it is nice to see some positive comments for the Novell team.

| Comments

if you are a language nut, you'll like this.  the Lang.NET symposium just posted all the talks from the recent gathering.  they are available online and you can view them here (presented in silverlight).  it's quite a line up of people...here's a sampling:

    • anders hejlsberg
    • paul vick
    • wez furlong
    • tomas petricek
    • peli de halleux
    • john lam
    • wayne kelly
    • miguel de icaza
    • don box

and more...lots of content that may be interesting to you...go check them out!