Neil's Place

May 19, 2004

8:42 PM Investigating the XUL Template Builder

A few weeks ago, someone was asking some questions about XUL templates. In the process of answering, I had a revelation and finally understood completely how templates work. I also decided it was finally time to try to understand the template building code. This code is rather complicated, involving about 20 - 30 different data structures. I still don't understand what all of them are for, and I don't think it's possible that anyone ever will. I think the complexity comes from the code needing to be scalable for templates with lots of rules and conditions, and ensuring that only the necessary parts need to be reevaluated. Most templates only have a few consitions so I'm not convinced that the complexity is worth it. But then again, I wouldn't be able to tell for sure without ripping it all out and changing it, which I don't think I want to do.

I am, however, more sure that the template builder actually does work as it's supposed to. Any problems people have are caused by errors either in RDF or template syntax. Common problems include using the wrong RDF content type, using the different parts of the RDF triple incorrectly, or putting the wrong values or variables in the template itself.

Many people would agree that templates need some kind of debugging aid. This would involve two things. First, the simplest, would be to print template syntax errors on the Javascript console. This would catch some types of errors, but wouldn't be able to catch RDF usage errors. The second would be to have a way of enabling a log of what the template builder is doing, allowing one to determine where in the process things are going wrong. Debug builds of Mozilla already have such a feature, but the output is very cryptic and is intended more for someone who is debugging the template builder code itself. I like the idea of a template builder log, but I'm not sure where it would be stored. One possibility is to add an attribute 'debugtemplate' or somesuch and, if true, store a log in a string field in the template builder, accessible via script.

That said, I'm in the process of creating some patches for the template builder, one patch to print template syntax errors to the JS console, and another nice patch for the enhancement bug 86435.

Comments ( 38 )

May 18, 2004

XULPlanet Forums
The XULPlanet forums have also now returned.

May 14, 2004

6:54 PM XULPlanet has returned!

After a long time off, has returned in all of its glory!

Well, almost. There's a few things that don't work quite right yet. The forums aren't up yet for instance. These should be fixed soon.

In case you were wondering, the old host decided to suddenly go out of business. Fortunately, we were able to make a backup of all of the content and move it onto a new host. We got numerous requests to help and I'd like to thank everyone who offered. However, we decided to go with a dedicated machine for XULPlanet. With a dedicated server, this should eliminate bandwidth issues such as those we had in February. I might even be inclined to provide downloads of the XPCOM reference. Or, perhaps I should go back to some XUL templates work.

Comments ( 67 )

April 17, 2004

Bug 221619 - tree widget improvements checked in
Removes need to put ids on columns, improves drag/drop, and paves the way for tree editing

How to automate the organization of information
Is the solution to build a Google engine for your own system?

April 15, 2004

11:44 AM Huge Changes!

I haven't been posting much lately. That's because I've been busy working on lots of big changes and improvements on XULPlanet. Here are some highlights:

  • I have personally gone through every XUL tag, attribute and property and combed through the XBL bindings and C++ code that implement them, to ensure that the element reference is complete and accurate.
  • A new Scriptable Object Reference lists objects that are available to unprivileged JavaScript. This is a work in progress and is mostly generated from the XPCOM reference.
  • The element reference now lists inherited attributes and properties along the side.
  • The element reference lists the types of most attributes and properties as well as the return types of methods.
  • The element reference now lists some common style classes that can be applied to elements. These classes work in at least the Classic and Modern themes and should in others as well.
  • Two new sections about commands and command updaters have been added to the XUL tutorial.
  • The tutorial sections on focus, and broadcasters have been reworked.
  • Sidebars have been added to the reference pages for better navigation.
  • Comments are now available on the XPCOM reference and the new scriptable object reference.
  • An index of frozen interfaces has been added.
  • Components in the XPCOM reference now list all the methods of all the interfaces that they implement. For example, see the reference for the local file component.
  • Interfaces now provide a cross reference of other interfaces that refer to them, either via a property, a method argument or a return type. For an example, see the nsIRDFDataSource interface.
  • A bug where unscriptable properties were not marked as such in the XPCOM reference is fixed.
  • The main page has been reworked a bit to make it clearer as to what information is available.

Comments ( 19 )

April 12, 2004

A Manifesto for Collaborative Tools
Thoughts on where to go with applications in the future.

April 7, 2004

11:13 AM Software Economics Poll Results

After looking at the results and comments from the last poll, I'm not sure that people really understood the choices. The Linux choice was inspired by comments made by Microsoft employees and others, where Linux was being compared to communism on the basis of it being free and it promotes sharing of code. The second choice was centered about the idea that packaged software is generally not given to people to use, but licensed for use. In this case, people are not given any private property; it is instead owned by one collective body, in this case, the software developer.

Both comparisons are actually stretching definitions quite a bit. By carefully selecting parts of the free/open source model, or parts of the commercial software model, we can suggest that either is communism. In fact, everything is communism if you really wanted to find a similarity. One could just as easily say that they worked under communism since, at work, one doesn't own anything (their desk, their pens, their other tools,...) and everyone works for the common good of the company.

The point is that free/open source isn't communism. It's a licensing model for distributed software.

By the way when I read Steve Ballmer's line "Linux sort of springs organically from the earth," I wondered if that means that Windows doesn't and is therefore unnatural. See, I can easily stretch things to fit my own agenda.

Comments ( 7 )

April 5, 2004

Mozilla and the potential for interaction
Discusses XUL applications

April 2, 2004

MozNGW - Firefox-based Cross Platform Client for GroupWise
Always nice to see what great things those people in the Mozilla newsgroups were working on.

101 Things Mozilla can do - Korean Edition
Someone -- not sure who -- has written a Korean version.

April 1, 2004

11:52 AM Software Economics Poll

Which of the following is more like communism?

The way Linux is free and encourages sharing of code.
The way Microsoft licensing doesn't allow one to own software they purchase.


Comments ( 18 )

March 29, 2004

101 Things Mozilla can do - Brazilian Portugese Version
Thanks to Caio for providing the ninth translation of 101 things.

March 26, 2004

101 Things Mozilla can do - German Version
Thanks to Wladimir for providing this

March 16, 2004

12:28 AM References Update in Progress

I'm in the process of making some changes to the XUL element reference and XPCOM reference. For instance, I'm including more details on the components pages. If anyone has any suggestions for information they would like to see on the reference pages, leave a comment.

Comments ( 39 )

March 5, 2004

RDF Datasources Reloading
Now scriptable. Also updates when the datasources attribute is changed

March 2, 2004

2:19 PM I have returned from the developer day

I'm back from the Mozilla developer day. There doesn't seem to be any of the videos, photos or slides up yet, except for the roadmap slides. There were six talks, as listed on the developer day page. Two additional talks not listed were by George Cao on rich client apps, who showed some Firebird+SVG demos which were really great -- including dynamic updating, and bar and pie charts. The last was a short talk on RDF datasources from Ben. I hadn't realized he had an interest in RDF and wanted to ensure that people knew that creating custom datasources without using RDF/XML was possible.

The roadmap talk from Brendan suggested a number of interesting things that the foundation wants to do in the future:

  • Try to get enough SVG implemented. SVG is a big spec, so try to find what parts are more necessary. Mention of work desired on making Mozilla render to hardware graphics libraries.
  • Support other languages besides JavaScript. Indication was that Python was the easiest to do. Later, Perl and possibly runtimes like Mono.
  • Help build a XUL IDE using Eclipse.
  • Create a documentation site. The foundation is looking for help. I was going to ask about this and what kind of documentation was desired but didn't get a chance.

The talks were mostly aimed at developers except for the Firefox/Thunderbird talks. The assumption was that people there knew enough about the basics of Mozilla. People did ask some branding related questions though. One main point is that the Foundation felt that the name 'Mozilla' was being used for too many things - the organization, the website, the browser and the platform. The news apps are intended to push the Firefox and Thunderbird names for the browser to help distinguish them from other Mozilla names.

There were a number of people there looking to hire for Mozilla work as well as people looking for jobs. Many of the rest of the people were Foundation employees as well as other former Netscape/AOL employees. Interestingly, it was mentioned that half of the foundation staff are now paid outside of the AOL money.

Quite a good day. They want to hold one every six months, so there should be plently of opportunity to go to another.

At the end, most people left but some hung around for discussions. I had a few with folks looking for Mozilla developers or asking questions. Afterwards, I thought that I could have gone back to the hotel I was staying in, but that wasn't very exciting. Instead, I stayed and listened to Asa talk on various topics such as the environment, politics, curling, language usage and the pop/soda/coke issue. A few others like James, timeless and others occasionally said something. I'm not much of a talker so I didn't say much but I did find it all interesing. Anyway, I finally decided to leave about 3 hours later. Asa propably kept talking for several more hours.

A few notes outside of the developer day since I stayed for a few extra days as a vacation. I did various touristy things. The grass is green in California. Very unusual. I always thought grass was usually more yellowish. I haven't seen a hill in almost two years. Going to and from Millbrae station on the BART makes no sense. In three days, I don't think I've yet completely figured out how to pay for it. People say the weather in California is nice. They weren't talking about last week. It rained often. I wore a jacket every day and turned the heater on at night.

Anyway, I had a good time, and might consider going again, but probably not for the next developer day.

You may have noticed that ran out of bandwidth last week. Coincidently, it happened the same day that I left. There wasn't much I could do about it while I was gone, sorry. We tried to prevent it before I left but that didn't seem to happen. In case you're wondering, usage of has nearly doubled in the last six months. Hopefully, the issue should be resolved soon so it won't happen again.

Comments ( 11 )

February 20, 2004

101 Things Mozilla can do in Russian
Thanks to Sergey for providing this

12:09 PM Heading into an unknown world

It's official now. I'll be going to the Mozilla developer day next Friday. I've never been to that part of the world before so it should be quite exciting. Especially after Chris Blizzard mentioned that Asa won't be wearing pants. In fact, the farthest west I've been in the US is Miami, which isn't particularly very west. I'll be there for a few days (25th to 29th) so I'll have a bit of a vacation too.

This is a good opportunity for others to complain about XUL documentation to me in person.

Comments ( 36 )