Neil's Place

November 10, 2003

7:15 PM Canvas Tag

I've been working on and off for the last couple of weeks on a canvas tag for XUL. The canvas tag is an element designed to allow custom drawing, one of the few main things that XUL doesn't have. It's based on the patch in bug 102285 which creates an image buffer in which one can set the pixels. My version will do that too, but can also be used with a callback to a script to do the drawing.

It works quite nicely. With it, I've created some SVG-like elements entirely in XBL, which resize and flex and so forth properly. Canvases can also be nested.

There's still quite a bit of work to do, but if anyone has ideas on what they'd like to be able to do with a canvas tag, add a comment here.

Comments ( 40 )

November 9, 2003

12:01 AM XUl Usage Poll Results

There must be more people reading this weblog. There were four times as many votes in the latest poll as with previous polls. Or perhaps it is all the people linking to the XAML/XUL discussions that are creating more traffic. Or, perhaps people are just interested in the poll.

Most people thought that XUL would get more popular with either the availability of a XUL IDE or the endorsement by a 'standards organization'. I selected the latter of those two.

Standards organization endorsement might not increase Mozilla's usage, but it would likely create other mostly compatible implementations. A XUL IDE would allow people who have used other visual tools to easily learn XUL development.

Of the other options, 'A XUL Specification' is perhaps useful, but as someone pointed out in the comments, would be created as a result of the standards organization endorsement. For XUL documentation, there actually already is a suitable amount. Most people probably want more documentation on the Mozilla API, rather than XUL itself. Another problem is outdated documentation on, which should be removed. Also, I do plan on adding user notes to at some point, which some people seem to think will help. (I do not necessarily share this opinion).

Few people opted for more powerful and extensible elements. I suspect that many people do still want this, but it won't do much to increase usage of XUL.

Lots of people want to be able to use other scripting languages. I suppose that has the advantage that there would be many Python, perl, ruby, etc... developers that could interface with XUL applications.

I should have put Remote XUL on the poll as well, since I think that is an important feature and people get headaches with the various issues that exist with remote XUL currently.

I have, however, recently discovered some additional information regarding one of the items on the poll, which suggests that particular item will become a reality. I won't say what that information is however.

Comments ( 7 )

November 6, 2003

2:55 PM My Tasklist

I have lots of XUL/Mozilla related tasks to do. Here is a list in no particular order:

  • finish observer service info
  • add controllers info to tutorial/reference
  • add scrollbox/scrolling info to tutorial
  • continue work on XUL <canvas> tag
  • fix XPCOM reference stylesheet, header and footer
  • add user notes capability to tutorial and other pages
  • write security document

Comments ( 46 )

November 4, 2003

1:27 AM Video in Tooltips

I read somewhere that MS recently demonstrated that their 'Longhorn' OS could display video anywhere and then showed a video playing in a tooltip. Ignoring the uselessness of that specific example, I realized that you can actually display video in tooltips in Mozilla already. Here is a screenshot. (I would give an example but I'd need a suitable freely usable video - for the screenshot, I used a RealPlayer file from

Here is the related XUL:

<tooltip id="tooltip" orient="vertical"
            style="padding: 1em;">
  <label value="This is a tooltip"/>
  <html:embed src="..."/><!-- or use html:object -->
<button label="Hover here to see a really funky tooltip"

It's not perfect of course, since plugins tend to do what they feel like and you don't always have control over how they play. Mozilla would need to implement SMIL to handle it properly.

Comments ( 25 )

November 2, 2003

1:20 PM XUL Usage Poll

What do you think would most encourage more usage of XUL?

A XUL specification
Endorsement by a standards organization
More documentation
More powerful and extensible tags and widgets
Proper support for python, perl, ruby, etc...


Comments ( 22 )

November 1, 2003

12:57 PM System caches

A good cache system for temporary files really needs to be implemented at the system level, not at the application level. This way the system can clean up temporary files of all types from all applications when space is running low. The system should use all of the remaining unused space available for temporary files. I wasn't kidding when I created this image of cache settings. To ensure that users don't get worried about low disk space, the system should ignore the cache when calculating the total free disk space. For instance, if normal files are occupying 60% of available space, and temporary files 38%, the system will still report that there is 60% of the space free. Actually, memory caching should be done the same way.

Comments ( 11 )

October 30, 2003

Bug 7639 is fixed!
This is the fix so that now works on XML UI languages
The article wins this years 'Largest use of Acronyms' award (115 uses)

10:25 PM New Work

I've accepted a contract position with Mozdev Group to work on some Mozilla-related projects. Actually, I started on Monday so I've already done some work already. It's always good to work with folks who share the same vision as I do. Let's hope together we can build some exciting products and help to promote Mozilla technologies.

Comments ( 22 )

October 29, 2003

5:28 PM Building Technologies with Baby Steps

When someone encounters somthing new, one has a tendency to compare it to something that already exists. This is a natural habit that everyone does to help provide a starting point for determining how to react to whatever this new thing is. For instance, when a new product is released, it will be compared to some existing product, and lists of advantages and disadvantages between the new and old will be created. It really doesn't matter that the new product has a very different purpose or not.

For instance, if you build a new revolutionary killer product that does all kinds of never-before-done things, but you put a Back button, and an address bar and Bookmarks on it, it is no longer a new revolutionary killer product, but just another web browser. It doesn't matter what you say, because people will look for the familiar in your new product, and compare your product to that. You can't create revolutionary products intentionally, so quit trying.

Why was XML successful? Likely much of its success was due its similarity to HTML. If XML had used square brackets or other different syntax, its possible that it wouldn't have gotten as far. People need a way to transition to new things so that familiarity is maintained thoughout the process. When building a new technology, you need to ensure that radical changes are minimal to encourage adoption.

For instance, a web developer that understands HTML forms would have no trouble with a few new tags or attributes added to HTML forms, but would really get lost when it comes to XForms. That would require one to grasp XML syntax, different tags for forms, the separation of UI and data, XPath, and a number of other things. The intuitive leap is just too great. Instead, technologies must be created which allow the developer to take baby steps from one concept to the other. In fact, Opera has provided an alternative to XForms which is much more transitional, and, if suitably implemented, would likely be more widely adopted.

I've mentioned XAML a number of times recently. It falls into the same category. People are looking for something familiar to compare XAML to, usually comparing it to XUL, since they are both XML languages for constructing user interfaces. They do have very different purposes though. XUL was primarily developed for constructing Mozilla's UI, and for constructing web oriented applications. It wasn't designed so one could write a better alternative to Microsoft Excel or Adobe PhotoShop. Thus, XUL builds on existing web technologies such as CSS and JavaScript. Web developers are familiar with these so the transition is much simpler and smoother. XAML, on the other hand, is a transition only for .NET developers since it contains things from there but contains almost nothing from the Web. The gap is much too large for web developers, which may mean that it may have trouble getting any usage by that group.

Have you noticed how popular the web is? The web has slowly changed the way that developers and companies think about things. You can't just light a match and blow it away. Progress is done in small steps.

Comments ( 7 )