# Saturday, 21 April 2007

When I first saw WPF/e in action, a thought ran through my head "Cool, this is MS's Flash like rich UI strategy where I'd be designing in XAML and coding the logic in any .NET language"

Now that WPF/e has been revealed as Silverlight, I've finally managed to sit down and take a closer look at it. And after my run throught the quick start and the various examples on the net, I realized something... Silverlight is NOT a Flash killer. Silverlight is not meant to be what Macromedia Adobe Flash is, Flash is an entire mini application platform (and a pretty nifty one at that) But Silverlight isn't that, Silverlight is more of a PRESENTATION technology than an entire platform. It doesn't even come with it's own script interpreter, all the logic is coded in Javascript (DAMN! I really really thought I could get away with .Net on this one) and the Silverlight plugin basically just handles the displaying of data.

This is exciting to me as a developer because now I have access to a rich presentation framework that I didn't have access to before (cause I didnt have time to polish up my Flash/ActionScript skills)

Confused as to why this is the case? Picture this scenario (ok.. I'd love to actually MAKE out the demo, but I've just started out here, so give me a break) Let's say I wanted to make one of those snazzy bar graph animations, say a list of mobile phones sold grouped by phone manufacturer. I want the bars to start extending from 0 to their values, and each bar to fade in following the complete extension of the previous one.

This animation is ridiculously simple to achieve in Flash, but the question is.. what if the data is not static? What if the data is supposed to come from a dynamic server generated source? Ah.. yes.. we can just use Flash's capability of performing HTTP GETs to a server page and grab a CSV file containing the values! But then what if the data is complex? We could probably just use XML to represent then data, and then walk through it with Flash's DOM explorer. But then.. here comes a huge problem, your Flash designer with his l33t actionscript skills doesn't understand the concept of how XML files work, he can't grasp the concept of an XML Element, Attribute, etc. etc. As a developer we'd waste time trying to hammer out a way to paste data to the Flash designer, while the Flash designer tries to work out how to read our data.

How does this change with Silverlight? First the designer will create the template of the animation  (he'll be DESIGNING which is what he's good at.) And then the developer will take the XAML which he generated and then using the template the developer creates an ASP.Net file capable of generating the full XAML of the graph and displaying it on a page (the developer will be CODING which is what he's good at.)

It's not that this kind of server side generation of rich animation like content wasn't available previously, Adobe has a product called FLEX which essentially (if I remember correctly) allows you to generate Flash files with server side backend code. Silverlight essentially opens the door of rich content generation to the other developers out there, without having to buy another server, or application platform.

Why did I mention OTHER developers instead of Microsoft technology based developers? As I mentioned, Silverlight is a PRESENTATION plugin, it reads and displays XAML, and all logic for client side interactivity is in Javascript (the language of choice for web client side interactivity coding... damn I miss VBScript.. curse those ;s!) So you don't have to be using ASP.Net to take advantage of Silverlight, you can use anything you like.. PHP, Java, PYTHON anything as long as you can deliver the XAML to the plugin.

There are still some hurdles that need to be jumped through first though, the main one being...

There Aren't Any XAML Editors Out There That Supports Silverlight Yet!

There isn't any *official* way to create the loose XAML files that Silverlight uses yet, you can probably rely on tools that create XAMLs for use with WPF, but there might be issues since there are certain extensions in WPF XAML files which aren't used in Silverlight. The current version of Microsoft Expression Blend which is THE application to create XAML with doesn't yet support Silverlight files, but with some slight tweaks I was able to use it to make XAML files suitable for Silverlight so I do believe that it's quite possible that Expression Blend will be released with support for Silverlight files.

Can't display HTML styled formating in it's textblocks

One really sad thing is that the text block doesn't support text that is HTML formatted, I don't mean anything like ACTUAL HTML formatting, I just want the <b>,<i> and <a> tags to work that would be super useful. Flash has this feature though, which is cool.

No Intellisense For Client-Side Scripting in VS2k5

Yes.. it's not essentlal.. but hey it'd be a VERY welcomed addition!

An end user probably wouldn't see what the big fuss about Silverlight is about other than MS trying to knock Flash off, but to developers who understand what can be done with Silverlight the possibilities are astounding. I personally can't wait to put Silverlight and Atlas together and take them out for a spin!

Note that you can Post As GUEST as well.
blog comments powered by Disqus