Tokyo Developer Conference Wrapup

tokyo-dev-conf.jpg

Mozilla-Japan (Chibi, Kaori, Gen and everyone else) did a great job putting together the developer conference. I think we had over 150 attendees and over 25 presenters.

It was the first time I attended a non-English conference. However, the translators did a great job. Even during my own presentations, the translators were doing simultaneous translation during the Q&A. It was incredible.

I really enjoyed the Extension Lightning Talks and the Extension Developer Environment sessions. The Japanese presenters were not only extremely talented developers, but they also did a great job making the presentations very entertaining. They were obviously trying to “one-up” each other during the presentations and did so with great flare, showmanship and the occasional practical joke. The translators could barely keep up! I want to talk more about the kinds of extensions presented and the extension developer community in a future post. Its a very rich and dedicated group of people.

I have had a great time in Tokyo. There has been lots to see and do and eat and drink. It’s a great city and 4 days was too short to explore. Thanks to Kaori and Gen for showing us around the city, it was a lot of fun.

XUL Explorer – 0.4 Finally

We’ve been pretty busy around here with various sorts of things, but we finally got enough time to get XUL Explorer (XE) 0.4 out the door. XE 0.4 has some neat features that we hope will help Mozilla platform developers (extensions and applications) be a little more productive. The highlights include:

  • DOM Inspector and Venkman (JS Debugger) extensions are integrated into XE. You don’t need to mess around trying to install them. They are pre-packaged for your debugging enjoyment.
  • Extension project wizard walks you through the process of creating a Firefox extension. The wizard has options for various types of extension UI’s so you can support toolbar, menu, sidebar and context menu overlays. The extension files are generated using a simple template system, so it should be easy to tweak and add more features.
  • Simple extension testing allows you to pick an extension source folder and quickly run/test the extension in Firefox. No need to manually package and install the extension.
  • A simple XML/XUL formatter helps cleanup your code and there are a few more links to online documentation at the Mozilla Developer Center.

The extension wizard and extension tester are definitely not finished (see roadmap). The extension tester has a few planned usability improvements. The extension wizard has some general improvements coming and many new features. One improvement is support for more targets, including Thunderbird and XUL Explorer. Only Firefox really works now. Another feature is stubbing out handlers for common events, such as when a page loads in the browser.

Once the template based stabilizes for extensions, wizards are planned for XPCOM components and XULRunner applications. We’re very much interested in your feedback as well. So if you can stand using alpha software, give XE a spin and let us know what you think. What’s good, what stinks, what would make a good feature – whatever.

Big thanks to Cesar Oliveria and Paul Medlock for pitching in. Also thanks to Ted Mielczarek for the head start.

Install (Windows): xulexplorer-0.4-win32.exe 5.2MB
Install (Linux): xulexplorer-0.4-linux.tar.gz 9MB
Install (Mac): coming soon
Source: SVN
Bugs: New or View

Developer Conference – Tokyo

The schedule for the Tokyo developer conference is really coming together. I’ll be giving separate presentations on FUEL and XUL Runner with some moderated Q&A. There seems to be a lot of sessions on various aspects of extension development. From tutorials and development environments to AMO submission and reviewing. There will also be several lightning talks from various extension authors. I am interested to see how the “extension dissection” session turns out. The session will be devoted to discussions of how various extension “do” what they “do”.

Oh yeah, Shaver will be giving the keynote.

[Mark is really on vacation]

Firefox 3 – Bookmarks and Extensions

Currently, I am adding bookmark wrappers to FUEL 0.2 using the new Places API. As I do, I am just struck by how much functionality is exposed by the new API. Accessing bookmarks is a common request for extension developers. The old bookmark service isn’t as easy to use (IMO), mainly due to the amount of RDF that is seeping out of it. The new bookmarks and annotation services are very straight forward and clear. Here are some of my highlights so far:

  • Updating bookmark properties is really easy.
  • Using bookmark observers to notify you whenever a bookmark is added, changed, visited, moved or removed.
  • Creating annotations to attach data to pages and bookmarks.
  • Navigating the hierarchy of bookmarks is really easy.

No RDF in sight.

XUL Explorer – New and Notable

Status

Cesar and I have been working on stuff from the feature plan. The XUL Explorer trunk has support for DOM Inpsector and Venkman (JavaScript debugger). Future releases will bundle those extensions with XUL Explorer. Cesar has a patch for adding extension testing support. I have the basics of an extension generation wizard in place. Both of those features will be in the next release too.

It was pretty nice to be able to use Venkman to debug some of the extension wizard code.

Paul Medlock has been sending in some patches too. He sent in a XUL formatter to keep the source code pretty in the editor. He also sent in some intellisense-like features for XUL. We are running into some of the limitations of the Mozilla editor in the process.

Contributing

Contributing to XUL Explorer just got easier. A bugzilla component for XUL Explorer was added recently. You can now use bugzilla to file bugs or submit patches. Here are some useful links for contributing:

Feedback, bugs and patches welcome.

Firefox 3 – Bookmarks on Places Lands

Big news for those of you following Firefox 3 development. Places, the new backend implementation for bookmarks and page history, landed last night and will be ready for Firefox 3a5. Here’s an overview from the Places developers page:

Places is a re-write of Firefox’s bookmarks and history system. It aims to have significantly more flexibility and the ability to have complex querying. It also includes some new features such as favicon storage, and the ability to annotate pages with arbitrary information. It also includes a lot of new UI.

In addtion to the new features and UI this will allow in Firefox 3, it also gives extension developers a more powerful API for use in extensions. Places uses sqlite and the mozStorage to store bookmark and history data. Besides history and bookmark APIs, annonations, favicon and livemark service APIs are also available.

Dan Mill’s Mozillazine post has information about the upgrade and is a place where users can provide feedback.

So long mork. Mook and Mano corrected Mark about Mork.

XUL Explorer Status

Its been a while since XUL Explorer has been updated. However, I have been using it more than ever and I have been keeping a list of things that I’d like to see added. The good news is XUL Explorer is now hosted in Mozilla’s SVN repository. More good news is we created a wiki page to help track and guide development. Even more good news is that Cesar Oliviera has joined Developer Relations as a summer intern to help work on developer tools.

We are currently working on adding Venkman (JavaScript debugger) and DOM Inspector to the XUL Explorer bundle. Cesar also created a Linux tar bundle, so installing on Linux will be easier.

Feel free to use the wiki Talk page to discuss XUL Explorer features and roadmap.

ClickOnce Deployment in Firefox

ClickOnce is a Microsoft deployment mechanism for WinForms and WPF applications that works great in Internet Explorer. Thanks to an extension, you can also get ClickOnce applications to work from Firefox too. FFClickOnce was created by James Dobson. Check out the homepage where James describes what it does and how it works very nicely.

In this silly season where many people are racing to download and run WPF applications, this extension will make it easier.

[via Scott Stanfield – who does a great job evangelizing Firefox]

FUEL Project Status – 0.1 Lands

FUEL 0.1 landed on the trunk yesterday. Progress had slowed since the last update mainly due to John and I having so many other balls in the air. For those intrepid enough to play with 0.1, you can use the API on the wiki and the code in the unit tests as examples.

The wiki has the plans for 0.2, which should have more features for extension developers to use. The Browser and BrowserTab helpers alone should make life easier.

XUL Clippings – Midas Rich Text Editor

How to create a rich text or HTML WYSIWYG type editor in Mozilla has come up a few times so I thought a post was in order. Mozilla has a rich text editing system (called Midas) and an API similar to Internet Explorer’s. Mozilla, like Internet Explorer, supports the ability to make an entire document editable by setting the designMode property of the document object. Once in design mode, the document can be manipulated using various DHTML commands.

The API for interacting with the document is:

  • document.execCommand – Executes the given command.
  • document.queryCommandEnabled – Determines whether the given command can be executed on the document in its current state.
  • document.queryCommandIndeterm – Determines whether the current selection is in an indetermined state.
  • document.queryCommandState – Determines whether the given command has been executed on the current selection.
  • document.queryCommandValue – Determines the current value of the document, range, or current selection for the given command.

The most typical way to create a rich text editor in a XUL document is to use the element. In an HTML document, you would use the

You use JavaScript to turn on design mode:


var editor; /* global var */
function onload() {
  editor = document.getElementById("edit");
  editor.contentDocument.designMode = "on";
  setTimeout(function() { editor.contentWindow.focus(); }, 100);
}

window.addEventListener("load", onload, false);

You use the API to send commands to the document:


function toggleBold() {
  editor.contentDocument.execCommand("bold", false, null);
}

function toggleItalic() {
  editor.contentDocument.execCommand("italic", false, null);
}

function alignLeft() {
  editor.contentDocument.execCommand("justifyleft", false, null);
}

function alignRight() {
  editor.contentDocument.execCommand("justifyright", false, null);
}

I found a document that discusses the differences between the Mozilla and Internet Explorer rich editing systems.

I created simple XUL and HTML clippings to demonstrate the system. You can open the HTML clipping in a Mozilla compatible browser. You can download the XUL clipping and open it in XUL Explorer. Right-click on the link and pick “Save Link As” to save it to your machine.

midas-editor.xul
midas-iframe.html