03 July 2009

Silverlight vs. CSS

I'm back to Silverlight blogging! I've been super busy these last months with school, getting married and swithing to Python at work and I haven't had time to look deeper into Silverlight 3 nor get my hands dirty digging in some code. But, summer is here, and here I come! Let's start with some philo: Silverlight vs. CSS.

But why not Silverlight vs. Flash?

First, because it's done greatly at Shine Draw (congratulations on becoming a Silverlight MVP!) . By the way, Smashing Magazine, which is the best webdesign resource ever (and anyone working on a user interface should read that kind of stuff ) has recently had a really in-depth technical article about that subject too (which kinda concludes that Flash is better as it supports more stuff, but I'd just say older, anyway, I'm just saying I'm not writing about Flash).

Second: Flash and Silverlight are two different tools. You usually know one or the other. You usually have to choose one or the other as your area of expertise and once your choice is made, you won't go back, no matter how I praise one and critiscize the other. Silverlight and CSS, however, are tools lying side by side in the same toolbox. Okay, lots of generalizing here, some people are pure C# programmers and don't need to worry about webdesign. I am the girl who uses SL more for websites than for applications and that's what happens: I need to embed SL elements in a webpage done in HTML (thus my interest for HTML Overlay) so a question arises:

Which elements do I do in Silverlight, and which in DHTML?

Here's an excellent example: the Fish Eye menu.

n.design studio did it in CSS/JS:

PageBrooks did it in Silverlight:

Shine Draw did it his style: both Silverlight and Flash, for comparaison:

Now say you need a Fish Eye menu on your site - which do you use?

First thing: ask yourself about your target. Some of my best friends use Linux and well, not everyone has Silverlight. But some people block all of their Flash and some turn JavaScript off - you can't please everyone. I think I'd go with JS here, but the topic is broad.

Second: is it ready? Is it free? For commercial purposes too? Because if it isn't and you have to do it yourself, I'd say one hour for Silverlight, a few days for debugging JavaScript in all possible browsers - absolutely incomparable times.

Still don't know? Don't worry, neither do I, the topic is way too broad. A lot depends on your goal: is it learning a technology? Pleasing a customer? Building an impressive portfolio? If the latter, one important word of advice: don't overdo it. I've seen a site with two moving Silverlight controls that were getting really annoying after a bit of time. Modern at first sight, but cheap at the second: "Mm, yeah, a rotating banner, how hard is that in Silverlight?" It's easy and it's great that it is, but let's use our tools wisely.