Obligatory Silverlight Post

Apr 18 2007 Published by under Flash, General

First let me say that it’s not my intent to bash Silverlight, or defend my beloved Flash platform. In fact, it looks like I may very well have to be doing some work with Silverlight at my job, so it’s something I’m going to need to learn and get used to. This is why I decided to give it a look over today. I have to say, it wasn’t quite what I expected

Secondly, let me say that I’ve only given it a quick look over, and I may be missing a lot.

The first thing I realized is that the way Silverlight apps are created is with XAML and JavaScript. XAML I knew, but the JS surprised me. I’m not sure what I thought the apps would be coded in, and I guess JavaScript makes sense, but again it just surprised me.

[EDIT] So, after reading the comments here, and some other stuff, it does seem that you’ll be able to code in some more powerful languages, such as C#, eventually. This is not ready for the current CTP release, only the JavaScript engine.[/EDIT]

You could make an analogy to Flash/Flex by saying that XAML is Silverlight’s MXML and JavaScript is its ActionScript. XAML is the XML based layout language that defines the assets, graphics, etc., and JavaScript supplies the application logic and behavior. But the way it is all deployed is quite different.

In Flash and Flex, the whole package is compiled into a neatly packaged SWF, which is embedded in the page. The end user can never see the MXML or the ActionScript, unless you decide to publish it along with the app.

In Silverlight, the XAML and JavaScript is right there in its raw form. You embed an instance of the Silverlight plugin, pass in the path to the XAML file that it will consume, and make the JavaScript available to the page. The Silverlight plugin then consumes the XAML and JS and renders the app. So there is no concept of ‘compiling’ a Silverlight app, anymore than you would compile an HTML/Ajax application. This obviously makes dynamic applications fairly simple. You can have PHP, ASP, Java, or whatever you use on the server to generate your XAML on the fly.

The one thing that really concerns me though is the use of JavaScript as a language for “the next generation of RIAs” (which, by the way, means Rich Interactive Applications now, according to Microsoft :)). If you are an ActionScript 3.0 or even 2.0 programmer who wants to dive into Silverlight programming, you are going to have to take a 5-year step backwards to prototype-based classes. Welcome back ActionScript 1.0, circa 2002! Here’s a quick sample:

[js]function root_Loaded(sender, args) {
new tileText(sender);
}

function tileEntry(value, offset) {
this.value = value;
this.offset = offset;
}

function tileText(rootCanvas) {

// Hook up the button event handlers
var button = rootCanvas.findName(“button”);

// omitted a bunch of code here…
}

tileText.prototype.handleMouseEnter = function(sender, eventArgs) {
var buttonBG = sender.findName(“buttonBG”);
buttonBG.fill = “#FFa0a0a0”;
}[/js]

Ugh. I was so happy to get away from that stuff when AS2 came out. I really can’t imagine coding the kind of huge dozens-or-hundreds-of-classes type of application that you see being done in Flash and Flex these days, using prototypes. I guess this is what Ajax developers do every day, and heck, we all did it back when, but I’m not really excited to go back to it.

Now, the one big thing I do see Silverlight has going for it is the video, particularly with the DRM. I know that a lot of our customers at Brightcove are going to be scrambling for that, which is why I say I’ll probably have my hands in it soon. Then again, I have no doubt that Adobe has an answer to this. I can only hope they bring it to market in time to be a viable competitor to Silverlight – so that I don’t have to get my hands TOO dirty. 🙂

On a less technical note, I gotta say, I HATE the name. I can’t ever get it right. I’m stumbling over Sparklelight, Sprinklelight, Silverfish, etc. before I spit it out. John Grden suggested “Steely Dan”, but we won’t go there…

And last but not least, did you see the Silverlight wallpapers??? Come on Microsoft!!! You get pissed off when people accuse you of copying Apple, and then you put out this?

Silverlight Wallpaper:
silverlight wallpaper

Default OSX Wallpaper:
panther wallpaper

24 responses so far. Comments will be closed after post is one year old.

  • John Grden says:

    I must say dozen’s of things to you on a weekly basis, and that’s the one that gets quoted. Beautiful. IT’S ON!

  • Brian Deitte says:

    I must have read Ted’s post on Silverlight too quickly, as I didn’t noticed before that it’s using the browser’s Javascript. That’s really… not good.

  • Sven says:

    Hi,

    as i understood, as an alternative to javascript you can also build your stuff with .net languages like c# or visual basic and precompile them. I saw this note , for example.

  • superabe says:

    Seems quite probable that Silverlight may support C# in a later version which should be more appealing to AS3 folks

  • kp says:

    John, I just quoted you on the most memorable thing you said. 🙂

    Sven. That may be. It’s not mentioned anywhere in the SDK or samples. They all use JS.

  • kp says:

    Superabe. Yeah. Well, that would be a LOT more appealing. 🙂

  • Michael says:

    Well – I think it’s got to point to the idea that Microsoft’s target developer isn’t an ActionScripter! Someone at the top would realise that it can’t compete just yet so they’re appealing to the masses that already know Javascript and looking to build a new army, instead of converting the existing one.

    Even Director has adopted Javascript over Lingo… which almost made the platform credible.

  • Keehun says:

    Microsoft is a SOB which intends to be biased until they crash and burn.
    Sorry for such exaggeration, but come on M$. I am still angry for them because they took down Kol’s cool vista theme

  • I had a long good look at the current developer examples on Silverlight. Generally I am not very impressed. The fact that Silverlight falls back on JS for scripting is one downer. The fact that it actually falls back for the browser’s JS runtime engine is far worse. I mean, if they’d had written a VM in about 100Kbyte that would run for Silverlight would already made it better. But now you have to rely on different execution speeds and implementations based on which browser it’s running in. That’s exactly the problem you have in ‘ajax’ development coming back at you; make sure it runs on all browsers at an acceptable speed.

    I’m generally not very impressed with the player. Compared to the Flash Player it’s bloated, and the feature set it offers is less. I mean, have you seen things like messaging in there ? Furthermore, it’s killer feature, DRM isn’t in the current update, it will come in Fall 2007. The WM support it has goes as far as 1 codec, VC1. This codec is to be considered an alternative to MP4/H.264, just as you might consider ON2/VP6 an alternative to it. Philo, Adobe’s mediaplayer, could be considered a first sign of DRM to the Flash Player platform. On the Adobe Labs page it doesn’t mention the exact word DRM though. Widevine’s support for FLV DRM in their Cypher product might become an alternative.

    For now it’s a typical MS version 1 release…I’m not really scared for the Flash Platform at present time. I’m guessing Apollo is up for a way bigger battle when put up against WPF. I’m keeping a close eye on the Silverlight player anyway….

  • adding : but I’m still a dedicated Flasher 😉

  • […] The name that they ended up with – no, I’m not going to use it – just slides off the memory cells somehow. Kieth Peters noticed the same thing. On a less technical note, I gotta say, I HATE the name. I can’t ever get it right. I’m stumbling over Sparklelight, Sprinklelight, Silverfish, etc. before I spit it out. John Grden suggested “Steely Dan”, but we won’t go there… […]

  • Ryan Taylor says:

    My initial reaction was exactly the same when I first checked that stuff out. Way back when talks of “Sparkle” and Microsoft’s plans to compete with Adobe first emerged, there were talks of 3D support and C# for programming and how it was going to be the “Flash killer”.

    In regards to Adobe and DRM, it is my understanding that the DRM stuff that has been demonstrated in the “Adobe Media Player” will be packaged with Apollo initially, then eventually the Flash Player as well.

  • And now the Silverlight theme song… to the tune of “Cool Night” by Paul Davis….

    ‘Oh. Oh. On a cool night, just let me hold you by the Silverlight, if it don’t feel right, you can go. Oh. Oh.’

  • Webdevotion says:

    Flash & DRM stories:

    Widevine offers Flash DRM:
    http://newteevee.com/2007/04/09/widevine-to-offer-flash-drm-holy-grail/

    and related:

    Adobe to release Adobe Media Player:
    http://newteevee.com/2007/04/15/adobe-media-player/

  • Mike J says:

    There’s also the issue of it not functioning in all environments. Microsoft is already notorious for problems in this area, and when I tried to go check out their demos in Opera, it told me that my browser was not supported.

    I guess I view it as a bit of a mixed blessing to be honest. I was bothered by it initially, but now I’m kind of glad that I don’t have to worry about their “RIA solution” creating problems for my browser or system. Not to be excessively harsh, but they don’t really have the best track record when it comes to security.

    Thanks for shedding additional light on it!

  • Freddy says:

    just do your homework as developer and guide the ones without the knowledge to the right tool:) don’t let them go with the the 5 years too late way hehe

  • stefan says:

    It would be healthy for Flash to have (real) competition but Silverlight is not it. Remember when Adobe came out with LiveMotion? Well, it failed due to limited, archaic scripting. So they got smarter and bought Macromedia. If Micro$oft wants to compete they should buy Adobe (God forbid). I think I’d rather buy a Bud Light.

  • Fregas says:

    I think the main appeal of Silverlight will be to existing .NET developers. The ability to write a “desktop-like” client application with the full movie and 2D Graphics support, PLUS the full .NET framework (data access, windows forms controls, web services, xml, CLI, C#, VB.NET), plus being able to use Visual Studio and its designer, is all very compelling. I too was very disappointed when i saw the example apps using javascript. Once they have full C#/Visual Studio support, i will definitely be on board. Someone mentioned lack of “messaging” support and i’m not sure what htey were talking about? Web services? Xml? Silverlight will have all that because its all part of .NET.

    I get the impression that most of the people on this blog are Adobe/Flash designers (i could be totally wrong though). Whether or not Microsoft will be able to compete in the design market using Silverlight and its Expression line of design tools is still up for grabs. But for the programming, i’d rather use Silverlight, C# and Visual Studio any day over Flex. But then, much of this is because this is what i’m familiar with already…

  • JLM says:

    ER – in ref to prototypes.. maybe HaXe could be adapted to output Silverlight?

  • Great to read your article and comments from all folks, m user experience deisgner, love to do lot of visual language in my communications. From my point of view microsoft should make this in one direction, its good that SL supports lot of things [This is what they says].. but for any user product should be understandable. Very simple example: if we do survey and ask 100 people what is silver light?… m very sure ..70% people will say its software like Flash, which gives output [wouldnt be able to tell in what format] like swf. First thing for people its not clear what exactly silverlight… have tried to do some design with expression.. overall interface is very dark and tools are very completed.. worst part..if u do something very heavy.. application ll get stuck.

    Still i love to see how silverlight is going to give competition to Flash[water in the world of web… which started long back for designers[for small linear animation]… now became RIA giant]