Neil's Place

February 15, 2004

11:15 PM Making remote chrome work

There are many times when people want to use XUL remotely. There are a lot of restrictions on the kinds of things that can be done however. Some are more obvious such as reading local files, but others are really just bugs, such as the buttons on a wizard not appearing properly. There are many times when a remote application will want to have privileges to perform additional operations. Currently, in Mozilla, the only way to allow this is to sign the code, or package the code up into an installable download, which is what all the extensions do. Code signing is not viable in most cases -- you need to get a certificate, the steps involved are difficult and very error-prone, and I haven't been able to get it to work with newer Mozilla versions. Back when I first tried to sign code (many years ago), it took me almost a week to figure out how to do it.

Creating a chrome package is simpler although is more complex than it should be. Many people have problems creating the RDF files necessary, putting files in the right place and packaging the files correctly. Chrome also requires that the package be installed on the user's machine. For many applications, such as those internal company ones that do things like bug tracking, project management, and so forth, this isn't a good solution. Chrome applications currently have no automatic updating mechanism, unlike a web site which can be tweaked every day without hassle. There is some talk of adding such a feature to Firefox soon, but this isn't really a viable solution. Having to install things is just not acceptable in the eyes of many internal support people. Also, having to call enablePrivilege all over the place is too much trouble for some.

Instead, I think a better mechanism would be to use a file containing an application description (like the contents.rdf file) which sits somewhere on a remote site. In addition to the application name and author, it might list permissions that the application desires. It could be simple, such as a site that desires general enhanced access, or fine-grained like listing specific URLs or a base URL that requires access to specified XPCOM components or interfaces.

When this remote description file is read, a message box would appear where the user would be asked to grant permission, along with the option of checking a Remember this Decision checkbox. The user would then be redirected to the actual application, the URL of which is specified in the description file. The application would have whatever privileges are necessary.

In this scheme described above, enhanched privileges are only a click of a Grant button away. Some may think that this would lower the security in the browser, and put the user at greater risk. Not really. Enhanced permissions are already only a click away, since XPInstall only requires a single click for a chrome application to be installed.

People ask all the time about why some feature doesn't work in remote XUL. We need to be able to allow these kinds of operations without resorting to some complex scheme such as code signing which just isn't viable for many purposes. Granted, there are places where a extreme amount of security is needed, but very few ordinary users would have a need for this.

Comments ( 21 )

February 12, 2004

1:07 PM About:mozilla

Hmmm. The about:mozilla text probably doesn't make any sense any more.

Comments ( 25 )

February 11, 2004

The Tide Has Turned in the Battle of the War
The Mozilla battle, that is

February 9, 2004

10:23 PM Firefox and Cars

Hmmm. A screenshot of a car-related website. An indicator of a product's name switch using an odometer. Yes, you can always tell when Ben creates a page on mozilla.org.

Comments ( 7 )

February 6, 2004

7:58 PM Chrome Starter Guide

One of the most common questions asked is how to get a simple chrome application up and running. The XUL App Tutorial describes this. Usually people have problems near the end because they missed a file or typed something in wrong. Since I didn't write the App Tutorial, I am hesitant to change it to be clearer.

However, I have now written a short guide to setting up a chrome application for testing.

Comments ( 38 )

February 5, 2004

1:40 PM To Musicians

Dear musicians and song writers:

Please stop making songs with phone ringing sounds in them.

Thank You.

Comments ( 32 )

January 30, 2004

11:31 PM XUL Developer Tools

I've been thinking a bit about XUL editing environments lately. There are two parts that would be useful, a GUI designer and a deployment tool. The former would be an application which would allow one to place UI elements on a window and adjust properties and hook up events and so forth. There are some attempts at this already (XULMaker for instance) but nothing yet at the point which is very easy to use and polished. I have some designs for how I would create such a application floating around in my head.

One of the things about Visual Basic is that it works with absolute coordinates. That means that elements can be placed exactly at the position and size the developer wants and can move them about without problem. XUL doesn't work this way. Instead elements are placed in boxes and are positioned according to their parent, children and siblings. Java works this way too. How do Java builders cope with this in a logical way?

The second part is the deployment tool. Essentially, the developer should be able to click a Build button and have the application packaged up, complete with all the various components needed. Optionally, one should be able to specify whether the application needs a Mozilla or GRE or something which could be packaged up with it. One would be able to check off what components to include, such as XSLT, database support, xmlextras, and so forth. Much of this part of the tool would be independant of the XUL designer. The deployment tool would be used, for example, to deploy Mozilla and applications, either standard or custom ones, on a group of machines.

There is quite a bit of interest by people wanting to build XUL applications, however, the roadblock often seems to be the lack of easy to use tools to make this convenient and possible.

I've been working on an unrelated project using the Mozilla editor code so I've become quite familiar with how the editor works. I wonder if Composer could become the basis for a XUL editor? Being able to visually create an application and then click Publish would be very nice indeed.

Sigh... I have at least 15 things I want to work on and only one brain.

Comments ( 52 )

January 28, 2004

1:00 AM RDF in Mozilla Documentation Extravaganza

Lots of new documentation about RDF in Mozilla are now available on XULPlanet.com! Seven new sections in fact. Added to the first two listed below which were are already available, this brings the total number of sections up to nine.

Comments ( 32 )

January 27, 2004

Notes on Mozilla Devlepment with RDF and Trees
Wolfgang Schmidetzki makes a note of issues he encountered and how to fix them while developing a Mozilla application that uses trees and RDF.

Big XUL Tree Changes
Coming Soon...

101 Things in Chinese from Joseph
Three new translations in one month. I wonder what brought that on?

January 24, 2004

101 Things in Spanish
Provided by Oscar Curero

January 23, 2004

11:43 PM XUL Tutorial Colours

If you've used the XUL tutorial or other documentation on XULPlanet.com, you've probably noticed that the values of tags and attributes and so forth appear in a different colour as the rest of the text. For instance, tags appear in red, attributes, properties and methods in green, and values in yellow. The primary reason for this is to separate them from the text so that one would know what was the value and what was documentation. This also makes it clearer when referring to a tag so that the reader would know, for example, that a tree tag was being referred to instead of a general reference to a tree.

I'm currently in the process of writing a few more pages of documentation, and in one particular case, the amount of highlighted words is significant and perhaps distracting, especially the yellow.

Does anyone who uses the documentation find the use of colour distracting? Perhaps a different set of colours would be better? Or a different style altogether?

Comments ( 39 )