JavaScript
The ultimate embedded MP3 player: SoundManager 2 and hAudio
Tonight I implemented this MP3 player for my band's website using SoundManager 2 and minimal support for the hAudio Microformat.
More...New Project: XULFolio
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.
Writing desktop applications with XULRunner and EXT
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...