JavaScript

New Project: XULFolio

This XULRunner-based application will be used for managing an online photography portfolio.

Overview

Currently supports Zenfolio's API. I may add Flickr and SmugMug support in the future, I am striving to keep the interfaces abstract so that it will be easy to plug in to other sites by writing a simple API Compatibility Layer.

Update: SmugMug isn't allowing anyone to obtain an api key at this time. This puts them indefinitely out of consideration for this project. Also, Flickr could end up owned by Microsoft. I am strongly apposed to this acquisition and I do not intend to develop anything for a Microsoft-owned site. As long as this is a possibility, I won't be working on Flickr support.

Interesting Developments

  • I developed a simple JSON-RPC library in javascript which uses Mozilla's new native JSON support.
  • ZenFolio uses SHA-256 hashes for their challenge-response authentication scheme. This took quite a while to work out but once I figured out how to use nsICryptoHash then it all went pretty smoothly.
  • I created a CRYPTO.jsm module to wrap up the hash generation functionality. In the process I got to play with the awesome new JavaScript code modules feature in XULRunner. This is similar to creating an XPCOM singleton component, however, it's much easier to implement.
More...

Writing desktop applications with XULRunner and EXT

I have been experimenting with EXT JS in XULRunner. I'm using it to build yet another photo upload application, similar to some Firefox extensions that you may have seen such as Fireuploader. I don't have a lot of details to report, however, I really like using the EXT Javascript framework. It's a bit complicated at first but the interfaces that it produces are really slick. Once I have a working demo I plan to post it here as an example of what can be done with XULRunner and EXT. Stay tuned!

Dragging widgets (Undecorated XUL windows)


The following is a simple bit of code that can make a borderless window dragable, currently tested only on Linux. While this may not be needed in most X Windows Managers (due to alt-click dragability) it's still an important part of any desktop widget runtime. In WidgetRunner you can simply include this JavaScript file to provide the functionality automatically. More...

XHTML Applications and XULRunner

As much as I love XUL and the Mozilla platform, I would like to introduce a related topic that I think deserves a little bit of attention. Maybe everyone is aware of this already but I rarely see it mentioned so I would like to devote a few minutes to the topic of XHTML applications in XULRunner. It may not be completely obvious to everyone: XULRunner can do a lot more than XUL. Just about any technology which works on the web will work inside of XULRunner - you can develop applications that utilize HTML, JavaScript, SVG and even Flash (via the Flash Player plugin.) Some developers may feel that XUL is superior HTML for user interface design, however, there are a lot more people who are familiar with HTML and JavaScript.

More...