I’m excited to announce a new open source project created by SitePen and co-sponsored by Adobe: Queued. With Queued, you can manage your Netflix queue anytime, anywhere!

It’s no secret that we’re big fans of Dojo here. Since Adobe AIR provides a platform that integrates desktop features into the browser development model, it’s easy to see where our favorite JavaScript toolkit fits: it’s every bit the springboard in the AIR world as it is in the browser world. We designed Queued to show what the Dojo + AIR combo can do.

As a technology demo, our goals with Queued were pretty simple:

  • Open the Source
  • Showcase Dojo
  • Use the newest AIR 1.5 features like encryption, a local database, and offline capability

Queued does all of that. We’ve uploaded a screencast to YouTube to introduce it.

Here’s a little bit of technical detail on how we met these goals:

Open the Source

This one was very simple to execute. First, we put Queued on Google Code (under the New BSD License) for all the world to see and modify. Second, you can view the source right from Queued itself (see below).

Showcase Dojo

The entire Dojo toolkit contains much more functionality than any single application needs, so the task of building applications often comes down to figuring out what style of coding you’ll use rather than learning how to use different components and figuring out how to glue them together. For Queued, we ended up with:

  • a single HTML file for the main window
  • dAIR for Dojo/AIR integration (window handling, etc)
  • dijit for layout (BorderContainer and friends)—but only for layout; we wanted to show that you can build compelling experiences without having to include (or learn!) the entire toolkit
  • unobtrusive behavior implementation using dojo.behavior, which made it very easy for our design & CSS guys to be productive without conflicting with the JS guys (and vice versa)
  • dojox.dtl for most widget templating
  • drag and drop for queue re-ordering
  • various animations for polish
  • Dojo’s build system (we distill everything into a single dojo.js and qd.js for the production app)

Since Queued is as much a demonstration of Dojo as it is of AIR, we took special care to keep the code hackery to a minimum—in addition to simply working correctly, we needed the code to be 1) easy to follow and 2) instructive for developers interested in learning how a good Dojo app can be put together. Everything’s nice and organized.

Use the Newest AIR Features

We had a few technical requirements on the AIR side for things we needed to implement:

  1. Local Database. AIR provides an embedded SQLite engine, and Queued takes advantage of it to store just about everything the application receives from the Netflix API. We cache movie details, queue information, viewing history, star ratings, box art, etc. Most of this ends up in an encrypted database that gets created automatically the first time you run Queued.

  2. Encrypted Local Storage. Separate from the database engine, AIR provdes an encrypted key/value store useful for storing things like preferences or other low-volume data. Queued uses this as a secure way to store basic user details.

  3. View Source. Adobe provides a framework for adding View Source capability to AIR apps, and Queued makes this available in the Preferences area (you can see it near the end of the screencast).

  4. Automatic Updates. Queued lets you easily keep your application up to date by automatically checking for updates in the background and notifying you if there’s a newer version available.

  5. Offline. One of the main features of using the AIR platform over regular browser-based development, of course, is that you have built-in access to creating offline capability. When you’re offline, everything you do in Queued gets processed using the cache in the local database and stored to a transaction queue for later; when you connect, Queued recognizes that you have changes pending, and it gives you the option of synchronizing those changes out to Netflix or simply discarding them.

Go Check It Out

We’re proud of Queued—it looks great and it works great.