May 29, 2010

I haven’t talked much about our startup project factors on this blog yet, but you will hear more and more about it from me over the coming weeks. Today, we’re open sourcing a very small but quite interesting part of the factors web client code. The client is built mostly in AS3 using an in house framework we call crayons. Crayons provides an application architecture as well as a library of user interface components along with a component architecture, you could think of it as a mixture of functionality provided by flex framework and cairngorm, but several times lighter since it only implements functionality we need for factors and doesn’t try to be too generic.

Among other things Crayons has a built in data binding framework which we’re open sourcing today. Data binding in crayons in based on Signals where an object dispatches a specialized ChangeSignal whenever a bindable property changes, for example the setter of a bindable property data in SomeModel object would look like this … read more

April 2, 2010

Update: Troy Gilbert suggested a much better solution for this in the comments below that uses -frame compiler option over the [Frame] metadata tag, I suggest you use his approach since it stops the compiler from bundling in Flex framework specific code like IFlexModuleFactory that you don’t really need.

Update: Troy further improved his class here

***

Today, I needed to create a preloader for a pure AS3 application compiled with mxmlc. I couldn’t find much documentation on the topic but this post by Keith Peters describes the solution in good detail, except his post is some what old and the code there doesn’t work with the latest compiler..

As Keith describes, the first thing you need to do to implement a preloader is move your application to the second frame of the movie, this is done by adding a [Frame] metadata tag above your document class and providing it with a factory class that will initialize your application, in case of Flex this factory is mx.core.SystemManager .. read more

March 17, 2010

SWF Machine is an Erlang program I’ve been writing, to generate SWF files from Erlang. This program takes a custom instruction set as input and generates SWF binary instructions, which once saved in an SWF file can be run in the Flash Player, here’s a quick demo of SWFMachine in action …

A similar attempt by Takashi Yamamiya and the eswf library on google code were quite helpful in getting me started, so thanks to them for sharing.

February 28, 2010

I found a digital copy of Williard C. Brinton’s 1939 book “Graphic Presentation” via twitter and as I read through the book, it amazed me how little our data visualization techniques have evolved since Brinton wrote the book 70+ years ago. What was even more fascinating was this quote from the preface to the book by Henry D. Hubbard who worked for the U.S, National Bureau of Standards …

“There is a magic in graphs. The profile of a curve reveals in a flash a whole situation —the life history of an epidemic, a panic, or an era of prosperity. The curve informs the mind, awakens the imagination, convinces.

– Henry D. Hubbard

These words so aptly describe the power of visualizing data.

Here are some interesting snapshots from the book, which I highly recommend checking out …

snapshot from Williard C. Brinton's 1939 book Graphic Presentation
read more

January 24, 2010

I had the opportunity to present a 4.5 hr lecture on Building Rich Internet Applications at ACM’s Compute 2010 today. We started out by defining what an RIA is and exploring the various RIA platforms available, we then further explored the Flash Platform in more detail, wrote some experimental code to understand the internals of Flash Player, looked at Flex 4 and its various new features and also spent some time understanding the Flex Component Lifecycle

Here’s the slide deck from beginning of the lecture which tries to define what an RIA is and explores the architecture a typical RIA platform …