<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Philip Arkcoll</title>
	<link>http://people.knowledgetree.com/philip</link>
	<description>KnowledgeTree</description>
	<pubDate>Tue, 01 Apr 2008 21:49:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
	<language>en</language>
			<item>
		<title>Flex AIR Drop Box Prototype</title>
		<link>http://people.knowledgetree.com/philip/2008/04/01/flex-air-drop-box-prototype.html</link>
		<comments>http://people.knowledgetree.com/philip/2008/04/01/flex-air-drop-box-prototype.html#comments</comments>
		<pubDate>Tue, 01 Apr 2008 21:49:17 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Adobe]]></category>

		<category><![CDATA[AIR]]></category>

		<category><![CDATA[Drop Box]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Prototype]]></category>

		<guid isPermaLink="false">http://people.knowledgetree.com/philip/2008/04/01/flex-air-drop-box-prototype.html</guid>
		<description><![CDATA[In my spare time I&#8217;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&#8217;s.
The first was a drag-and-drop tool which, with the help of some great [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">In my spare time I&#8217;ve been working on a prototype for an <a href="http://www.adobe.com/products/flex/" target="_blank">Adobe Flex</a>/<a href="http://www.adobe.com/products/air/" target="_blank">AIR</a> Drop Box, based on the .Net <a href="http://www.knowledgetree.com/webcast/drop_box" target="_blank">Drop Box Beta</a> we recently released for <a href="http://www.knowledgetree.com/live/">KnowledgeTreeLive</a>. Being new to Flex and AIR, I started off slowly with a couple simple PoC&#8217;s.</p>
<p class="MsoNormal">The first was a drag-and-drop tool which, with the help of some great blogs on the subject, was surprisingly easy to implement:</p>
<p class="MsoNormal"><a href="http://blog.vixiom.com/2007/06/29/merb-on-air-drag-and-drop-multiple-file-upload/">http://blog.vixiom.com/2007/06/29/merb-on-air-drag-and-drop-multiple-file-upload/</a> <a href="http://blog.vixiom.com/2007/06/29/merb-on-air-drag-and-drop-multiple-file-upload/"><br />
</a></p>
<p class="MsoNormal"><a href="http://blog.everythingflex.com/2007/06/18/simple-drag-and-drop-air/">http://blog.everythingflex.com/2007/06/18/simple-drag-and-drop-air/</a></p>
<p class="MsoNormal">Next, was a basic SOAP-based tool to login and list the contents of the root folder. <a href="http://people.knowledgetree.com/conrad" title="Conrad's blog">Conrad’s</a> <a href="http://wiki.knowledgetree.com/Integration" target="_blank">documentation on using web services</a> came in handy here.</p>
<p class="MsoNormal">Logging in and retrieving the session key was straightforward:</p>
<p class="MsoNormal"><span class="MsoIntenseEmphasis"><em><font color="#3366ff">ws = new WebService();<o:p></o:p><br />
ws.login(&#8217;admin&#8217;,'admin&#8217;, &#8216;127.0.0.1&#8242;);</font></em><o:p></o:p></span></p>
<p class="MsoNormal">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):</p>
<p class="MsoNoSpacing"><span class="MsoIntenseEmphasis"><em><font color="#3366ff">ws.add_document.resultFormat = &#8220;e4x&#8221;;</font></em><o:p></o:p></span></p>
<p class="MsoNormal"><o:p></o:p>Then I had to figure out how to access content in the e4x result object:</p>
<p class="MsoNoSpacing"><span class="MsoIntenseEmphasis"><em><font color="#3366ff">var folderContents:XMLList = XMLList(event.result);<o:p></o:p><br />
myLabel.text = (folderContents..item)[1].title;</font></em><o:p></o:p></span></p>
<p class="MsoNoSpacing"><o:p></o:p>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 <a href="http://wiki.knowledgetree.com/Web_service_core_document_action" target="_blank">here</a>. It takes a little longer to run but improves performance on larger file uploads.</p>
<p class="MsoNoSpacing">Overall, Flex and AIR were easy to work with and, thanks to Adobe&#8217;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!</p>
<p class="MsoNoSpacing">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.</p>
<p class="MsoNoSpacing"> &#8211;</p>
<p class="MsoNoSpacing"><a href="http://kt-download.s3.amazonaws.com/customer-files/DropBox.air">Click here</a> to download the latest build. Please let me know what you think.</p>
<p class="MsoNoSpacing">Note that this is only a prototype, so I wouldn&#8217;t recommend using it on any documents you&#8217;re attached to ;).</p>
<p class="MsoNoSpacing">Known issues\limitations:</p>
<p class="MsoNoSpacing">* Documents are always dumped in the root KnowledgeTree directory;</p>
<p class="MsoNoSpacing">* No support for folders;</p>
<p class="MsoNoSpacing">* No way to resize Drop Box;</p>
<p class="MsoNoSpacing">* Occasional IO issues on Windows XP.</p>
<p class="MsoNoSpacing"><o:p></o:p>Some screenshots:</p>
<p class="MsoNoSpacing"><a href="http://people.knowledgetree.com/philip/wp-content/uploads/2008/04/dropbox.PNG" title="Drop Box Screenshot2"><img src="http://people.knowledgetree.com/philip/wp-content/uploads/2008/04/dropbox.thumbnail.PNG" alt="Drop Box Screenshot2" /></a></p>
<p class="MsoNoSpacing"><a href="http://people.knowledgetree.com/philip/wp-content/uploads/2008/04/dropbox2.png" title="Drop Box Screenshot"><img src="http://people.knowledgetree.com/philip/wp-content/uploads/2008/04/dropbox2.png" alt="Drop Box Screenshot" /></a></p>
<p class="MsoNoSpacing">&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://people.knowledgetree.com/philip/2008/04/01/flex-air-drop-box-prototype.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
