AirDB

AirDB is a client-side ActionScript ORM for Adobe AIR. It is being used for several projects and is available here at github.

Please look at the AirDB Quick Start Summary.

Here is an Adobe AIR Cookbook entry for AirDB.

Here is the com.memamsa.airdb package documentation

Please read on for the background and genesis.

We are building a web-aware desktop app using Adobe AIR, which stores persistent objects and their relationships. Thankfully, AIR includes support for SQLite databases.

Over the years, I have written several applications interfacing with databases in myriad ways. From the venerable Berkeley DB using C, the obscure Codebase in C++, the transposable alphabet-soup that is Microsoft DAO and ADO, the factions of Perl::DB, PHP sql_execute, and of course, ActiveRecord in Ruby.

As my co-worker used to say, nothing beats straight SQL if you are clear on what you want, don’t care about elegant abstractions and don’t mind copy-pasted repetitious code. We finally hit a happy balance when we used ActiveRecord. I got elegant object methods, which he crafted using finder_sql and jacked up select clauses for high performance queries.

Compared to ActiveRecord, working with SQLite in ActionScript was a huge step backward. I know enough Javascript to ponder the possibilities.

So I sat down and wrote an ActionScript ORM by combining principles from DataMapper and ActiveRecord.

Here are all the blog posts highlighting key features, design decisions and updates for AirDB.

This page has been updated to reflect latest status.