FamilyWheel now available as an Apollo download
April 15th, 2007
Two related dilemmas exist with the browser-based version of FamilyWheel, both not uncommon to rich internet applications:
- Local files are off-limits. Importing a user’s selected GEDCOM file works by uploading the file to the bcdef.org server using a PHP script. This is cumbersome to the user, and introduces unnecessary complexity from a developer standpoint. Additionally, this is unlikely to scale reliably unless all imports are written to the server with unique filenames.
- Neither is exporting back to the user’s machine a trivial affair. Analogous to the import process, the new GEDCOM file could be written to the bcdef.org server and then trigger a browser download. Currently, FamilyWheel sidesteps this issue by asking the user to copy and paste a TextArea into a new file. Hardly a polished user experience.
Of course, there is a new alternative in town: Apollo. Converting a browser-based application to an installable application resolves both of these dilemmas. Security restrictions of the browser sandbox no longer apply; the user’s local files can be modified without resorting to external scripts and server uploads.
And since FamilyWheel is already written in Flex, the conversion to an Apollo application is relatively straightforward. FileReference instances and URLRequest uploads swap out nicely for instances of the File class of the new Apollo API.
Simple enough!
Here’s the AIR package which will allow you to install FamilyWheel locally. Note that you’ll need to install the alpha of the Apollo runtime from Adobe labs beforehand.
EDIT: Just to clarify the new functionality, pressing “Export” will save an export.ged file to your desktop (overwriting if necessary).
EDIT: This will not work with the public beta of AIR. I will update FamilyWheel to support the next beta release.
EDIT: FamilyWheel is now an AIR Beta 2 installer.
Genealogy Application in AS3: FamilyWheel
December 19th, 2006
One of my Christmas gifts to the family this year is to _finally_ go through the drawer full of photos and grandparents’ scratches of relations, and turn it into something more permanent.
There are many applications out there, particularly on Windows, that allow you to do much the same. But I’ve found them to be a creaky lot with roughly the visual appeal of Microsoft Access. And on other operating systems the options are scant. So I took the opportunity to familiarize myself more with Flex and AS3 and build my own parser of GEDCOM (the standard genealogical database format).
The greatest challenge may well have been conceiving of a way to present a family tree on a computer screen in a way that wasn’t a rectangular vastness, the way most family trees appear. With some Scotch tape, lots of paper, and a large enough dining room table, this information design is bearable, but the same cannot be said for fitting the family tree on the screen of a Macbook.
At one point I was playing with the AS3 drawing API when I realized that a circle could be divided into an infinite amount of parts, dividing each arc into two parts (representing father and mother) in the subsequent ring. Ultimately, I realized not only was this space conscious, but also more connected to the mental image of a family “tree”.
I’m sure someone’s thought of this schematic somewhere, but I didn’t see anything resembling this structure until I came up with a name for the application, Family Wheel. When searching around for where this phrase may have been used, I found a fascinating circular hand-drawn chart of descendants, about a century old.
The concept was born, and, as many Flex developers have come to expect, the visual part followed quite easily. I’m amazed at how effectively ActionScript 3.0 averts the roadblocks I would encounter in AS2. If anyone’s counting, here’s another convert to doing any and every ActionScript project in AS3.
And I’ve decided I want to offer this to everyone else too, so Happy Yule to y’all! Just keep in mind this is a work in progress so don’t overwrite your GEDCOM files unless you’re sure the export has functioned correctly.
You can try it out here. If you’d like a sample GEDCOM, or to know more details about integration with Flickr as well as other genealogical apps, read up on it at the project page.
Douglas Adams’ Thoughts on Hyperland in 1990
December 11th, 2006
Came across this quite lengthy, but worthy, video yesterday and thought it was worth a share. If you can spare 40 odd minutes, you might enjoy reflecting on how the Internet has and has not met the aspirations of the creator of Hitchhiker’s Guide to the Galaxy:
Link on Google Video (since I can’t get the embed to work at the moment).
New event for AS3: FileReference uploadCompleteData
December 9th, 2006
Just a full post from a comment to the previous: Player version 9.0.28.0 includes a little known AS3 update: the FileReference class now dispatches an event not only after an upload is complete, but also after fully downloading a server response to an upload.
I’m sure this could be used in several creative ways, but first to mind: a server script’s success/error report can now be handled direclty in ActionScript and communicated to the user.
Or, one step further, you can tie into server scripts written in other languages, i.e. PHP or Ruby, that process asynchronous requests externally and return value(s) that can then be used to add functionality to your ActionScript application.
Formal documentation should arrive with the next authoring release, but to use this functionality for now, add an event listener to “uploadCompleteData”. Your callback function will receive an event with a “data” property that contains the server’s response. For example:
myFileReference.addEventListener("uploadCompleteData",callbackFunction);
myFileReference.upload(new URLRequest(PATH_TO_YOUR_SCRIPT))
function callbackFunction(e:*):void {
trace(e.data);
};
For public applications, be sure to detect the client’s player for the 28 minor release.
