| Comments

Suppose you use Firefox as your default web browser and you are a Silverlight developer using Visual Studio.  You may have been frustrated at times in being able to get the debugger to attach to your breakpoints.  You’ve triple-checked that you are in debug mode, that the Silverlight checkbox is marked in the hosting web application’s property pages and it still is not breaking for you.  You stare at the dreaded empty red circle in Visual Studio reading the tooltip of “No debug symbols have been loaded…” a thousand times.

But it works in Internet Explorer.

I’ve faced this a few times and always forget the tip.  I’m recording it for my own posterity, but hopefully it will help others as well.

Here’s how to ensure the VS debugger attaches to the Silverlight app for debugging:

  • In Firefox address bar type about:config
  • Read the warning, choose your preference to always remind you or not and accept
  • In the search bar of the config options now type: npctrl
  • You should then see the entry: dom.ipc.plugins.enabled.npctrl.dll
  • Change the value from true to false (simply double-clicking will change this for you)
  • Restart Firefox

And your debugging should come back to normal. It has frustrated me more than once. Hopefully it helps some others.

| 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

Well today (17 JUN 2008) will be the release of Firefox 3, a seemingly much anticipated browser update.  I checked out an earlier build (I think beta 2) and it was a nice browser.  I’m not a browser zealot, I use what works for me and IE works for me, has some tools that I like, etc.  Firefox is a fine browser as well and I do use some plugins from time to time in my Firefox install.

Today, I assume a lot of people will be downloading FF3 whether by explicit choice or by a prompt from their FF2 browser installs.  In fact, it appears that FF is going for a world record of software downloads.  Um, cool?  At any rate, the downloads will start soon (FF3 is already on public FTP servers now).

UPDATE (02 JUL 2008): See updated information here on specific silverlight.js update instructions.

So what does this mean for Silverlight?  Well, there has been an issue with Silverlight and FF3 getting along since the first public builds of FF3 started trickling out.  There has been a couple of issues, but two main nagging ones.  I’m not going to go into detail here, but there is certainly an interesting read in the bugzilla comments and a commentary here from Jon.  My personal opinion is that there was some disagreement in the Mozilla core team about if indeed it was a bug or not…the comments are an interesting read and I think the MSFT team made valid arguments (the other issue is here).  The nutshell version is that there was an apparent change in how NPAPI model was implemented in FF3.  Despite the back and forth in the bug report, Microsoft has made some servicing updates as well as SDK updates that make FF3 and Silverlight play nice together.  There still seems to be some broader concern over the FF3 implementation (as there were a number of plugins that stopped working as well), but at least a level of work around has been established for Silverlight.

The main concern really has to do with some install experience and initiation of the Silverlight plugin.  The latest SDK includes an updated Silverlight.js file with the necessary fixes in script detection that works with FF3.  You can get the SDK as a part of the Silverlight 2 SDK downloads.  This doesn’t mean that you have to immediately upgrade Silverlight 1.0 applications to v2, but just that the update is in the Silverlight 2 SDK.

Another item that was fixed (added) was removing the step to restart the browser in these instances as well – these are the same techniques as demonstrated in one of my latest videos on optimizing the install experience.

So if you are a Silverlight site author and anticipating a lot of FF3 usage on your site, you should indeed get the latest SDK for Silverlight and update the detection script and do some testing.

| Comments

If you are doing Silverlight development, you are no doubt slapping in the <object> tag or using the <asp:silverlight> control (if in ASP.NET) to host your Silverlight content/application.  This is all great, but don't forget about deployment!

When I talk about Silverlight I like to relay a story I heard from one of the Silverlight program managers (PM) a while back.  The PM was pretty excited about a feature just completed in Silverlight and one of the samples that had been created.  He went home to show his wife and told her to 'go to 'dub-dub-dub-dot-something-dot-com' (yelling from the other room of course) and to tell him what she thought.  After a long pause of a few minutes he shouted back 'what do you think?'  Her response: 'It's lame.'  He was no doubt offended until he walked up to her machine and on the screen saw this:

Silverlight Install Image

The Problem

You see, 'Get Silverlight' means nothing to your mother-in-law (or wife in this matter).  Technology means nothing to non-geek users.  Content is king.  And to your non-savvy users (and even your savvy ones), leaving this default experience isn't a wise one.  It doesn't convey that there is anything of value by installing something they might not have.  It doesn't even convey what the action is going to be when they 'Get Microsoft Silverlight.'  Leaving this experience unchecked leaves your users in the dark as well as a reputation rank downward in my opinion.

NOTE: This site is likely riddled with these badges as seen above.  I'm claiming exempt status because they are samples :-).

While in Silverlight 1.0 creating a great install experience was possible, Silverlight 2 makes that process so much easier.  In Silverlight 1.0, the use of the silverlight.js file could aid in detection and direction to an alternate experience.  This method is still possible in Silverlight 2, and in fact might be a best practice still.  Most interactive developers using Flash use some method of script creation in instantiating the Flash host.  This is mostly due to the IE EOLAS "click to activate" issue that has been resolved and will remedy in an upcoming IE update.

Some Solutions

So that brings a few methods for instantiating the Silverlight control host.  You can still use a script method to do the check for you and provide alternate content or redirect to something.  You can also still simply include the <object> tag itself.  My favorite is using the simple <object> tag and tricking the HTML.  You see an object tag might look like this:

<object type="application/x-silverlight-2-b1">
    <param name="source" value="ClientBin/CallingServices.xap"/>
    <param name="onerror" value="onSilverlightError" />
    <param name="background" value="white" />
    <div id="no-sl" class="install-badge">Some descriptive information</div>
</object>

Notice the random HTML after all the params?  Browsers will read the HTML like a book (US-English) from top to bottom.  They get to the object tag and can't understand it, so will look at the next part of the DOM.  Param tags...nope don't get it.  Next part.  Oh, a <div> element...yep I understand...begin render.

Within here you can put an image or some element with a CSS class that is absolutely positioned, etc.  Bottom line is you own that experience.  It is now on you, the developer, to ensure that your users aren't just seeing 'Get Silverlight' but are being provided at least some explanation of what they are about to see, why they should install this plugin, etc.

Some Examples

Perhaps you need some inspiration?  Here's some examples from some recent sites...


Silverlight.net Gallery


Zombomatic Game on Miniclip.com


WWE Insider Video


Hard Rock Memorabilia Site


65th Annual Golden Globes


Major League Baseball Video

As you can see, the options are endless from very simple, to heavily branded. 

Testing your deployment experience

So now that you've decided you are going to optimized that "no Silverlight" experience, how do you go about testing it?  Well, here's a simple trick that I employ to do this.  There is no need to uninstall/re-install the runtime on your machine.  In fact, this will likely give you headaches in doing so and waste endless minutes :-).  Here's a simpler way.

In Internet Explorer you have the ability to manage your add-on experience.  To test your "no Silverlight" experience, simply do the following.

To make it easier go to a page with Silverlight content.  You can do this without this step, but it will cost you 2 extra clicks and I'm trying to save you time.

Next, go to Tools...Manage Add-ons...Enable or Disable Add-ons:

Now, find Microsoft Silverlight in the Enabled section and change the radio button to 'Disable' and click OK. 

You will be prompted with a message which you can just click OK through.  The page will be refreshed and the Silverlight plug-in no longer enabled.  Now any site you visit will give you the "no Silverlight" experience for you to test your deployment experience.  When you want to re-enable, simply repeat the process and choose 'Enable' and you are back in business.  No messy control panel uninstall/re-install mess.

I'm not a Firefox power user and couldn't find an easy way to do this rapidly without installing another plugin, so if anyone knows the similar method in Firefox, please enlighten me (or Safari for that matter).  I tried searching and found solutions of moving the plugin out of the /plugins folder in Firefox so I'd imagine you could batch script this out.  I really like the ease that Internet Explorer provides in managing my own preferences for each add-in running.  Looks like this gets even better in IE8.  I'm actually surprised it isn't a part of Firefox.

Summary

The bottom line is: don't ignore this experience.  This is your chance to explain that the user is about to see premium content, a better user experience, a fun game, whatever it is you are trying to convey.  I hope this has helped at least some be enlightened on ensuring you make that a work item in your task list and the tip of disabling the add-in is helpful to some. 

| Comments

a while back i wrote a post about sharepoint and firefox...i saw a trackback to this in a forum indicating a lot of rant for microsoft not including this support.  in my original post i made reference to a partner that was enabling this for firefox users.  the link is in the post but i'll make it here again.

telerik and cross-browser editor for sharepoint 2007

done.  get it (free btw) and install it.  they have a doc to help you configure/install.

there, so no more complaining :-)