been a while

toshok | geek | Monday, October 6th, 2008

it’s actually been so long since I updated my blog that I forgot how to do it — “oh riiiight, …/wp-admin/”

this post is basically a pre-announcement.  I’ve been working on code that consumes XAML for a while now, in the form of Moonlight, and some sporadic work on the WPF assemblies in mono’s “olive” module.  This much is known to people following mono commits.

But in my spare time, I’ve also been working on another system based around the same ideas, except this time based on the SVG implementations supplied by browsers, along with JavaScript.

It’s called Firelight, and the github wiki is here.

Think of it as a Silverlight-like implementation with some WPF thrown in, with no plugin.  Just a JS file and a little initialization code.  It loads almost instantly (it’s smaller than jquery for the time being, although it’s unlikely to stay that way) and immediately goes to work.  And it will directly benefit from performance work being done in browser SVG, DOM, and Javascript implementations.

Since I don’t expect any of you to go grovel around that stream of consciousness wiki page, here’s a tiny demo of some of the core infrastructure in firelight:   http://squeedlyspooch.com/firelight/xaml.xhtml.  The xaml file which is loaded by that page is here.  Note the event triggers on the smaller gradient filled canvas.  Try mousing over it and clicking it.

That demo (as the wiki states) works in Firefox version 3.x, Safari (windows, at least) 3.1.2, and on the iPhone (that part I get a real kick out of).  Opera has some issues with some of my code, and so I have some issues with Opera.  But I’ll get it working there too soon (makes sense, since last I checked it had the most compliant version of SVG available.)

12 Comments »

  1. Nice work, indeed. Do you need help?

    Comment by Stuart Langridge — October 7, 2008 @ 3:00 am

  2. Congratulations! This is really interesting stuff. It seems JavaScript is becoming a very viable alternative to build RIAs.

    Comment by Fernando Correia — October 7, 2008 @ 4:24 am

  3. This is why I am all for boycotting IE8 (and above, start now before they are adopted!)

    Microsoft haven’t fixed the png transparency bug in IE8 either (still there when animating png’s)

    And do you think they will when they want to have a second go at taking over the web with their shitty silverlight?

    Kill IE, kill silverlight, kill mono.

    add IE8 checking NOW to your sites, and stop that first user in their tracks. Do it today, pass this on, thanks

    Comment by Xenu — October 7, 2008 @ 6:22 am

  4. It’s a neat idea, and I’m pretty impressed to see that demo working so well in a modern browser! Good work!

    Unfortunately for me, while is useful for certain limited use cases, the truth is that Silverlight (2.0+) provides a ton of features that no browser supplies and which we do really need. Usable sound APIs, 3D rendering, real networking, etc.

    If all someone wants to do is make some animations with a few user controls, Silverlight 1.0 (and eventually Firelight) is fine. The real interest in Silverlight/Flash/Java in the browser comes from all the things it can do that the browser can’t (or won’t), though.

    Comment by Sean — October 7, 2008 @ 6:31 am

  5. It also works in Google’s Chrome in Windows, and a trifle faster, also. Nice work

    Comment by Rafael Teixeira — October 7, 2008 @ 7:04 am

  6. Very interesting, but more importantly, a step forward. If this can be linked to WPF well, then Silverlight devs will be able to make Silverlight Lite applications for the iPhone and for non-IE browsers that don’t have Silverlight for some reason or another using the same code and some tinkering.

    Further down the road, it might even kill browser plug-ins, but I’m doubtful. It is more important to look at what this can do in the short term, which seems to be a lite variant of plug-in techniques that we already see.

    Comment by Yert — October 7, 2008 @ 7:17 am

  7. Nice, but SVg will never be supported by IE.
    And indeed, Opera and FF differ in supported features.
    All this can be done (very simple also) in Flash/Flex.
    Yes, it needs a plugin, but is supported on 95%+ off all browsers.

    Comment by NoName — October 7, 2008 @ 7:26 am

  8. Might also be worth noting that it works in Chrome (although not perfectly). Also, nice!

    Comment by BioTronic — October 7, 2008 @ 8:27 am

  9. figured I’d respond to everything here:

    @stuart: absolutely!

    @NoName: as much as I hate committee-based standards work, there’s a certain amount of pressure to be brought to bear on browser providers by *using* the technology. Sure, it might not get IE to buy in on SVG, but so what? Opera and FF will eventually have parity - if it comes in the form of an ACID test, so much the better. It’ll get there.

    @Yert: I agree - I don’t think this will supplant plugin-based systems anytime soon. There’s too much flexibility and the very powerful ability to say for certain that plugin behavior is consistent across the range of browsers. But even now it’s serving as a nice prototyping system and testbed for new ideas in my work on moonlight.

    @Xenu: i don’t really know how to respond to your comment.. are you arguing for or against firelight?

    @multiple - thanks for the chrome update. Considering its JS engine is quite different, that’s pretty awesome.

    re: opera - it can be made to work pretty easily, but it lacks some __properties__ I’m using in the plumbing. I’d like to get rid of those if there is a “nicer” way to do it, just haven’t worked hard enough to figure it out.

    Comment by toshok — October 7, 2008 @ 10:07 am

  10. Awesome idea.
    However, this doesn’t seem to be working on my iPod Touch.
    What version of Safari are you running on your iPhone?
    Tudor

    Comment by Tudor — October 7, 2008 @ 1:45 pm

  11. Nice! Have you considered using the canvas element which is going into HTML 5? Or is the small code size a factor of Silverlight mapping neatly into SVG? The canvas element is basically a pixel buffer with some anti-alised drawing primitives.

    Comment by Ole Laursen — October 8, 2008 @ 5:24 am

  12. Yeah, my initial version actually had support for 2 backends. an svg one and a canvas one. But the canvas one requires writing an entire rendering layer, which I didn’t want to worry about doing again :)

    I may do it anyway at some point in the future (and patches are always welcome), but for now I’m just going to try and get the svg host working.

    Comment by toshok — October 8, 2008 @ 11:22 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress | Theme by Roy Tanck