Okay, I can’t take it any more. I like Silverlight, but this whole notion that Silverlight is SEO friendly because XAML, the presentation layer, is exposed as plain text is bogus. Let’s take the Silverlight airlines demo as an example. It’s written in the 1.1 alpha, which is what most developers are targeting. To add the Silverlight control to a page you call a JavaScript function linked by an external .js file, in this case, CreateSilverlight.js.
Here’s what that function looks like (excuse the formatting):
[js] function createSilverlight() {
Silverlight.createObjectEx( {
source:’Default.xaml’,
parentElement:document.getElementById(‘AgControl1Host’),
id:’AgControl1′,
properties:{width:’100%’,height:’100%’,version:’1.1′,isWindowless: ‘True’,background:’transparent’},
events:{ onLoad:onLoad, onError:null },
initParams:null, context:null}
);
} [/js]
So the page that contains the XAML is referenced in a source variable passed into the createObjectEx function. First question. Do search engines even know what to do with this? Can they tell that Default.xaml is where it’s supposed to go to grab the presentation? I can’t see how they would. But lets assume they do, so they go spider that file and index the content. Here’s what they’ve got:
[xml]
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:app="clr-namespace:Mix07;assembly=ClientBin/SilverlightAirlines.dll"
x:Name="rootCanvas" Loaded="PageLoaded"
x:Class="Mix07.DefaultCanvas;assembly=ClientBin/SilverlightAirlines.dll"
Opacity="0.85" Width="1093" Height="488">
[/xml]
Wow! That is incredibly helpful, isn’t it? Well congratulations, all of the content in your Silverlight application has now been indexed by Google. I’m not really sure how much good that will do you because most of the logic and data seems to be hidden in DLLs, but hey, your XAML is indexed, right? Look at how little XAML is even exposed in an app like this. Does anyone see how having this indexed is beneficial?
I’m not trying to pick on Silverlight, just the people that spout the virtues of the SEO bit. RIAs are a difficult thing to expose to search engines. Do you want them to index the state of the application? No, you want them to index the content and ideally, for something like a storefront, be able to deep link into that specific item, in “focus”, in your RIA. Silverlight doesn’t make that any easier, so people should stop comparing Silverlight and Flash on the grounds of searchability. It doesn’t fit in this instance and the whole SEO/RIA problem is something we still need to think about on both sides of the fence.
Update: I’m sorry the formatting on this is terrible. If you have a good way to display code in WordPress, let me know.
[tags]Silverlight, Flash, SEO, Rich Internet Applications[/tags]
Related posts:
Pingback: RIA pedia - Rich Internet Applications - Its all about the user experience!
Pingback: JD on EP
Pingback: SEO in Silverlight | RIABG.org
Pingback: How to make your hot new RIA friendly to search engines » Zeus Labs
Pingback: SiloMatic
Pingback: Just Flashing - Today’s Top Blog Posts on Flash - Powered by SocialRank
Pingback: Silverlight - Oh no, not this again | PHP vs .Net