Home >
By now most of us have seen the amazing work that Dion Almaer and Ben Galbraith over at Mozilla have created. The incredible web-based code editor built from scratch using the HTML canvas tag. A project embedded in the Bespin project, called Thunderhead, shows that Mozilla is thinking about a better way to create rich interfaces.
For awhile Mozilla has been trying to reconcile the Open Web mission with the inferiority of HTML for creating rich, dynamic user interfaces. Part of this struggle can be seen in a survey being crafted for people working with Mozilla technologies. Some of the questions include:
- Why did you choose XUL?
- Why was HTML insufficient for your needs?
- If we added specific features of XUL to HTML, would you use HTML instead?
These of course talk about extending HTML with XUL somehow. But the Bespin project uncovers a whole new approach. What is Thunderhead? From the Mozilla Wiki:
Thunderhead is a much more bleeding edge edge experiment. We have talked to a lot of developers who are experiencing real pain with layout on the Web with respect to building Web applications (versus pages). We wanted to take a look at this problem and built the beginnings of a layout system using JavaScript and Canvas. This is Thunderhead, and we will be posting more about it soon.
So what does this look like? There is a brief example on Ben Galbraith's blog:
<canvas> <splitPanel> <list/><horizontalTree/>
</splitPanel>
</canvas>
Look a little familiar? Both XUL and MXML use this same strategy for laying out and programming user interfaces. If MXML was a confirmation of XUL, then Thunderhead is a confirmation of both of them.
For a little cover from the purist camps, this is all labeled "experimental" and "bleeding edge". Not to be forgotten, these two projects are supported by only newer browsers, and exclude Internet Explorer. So "experimental" is appropriate. However, if Thunderhead turns out to be successful it would only make sense that Mozilla would encourage it's use.
A couple of interesting questions come to mind from these new developments. What would be the relationship between XUL and Thunderhead? Could Flex's MXML serve a role similar to that of Thunderhead? Imagine a Flex compiler option that would let you target the canvas tag.




Facebook Application Development
Of course the problem is - how can anyone trust that Canvas is going to behave the same across all web browsers?
I have no tolerance for differences in browser technologies these days, whether at the HTML, CSS or JavaScript levels, which is why I favour Flex for my front end these days.
Thus, I can't imagine why any Flex developer would opt to target Canvas rather than Flash. What will they call it? The hail-mary flag?
At least Flex/Flash is consistent everywhere and that will *never* be the case for HTML/JavaScript solutions as 'standards' are always open to a certain level of interpretation, if they are adhered to all that is.
OK, you can get some JavaScript libraries which abstract those differences, but as soon as you do that, you might as well simply use a productive, mature environment like Flex/Flash, which isn't subject to breakage on every browser point release.
Chris, I actually agree largely with you. Right now, Flex and Flash are the top choices. Depending on how the browser scene plays out though, we may end up having more choices then we think.
And the idea of being more creative with "Open" web technologies and not being stuck solely with HTML is progress in my opinion.
Do you really think Microsoft would ever implement a layout system developed by Mozilla? Of course not. End of story, you can't shut out IE users.
Do you really think Microsoft would ever implement a layout system developed by Mozilla? Of course not. You can't shut out IE users, so this is pretty much dead in the water.
Ben,
I mentioned in the post that the project doesn't support IE, and in fact doesn't even appear to be planning support for it.
But a browser vendor wouldn't need to implement a "Mozilla layout system". If the browser supports HTML 5 and Canvas (including the Canvas text API!) then the framework would work on it. What if AIR get's an appropriate version of WebKit, Thunderhead could work there. What if you're building a XULRunner application? Thunderhead would work there.
Really this is all dependent on how the browser scene plays out, and which rendering engine you're targeting.
It's not dead in the water - if it's a good idea then Microsoft will probably copy it and make their own in a few years, or build in some sort of selective support in IE9. :)
I'm really excited by this simply for the direction it implies HTML layout is moving. I love Flex and the ease with which it lets me code up quick layouts, but sometimes it's over kill and I'd rather throw together a quick HTML page. Being able to use a coherent layout language to do that would make things so much easier....after MXML, most html layout code looks like way more effort than it's worth.
In my opinion, html layout will still be here to stay for as long as we can imagine. Many have been accustomed with it and are happy with it. mobie at holly mann | honest riches
I agree that Microsoft will not support anything that has to do with mozilla. I just dont see that happening. I myself am ok with new changes but as a developer I have a hard time new learning an new language, we need to stick with just a few. I have to get back to my beach umbrella and my vacation. Thanks for the great post.
I have been coding my kids party games website in HTML. I agree with Mobie that HTML is here to stay for many different reasons. First many people know this language and people have a hard time changing.
can ben contact me about a youtube feature/developmant idea? thanks