Posts filed under 'Uncategorized'

Flex AIR Drop Box Prototype

In my spare time I’ve been working on a prototype for an Adobe Flex/AIR Drop Box, based on the .Net Drop Box Beta we recently released for KnowledgeTreeLive. Being new to Flex and AIR, I started off slowly with a couple simple PoC’s.

The first was a drag-and-drop tool which, with the help of some great blogs on the subject, was surprisingly easy to implement:

http://blog.vixiom.com/2007/06/29/merb-on-air-drag-and-drop-multiple-file-upload/

http://blog.everythingflex.com/2007/06/18/simple-drag-and-drop-air/

Next, was a basic SOAP-based tool to login and list the contents of the root folder. Conrad’s documentation on using web services came in handy here.

Logging in and retrieving the session key was straightforward:

ws = new WebService();
ws.login(’admin’,'admin’, ‘127.0.0.1′);

I had some issues interpreting the results of the get_folder_contents() call. Initially, the call was returning a null object. To resolve this, I had to set the result type to ‘e4x’ (I suspect that this may have been a bug in Flex beta3):

ws.add_document.resultFormat = “e4x”;

Then I had to figure out how to access content in the e4x result object:

var folderContents:XMLList = XMLList(event.result);
myLabel.text = (folderContents..item)[1].title;

Once I had drag-and-drop and KnowledgeTree web services down, the Drop Box was relatively simple to implement. Conrad recommended that I use the 2-phase upload mechanism, detailed here. It takes a little longer to run but improves performance on larger file uploads.

Overall, Flex and AIR were easy to work with and, thanks to Adobe’s slick UI widgets, I think that the prototype ended up looking more like a final product than a throwaway. I implemented the Drop Box on Windows XP and was pleasantly surprised to find that it worked on Mac OS X Leopard, without any tweaking whatsoever!

Lastly, I found KnowledgeTree web services well-suited to developing thin clients of this sort and am excited to see how our community makes use of this interface.

Click here to download the latest build. Please let me know what you think.

Note that this is only a prototype, so I wouldn’t recommend using it on any documents you’re attached to ;).

Known issues\limitations:

* Documents are always dumped in the root KnowledgeTree directory;

* No support for folders;

* No way to resize Drop Box;

* Occasional IO issues on Windows XP.

Some screenshots:

Drop Box Screenshot2

Drop Box Screenshot

 

Add comment April 1st, 2008


Calendar

July 2008
M T W T F S S
« Apr    
 123456
78910111213
14151617181920
21222324252627
28293031  

Posts by Month

Posts by Category