Archive for the ‘Web Development’ Category

Alex Russell’s @importRule

September 21st, 2007 by Cedric Savarese

So Alex Russell (of Dojo fame), not too happy about where CSS3 is going, suggests of a few more important things that should be considered for inclusion in the CSS standard. For instance, an @importRule directive.

Several commenters have pointed out that @importRule would not be that useful since you can already assign more than one CSS class to an element.

However, having (apparently) some time to waste this morning, I thought it would be interesting to implement this pseudo css rule anyway.

Here’s the example page, with a short explanation of the (very simplistic) javascript:

Again, I’m not claiming that this is very useful, but if one wanted to create a javascript css post-processor, that would be a good way to start.

Freja 2.1 Released

March 21st, 2007 by Cedric Savarese

Freja is a specialized Javascript Framework for creating template-based, single-screen web applications. It relies on browser-side XSL Transformation to render the user interface faster than any other Ajax-based method.

A simple demonstration is available here, with all the explanations here.

Version 2.1 includes bug fixes and performance improvements. The major changes are:

  • Upgraded to latest version of Sarissa (
  • XSL stylesheet should now set the XSL:output method to “HTML”. This prevents an unnecessary HTML serialization & parsing step and avoids invalid HTML markup altogether, like self-closing <textarea/>. While this change makes 2.1 not backward compatible, this should be the only required change if you are using Freja 2.0.

I also updated the documentation and tutorials, which were beginning to be seriously out-of-date.

The Freja core development team is comprised of Cedric Savarese and Troels Knak-Nielsen. Freja is an Open-Source framework built on top of the Sarissa library by Manos Batsis.

XUL-in-HTML experimentations (part 2)

February 7th, 2007 by Cedric Savarese

Just a quick update to point to the article I wrote for XUL-Enhanced Web Apps

This is still very experimental, but as you can see in the article, there are some clear benefits in terms of accessibility and speed when using XUL for complex UI widgets.

Check out the documentation and source for this experimental library and thanks to all for the feedback.

XUL-in-HTML experimentations

January 5th, 2007 by Cedric Savarese

Strange things happen during the holidays. Maybe it’s because I am more relaxed and less busy, but it seems that each time, a crazy idea about some web technology will cross my mind and I’ll end up spending hours exploring it.

This time, I was thinking about the interface for the next version of the Form Builder (I know, somehow it’s always work related) and I was wondering if XUL could be of any help here.

A couple days later, I had this working: tabbed panel example.

If you are not using the Firefox browser, you will not see anything interesting, so here’s a screenshot of the second panel, viewed in Firefox (XUL powered).

XUL Tabbed Panel example

The first panel in the example uses HTML+Javascript (a.k.a DHTML). It is very basic, there are better DHTML panel widgets of course. The idea is that you could enhance an existing javascript UI library to render widgets with XUL on XUL-compatible browsers…

You can check out the source code if you want to see how it’s done.

Update: As whoughton pointed out, it doesn’t degrades to DHTML as it should in Safari. I will fix that soon, it’s probably not a serious bug.

Update 2: The problem in Safari is caused by its user-agent. To detect whether I should render with XUL or DHTML, I look at the user-agent string. If it contains the word “gecko”, I assume the browser uses the Gecko rendering engine and therefore supports XUL… Well it turns out Safari’s user-agent string includes “Gecko” even though it’s not based on Gecko at all. Weird. Anyway, I’ll just have to fix the detection code.

Update 3. It’s fixed in Safari, thanks to Boris tips.