Now I'm not sure if this is useful, or even clever but it seemed like a good idea at the time...
There's a lot of words about the different RIA platforms at the moment and everyone has their own idea of what's going to do what and how it's going to do it - which is funny given they're all in alpha/beta right now and got a lot of evolution to go. Personally I like the goals and capabilities in Silverlight (but then again even though I'm a pragmatic evangelist - I'm biased!)
It reminded me of Silverlight. Now, although SIlverlight is browser based the philosophy appears to be complementary rather than competitive (I'm sure there must be a word that combines the essence of both. Update: This is. It's Coopetition!) so I started to wonder how well the two would play together....
So I dived in feet first and dumped a sample project into a framework XULRunner project.
Big fat zero :(
The background appeared, but no Silverlight goodness. So time for debugging.
First problem was the Silverlight browser check... it looks for "Firefox" in the UserAgent, and XULRunner returns a pretty sparse UA. Now I know I've seen somewhere that there's an option to override the US that XULRunner produces, but it was quicker to tweak the Silverlight.js to look for Gecko ;)
That little hiccup out of the way, it still didn't want to load the external XAML, so the easiest approach was to drop it inline in the main source file.
Success! The clock sample happily running in XULRunner :)
Have a look at the sample SilverlightXUL project here (it assumes you have XULRunner already installed in the directory above where you unzip this sample - have a look at the .bat file to make sure the path is right)
Okay, so it's cool... but does it help? It actually opens up a bunch of questions around what's actually possible
- Can we embed a Silverlight control in the midst of XUL UI elements?
- Can we fire events from the XUL layer into the Silverlight element and vice versa?
- How do I fix the UserAgent string so the Silverlight detection works right?
- How can I get the Silverlight control working with external and dynamic XAML
- How can we make these two things place nice together to do some really cool stuff!
So now I just need to find someone who knows XULrunner, and spend some more time experimenting with Silverlight in the framework ;)