Neil's Place

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 )

October 28, 2003

7:26 PM One more XAML thought

One thing I noted about XAML is that both the code and the XML parts need to be compiled before using them -- although the XAML can be interpreted by Explorer in some means, perhaps by compiling it when needed.

From what I can tell there is no XML at run-time, meaning no DOM-manipulation. You need to use all new APIs to manipulate the UI. Actually, the whole thing works very similar to Mac OS X, which stores UI descriptions in XML which map to classes. Apple doesn't promote this much though as they prefer that people use the visual tools.

Comments ( 10 )

October 27, 2003

6:38 PM Some XAML comments

OK, I took a quick look at XAML to see how it compares to XUL, or anything.

  • It is indeed a XUL-like language for describing user interfaces. Why didn't they just use XUL? Well, you wouldn't expect MS to use something someone else created would you?
  • XAML might be only a codename. Sometimes, the documentation says it's a codename, and XAML always appears in quotes.
  • Only XAML files that don't have code can be displayed directly in IE. I'm not sure why you would have a non-code application. If your application contains code, it must be compiled into an executable. If I'm reading that right, it means that you can't do remote XAML. However, there is this Click-Once thing which appears to work exactly like Mozilla's XPInstall, by allowing one to install an application with one click. You still have to compile and set up all these deployment information, much like how XPInstall uses install.js scripts and RDF manifest files. There is a reference to 'application/xaml+xml' though, (Where's the x- or vnd.? Hello? Microsoft? Standards?) which I think is for non-code apps. It also means you need a compiler to develop with, conveneniently sold by Microsoft. XAML does not support interpreted languages like JavaScript (or JScript).
  • You can run compiled code in a standalone window or in a browser, but you can't do both. Switching requires recompiling.
  • Each 'XAML' tag corresponds to a Class. Attributes on the tags correspond to the fields (properties) of the class. For example, a Button class can be specified with <Button Width="100" FontSize="10">
  • There is no CSS used -- instead specific attributes are used. There is something confusingly called Styles, which appear to be more like CSS classes for sharing appearance with a number of elements. This Styles feature does seem to have the capability to adjust the appearance of inner content, for example the thumbs and slider part of a scrollbar can be adjusted with a block of XML. In fact, some of the examples suggest that the Style features might have some XBL-like content capability, although it looked more confusing.
  • There's a databinding feature, kind of like the one IE already has which can bind to XML, SQL and so forth. In XUL, this is done with templates and RDF. In XAML, the data to bind to are even called data sources.
  • There's something which falls into the category of 'Yet another XML vector language which isn't SVG.' It does look very similar though, but my cursory glance and limited knowledge of SVG suggest that it isn't the same. It is called Windows Vector Graphics though. Yes, this is exactly what the world needs. More similar but different vector graphics languages.
  • As far as I can tell, there's no XBL or overlays or anything similar. Custom components can be created in native code (C# or whatever). So, there's isn't anything as cool as Firebird Extensions.
  • The documentation is, like most of the stuff on MSDN, difficult to navigate through. Most of it is vague and more of a reference. There is only a few pages that actually explain how to do something. Because of this, there may be something I'm missing. There may be more interesting features that I missed, but I don't think XAML itself is necessarily all that powerful. In fact, it's really just a mapping between classes and XML.

There's a general overview here.

Comments ( 10 )