views:

437

answers:

7

I am interested in creating a website entirely in silverlight (personal reasons) but I don't want people who don't yet have silverlight (a good many) to have to install a plugin just to view my site. The solution I am leaning towards is to start with a flat html/css version of the site and present the silverlight version only to people who already have it installed.

My question is this:

Is my reasoning misguided. Is there a better way to go about this. And what is the best way to avoid having to duplicate content across both versions of the site.

A: 

well you could use Flash, then 99.9% of your visitors will have the plugin.

SpliFF
Looking through Silverlight's features I see nothing of value except alternate language support that Flash can't do, yet flash *literally* has a 99%+ install base. If you're going to learn another technology (html/css) and you want dynamic features then why not ActionScript? The -5 downvote is uncalled for.
SpliFF
And I quote: "My question is this: Is my reasoning misguided. Is there a better way to go about this. And what is the best way to avoid having to duplicate content across both versions of the site. " Obviously using a more compatible technology is one of those ways.
SpliFF
A: 

It depends on what you mean by "content".

If by "content" you mean the code driving the website, then you're going to need to write everything twice and I don't see any way around that.

If by "content" you mean the what the code is presenting, then can do some things to reduce duplication. If you store your content in a known format like XML, you can use XSLT on the HTML/CSS side to transform the XML into HTML for rendering. Then on the Silverlight side you can also parse the XML and display it in whatever format you want. With this technique, you're just rewriting the framework to display the content.

17 of 26
A: 

Doing a quick search I found this page which may be useful: http://www.adefwebserver.com/DotNetNukeHELP/Misc/Silverlight/DetectSilverlight/Default.html Perhaps using that method to detect Silverlight you can redirect the users with Silverlight to your real Silverlight page and/or redirect other users to a regular html page.

kbosak
A: 

Check out unobtrusify.com, it's for unobtrusive javascript, but the same reasoning holds.

Also, check out Scott Guthrie's blog on not having Silverlight installed: weblogs.asp.net/scottgu/archive/2007/10/30/optimizing-the-silverlight-install-experience.aspx

If you don't want to duplicate, I'd say have the HTML in given div tags and pull those into your Silverlight application, effectively using it as a different presentation layer. You can use a Javascript library to show/hide that HTMl based on if a user as Silverlight installed.

Robbie
+1  A: 

Hi, Christian

I personally like graceful degradation for a web site. I want Silverlight on my site, but I see people on Twitter who come to a Silverlight site and say - no way will I install that plug-in. So those people must be accommodated too.

I wrote about Silverlight Islands, how to implement using JQuery. This method provides search engine material, it provides a way for non-Silverlight lovers to use the site, and it provides a way for you to enjoy your web site as you wish.

But it's a lot more work. http://www.faxt.com/blog/post/2008/09/Show-Multiple-Silverlight-Controls-in-the-Same-Page-with-jQuery.aspx

BPerreault
A: 

I would recommend reading about SilverSpine, a technique developed by McCann to manage this type of Silverlight/XHTML integration.

Michael

Michael S. Scherotter
A: 

First, providing a downlevel experience for users without Silverlight plugin is a very good practice. It will also provide better SEO for your site. If you can afford to use Silverlight 3 and ASP.NET then .NET RIA services is a very attractive option for reusing code across Silverlight and ASP .NET. Ria services, and tutorials are available here:

http://code.msdn.microsoft.com/RiaServices

Yasser Makram