Quality Reads

Saturday, July 28, 2007

Ning :: Full Source Access

API's are great from a security standpoint but creativity takes a backseat in the process. What happens when you come up with an idea/concept that the original developer never thought of? With a standard web service, nothing. With Ning, you can write your own API .

http://www.ning.com/help/faq-developers.html

Perhaps I'm blurring the truth a little bit. Ning doesn't really provide an "API" like other web applications, they've created an application layer that ANY community user can edit. Their API is exposed via PHP, a very untraditional approach to open development that begs the question: if Ning can do it, why can't you? or me? or Google?

If you could provide all your company's information/resources in a system like Ning, would you?

Thursday, July 26, 2007

Drag & Drop in AIR

I just ran into a great article by Alastair outlining the use of Native Drag & Drop functionality in AIR (w/ a little RoR mixin). The documentation for Native D&D is very spotty, there are more mistakes then anything else. So, if you haven't learned the hard way yet, let me make your life a little easier: http://blog.vixiom.com/2007/06/29/merb-on-air-drag-and-drop-multiple-file-upload/

Here's a simple test application you can use to get started:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init(event)">

<mx:Script>
<![CDATA[
import mx.events.DragEvent;
import flash.desktop.DragManager;
import flash.desktop.DragActions;
import flash.events.NativeDragEvent;
import flash.desktop.TransferableFormats;
import flash.filesystem.File;

private function init(e:Event):void
{
//add the event handlers
this.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER, onEnter);
dropPanel.addEventListener(NativeDragEvent.NATIVE_DRAG_DROP, onDrop);
}

public function onEnter(event:NativeDragEvent):void
{
//Check to see if the drag item is the right format
if(event.transferable.hasFormat(TransferableFormats.FILE_LIST_FORMAT))
{
DragManager.acceptDragDrop(dropPanel);
}
}

public function onDrop(event:NativeDragEvent):void{
trace("dropped");
// Cast the drag & drop data as an array
var files:Array = event.clipboard.dataForFormat(flash.desktop.ClipboardFormats.FILE_LIST_FORMAT) as Array;
for each (var f:File in files)
{
// check out the file URL
trace(f.url);
}
}
]]>
</mx:Script>

<mx:Panel id="dropPanel"
top="10"
left="10"
height="100"
width="100"
title="Drop Files Here"
backgroundColor="#FFF">


</mx:Panel>

</mx:WindowedApplication>



Also worth a read: http://coenraets.org/blog/2007/06/air-to-desktop-drag-and-drop-two-simple-utility-classes/

I'll let you know why I'm reading up on D&D in a couple days :)

Cheers,
Todd

***Updated for AIR Beta 2***

Sunday, July 22, 2007

CT-CFUG Presentation

Just a quick heads up. JB and I are giving a presentation on Adobe AIR at the Connecticut ColdFusion User Group on Tuesday night (July 24th, 2007). If you're in the area and up on technology, you might want to think about stopping in for our jam session. I hear there's going to be some free Adobe swag in it.

Cheers,
Todd

Thursday, July 19, 2007

Nokia Didn't See This Use Case Coming

Adam Prestin pointed me to this crazy picture earlier today and I had to re-post it.

No this phone wasn't modded out by some MAKE afficionado. Its actually a terrorist/insurgent/{insert political spin here} bomb timer from Iraqi, apparently a very common one too.

Its a good thing they missed the call.

(Thanks Adam)

Bubblemark Animation Test Confirms It

Alexey Gavrilov compiled a nice set of performance tests for all the major RIA development platforms (Flex, Silverlight, JavaFX, AJAX). Flex (aka Flash) performed like a champ in the browser arena, which isn't horribly surprising considering how long its been around. Both Flex & Actionscript are up to, or on the way to, version 3.0 and Flash is rocking numero nine. I do have to admit that I'm impressed by Microsoft's progress on Silverlight. After the Flex 2.0 release, they must have recognized the enterprise level development capabilities that Flex brought to the table and jumped right on the issue. If they had taken a look at the crazy flash apps Pier was doing back in 2001, they might have foreseen this RIA trend long in advance.

Here are a couple surprises:
  • JavaFX is 4.4 times slower than Flash.
  • Firefox + Silverlight (CLR) — 99 fps
  • Flex and AIR peform at the same speed (as I previous reported)
While it looks like Silverlight is going to be a strong contender from a performance standpoint, I'm going to hold my opinion until they release the first non-Windows version.

Check out the complete results here.

PS- I also enjoyed reading Alexey's initial experiences w/ Flex. I distinctly remember dealing with each one of the issues he mentioned. Good times.

Thursday, July 12, 2007

There's an Advanced DataGrid!?!

I guess in all the excitement surrounding Adobe AIR, I missed out on a huge feature available in Flex 3, the Advanced DataGrid.


If you're working w/ alot of data in your Flex/AIR applications like I am, you need to check this component out. It may just save your life/sanity.

Here are some of the main features:
  • Multi-column sorting
  • Tree View (basically a tree component mashed into a DataGrid)
  • Cell Formatting
  • Summary Collections (allows you to perform a calcuation on the DataGrid columns and output a result)
  • Column Grouping
Seriously, half the work I'm doing right now could be handled with this component. Check out some of the details here or the Flex 3 docs here. This is the type of great stuff I expect from the Flex team. Now if we could only get the CS3-to-Flex skinning integration to work properly everything would be brilliant.

Cheers,
Todd

Tuesday, July 10, 2007

Performance in AIR


If you're like me, you might have thought that Adobe AIR (formerly Apollo) would provide a more powerful computing platform for desktop RIA development. Well, you'd be wrong. After running a number of performance tests ranging from long-running financial calculations to CPU intensive UI effects, AIR and Flex executed at approximately the same speed (~2% in favor of Flex -- insignificant).

While I must profess a little disappointment, I don't think its a huge downside of the platform since Flash provides so many other core competencies. However, you need to take it into account whenever you are about to perform a lengthy IO operation. The user interface will freeze up when saving/generating multiple files. At Pier, we've been popping up a modal window just prior to all IO ops to keep the user from trying to interact w/ the UI during the freeze.

My suggestion is take the time to setup you IO framework so you don't have to code a custom modal on every operation.

Cheers,
Todd