XULRunner 1.9 Final

As promised, XULRunner 1.9 has gone gold. The final release of the runtimes, SDKs and source tarball are now available. Release notes can be found here.

Even though I have mentioned it before, it’s worth repeating:

Another great addition for XULRunner developers – Microsoft symbol and source server support. Look here for information on Mozilla’s symbol and source server support. Just use http://symbols.mozilla.org/xulrunner instead of the Firefox URL. This is a huge deal for helping developers debug problems using the non-debug releases of XULRunner runtimes and SDKs.

If you haven’t tried using XULRunner yet, now is a great time to start. Use markup/JS/CSS to build real desktop applications using native OS look-n-feel, with complete access to custom and OS binary functionality.

Yay XULRunner!

XULRunner 1.9 RC2

A while ago I posted about getting XULRunner builds to coincide with Firefox milestones. Work has been moving ahead on the goal. In fact, we have XULRunner 1.9 RC2 binary runtimes and SDKs available for testing. If you use XULRunner, or want to use XULRunner, you should grab these builds and give them a spin. Let us know (file bugs) if you see something wrong.

Another great addition for XULRunner developers – Microsoft symbol and source server support. Look here for information on Mozilla’s symbol and source server support. Just use http://symbols.mozilla.org/xulrunner instead of the Firefox URL. This is a huge deal for helping developers debug problems using the non-debug releases of XULRunner runtimes and SDKs.

If you haven’t tried using XULRunner yet, now is a great time to start. Use markup/JS/CSS to build real desktop applications using native OS look-n-feel, with complete access to custom and OS binary functionality.

Look for more cool XULRunner developer support coming soon.

Remote Debugging JavaScript

Shaver and I have been talking about getting a decent mechanism for remote debugging a JavaScript session. I have been looking at JSSH. It’s a bit dated, but a great little Firefox/Mozilla extension that adds a huge amount of external flexibility, control and extensibility. The Watir-based web testing system for Firefox (called FireWatir) uses JSSH to control the current Firefox browsing session. The big downside to JSSH is that it has binary components, so you need to build it across platforms and Gecko versions. Yuck!

I have been working on a pure JavaScript version in my spare time, but I can throw that away now that ActiveState’s Shane Caraveo has released an early alpha (called SD Connect) of the same concept. Actually, Shane has a bit more than I had planned, but that doesn’t bother me. Comment’s on Shane’s post pointed me to the MozRepl project as well. I had heard of MozRepl a while ago and I’m kicking myself for forgetting about it.

My goals for remote debugging are a bit different than Shane’s, but there is plenty of overlap. I want to use remote JavaScript debugging to aid in Mozilla’s mobile browser development. I also want to use remote debugging for extension and XUL application development. I realize I may be the anomaly, but a Firebug-like component is _not_ my ideal debugger for chrome (application) JavaScript. For web content JavaScript, sure, but I have Heisenberg uncertainty issues with using a debugger that is itself in the system I am debugging. Therefore, I am very eager to start playing around with SD Connect and MozRepl.

Also, Yay for OpenKomodo spin-offs!

Have XULRunner, Will Travel – It’s Mobile Baby!

Mozilla’s Mobile group has been hard at work getting the Mozilla platform running on some mobile devices. Recently, Brad Lassey posted about getting XULRunner working on Nokia’s N800/N810 (Maemo) Internet tablets. He linked to a XULRunner binary and showed some XUL-based applications running on an N810.

This is big news for me because wherever you find a XULRunner, you’ll find me: building the runtime, writing sample applications, creating platform components and generally having a great time. I even managed to get myself an N810 from the Mobile group. It’s a pretty cool little device. We already have some bugs filed to better integrate the Mozilla platform with the Maemo platform (see bug 426291, bug 426292, bug 426293 and bug 426299). Bug 426355 will start making nightly XULRunner builds for the N800/N810.

So now I am adding support for mobile XULRunner and XUL application development to my list of duties. After all, developing XUL applications and extensions should be the same on WindowXP as it is on the N810 – and it is!

That’s right, I said extensions too. Remember, Mozilla is making a mobile browser and it will rock!

XULRunner Milestone Builds

Good news for developers who are building applications on the Mozilla platform, XULRunner in particular. The wheels are in motion to start creating XULRunner builds (runtime and SDK) that coincide with major Firefox milestones. I encourage interested developers to watch the bug to see how the discussion and plan evolves.

This is a big deal for developers building and embedding applications using the Mozilla platform. Currently, the only official Mozilla build of XULRunner is an out-of-date 1.8.0.4 version. Builds based on snapshots of Firefox milestones will go a long way to creating a stable platform to build gecko-based applications.

As a platform Mozilla has a lot going for it: maturity, flexibility, standards & openness. At the same time, there is certainly more that could be done to make the platform approachable to new developers, maintainable to established Mozilla-based projects and suitable for a variety of application types. Your feedback is always appreciated. It’s ok if you just want to vent, but ideas for improving the situation are even better.

Mozilla 2 – The Future of the Mozilla Platform

Firefox 3 is not even out the door, but work has started on the next refactoring of the Mozilla platform. Dubbed Mozilla 2 (FF3 is built on Mozilla 1.9), it is a chance to make lots of interesting, even scary, changes to the platform. For some background on Mozilla 2 go back and read Brendan’s post. Also, read the Mozilla 2 wiki pages.

Actually, lots of work has already been completed and lots more work is underway. Checkout the notes from the status meetings. You can call in every Wednesday to hear what’s happening. The work on ActionMonkey and XPCOMGC is pretty exciting stuff (for geeks, I know).

Another of the more exciting goals of Mozilla 2 is the move to use more JavaScript and less C++. Yes, C++ is great for those times you really need it (performance & native APIs), but JavaScript can handle many things better, easier and without a compiler. Mozilla 2 is adding a lot of improvements to JavaScript as well, making it faster too.

Less C++ is really part of the “Less Binary Code” theme of Mozilla 2. Another part of that theme is reducing our XPCOM footprint. Benjamin Smedberg recently posted some information about goals for XPCOM in Mozilla 2 to the Wiki and Newsgroup. See Benjamin’s older post on XPCOM changes too. I encourage any extension, embedders and XUL application developers who use binary code to go and read the information.

Extension Developers – More On Updating

We have been putting out the call for extension developers to start the process of updating their extension to workin Firefox 3. It’s never fun when your extension breaks because of changes in Firefox, but everyone wants to make the platform better. In doing so, we had to break some eggs.

On the bright side, extension developers seem to be really charging ahead full steam. In addition to finding signs of extension update work being done on developer websites, #extdev on Mozilla IRC has been pretty active. I have also noticed posts on Mozillazine forums too.

I thought I’d list a few issues I have seen come up during update discussions:

  • event.preventBubble() has been removed in Firefox 3. It was deprecated in Firefox 2 and code should be using event.stopPropagation(), which also works in Firefox 2.
  • Using window.addEventListener("load", myFunc, true) to listen for web content page loads does not work anymore. Changes were made to improve security and this was fallout from those changes. You should be using gBrowser.addEventListener("load", myFunc, true) anyway. Listening for “load” events on the Firefox main window is a bit overkill. Listening for the event on the tabbed browser makes more sense and works (in Firefox 2 as well).
  • The XUL popup system (popup, menupopup & tooltip) has been significantly overhauled in Firefox 3. Some methods were deprecated (showPopup), some were added (openPopup & openPopupAtScreen) and a whole new type of popup was added (panel). See the new Popup Guide for more information.

There is a wiki page listing a bunch of stuff extension developers should consider or to watch when updating. If you find something, add it to the list.

One of the other benefits of updating early is the potential for helping us find Firefox bugs. We recently had an extension fail to update to Firefox 3 for no apparent reason. It was doing nothing different than when running in Firefox 2 and didn’t seem to hit any of the other know update issues.

Turns out, the extension adds a utility method to the Array prototype which worked fine in Firefox 2, but caused weird exceptions in Firefox 3. The exception ocurred in places where Firefox 3 added uses of for each on Arrays, which is a no-no. The problem didn’t show up in any tests because Firefox 3 doesn’t add anything to the Array prototype. We are fixing this in Firefox, but it could happen to other extensions if they use for each on Arrays. Perhaps the best advice is to always be defensive when dealing with things that could pollute the global namespace – shared by Firefox and all of its extensions.

New Datasources for XUL Templating [Part 3]

I have talked a bit about the new built-in datasources (XML and SQL) developers can use with XUL templating (guide and tutorial). I wanted to wrapup my little foray into XUL template datasources by also talking about custom datasources.

A generic framework for adding any kind of datasource (bug 321170) was created as part of the work to make the new XML and SQL datasources. Creating a custom datasource involves implementing 2 new XPCOM interfaces: nsIXULTemplateQueryProcessor and nsIXULTemplateResult.

With the help of Peter van Hardenberg (of Songbird), I got a simple JavaScript implementation working and available on MDC. The sample is fairly basic, but you could extend it to expose any kind of backend datasource.

ActiveState’s Open Komodo Project

Today ActiveState announced the Open Komodo Project, an initiative to create an open source platform for building developer environments. The project overview has lots of information on the details. Here is a good summary:

Open Komodo is not a product, but rather a code base upon which Integrated Development Environment (IDE) software packages can be developed. ActiveState’s Komodo Edit (free but not open source multi-platform, multi-language editor) and Komodo IDE (multi-platform, multi-language IDE for dynamic languages and Ajax technologies IDE) are existing, mature products that will use the Open Komodo platform.

In addition to the code base, the project will also start building a web development tool called SnapDragon:

The Open Komodo Project aims to create a full-featured web development tool for client-side web development integrated with Firefox©, Mozilla’s free, open source web browser, and based on the award-winning Komodo IDE. This new tool, codenamed Komodo Snapdragon, will be developed in collaboration with the open source community.

The project timeline gives information on how the project is expected to unfold. There seem to be many ways developers can participate in the project, including just lurking on the mailing list.

This project will provide some great open source code to the Mozilla platform for development tools. This is an area that many Mozilla developers feel is lacking and has been a much talked about issue for the new MozPad group as well. I look forward to a strong community forming around the project and using the code base to create many great developer tools.

Thanks ActiveState!

XUL Explorer 0.7

I finally pulled enough pieces together to get the next XUL Explorer release ready. Most of the new features in XUL Explorer 0.7 came from contributors which is cool. New in this version:

  • Application and Extension project wizards have much better error handling and validation. The code was restructured so both wizards share a common base class. Thanks to Matt Crocker for the patch.
  • Users can add external manifest folders to XUL Explorer. This is a great help when previewing a XUL file that references external chrome folders. Previously, an erro message would display (missing DTDs) or the XUL wouldn’t style correctly (missing CSS). Now, users can add the manifest folders to XUL Explorer using the Options dialog and the external manifest files will be included when previewing so everything looks right. Thanks to John Marshall for the patch.

    options-manifest.png

  • Autocomplete history lists were added to the Application and Extension project wizards to make it a bit easier to generate code to a previously used folder location. This feature was more about making autocomplete textboxes work and less about usability.

I had to stick with packaging XULRunner 1.8.1.3 (1.8.1 for Mac) because XULRunner 1.9 has a nasty bug that keeps the caret hidden in the editor window.

Download the latest version from here.

Update: I fixed the broken link to the Mac version on the MDC page.