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 …

read more
February 12, 2010
Over the last few weeks I’ve been writing a server side web application framework for Erlang. Essentially, I looked at various available erlang frameworks like WebMachine, Nitrogen, BeepBeep, Yaws, ErlyWeb etc. and pulled out and assembled my own little framework with features I needed. I’ve also been writing an Erlang library for encoding/decoding AMF which will help me add some interesting Flash/Flex specific features to this framework.
Among other things this framework provides web server library specific request/response format abstraction similar to SimpleBridge, A Django templates implementation using ErlyDTL, an MVC implementation inspired from ErlyWeb and a lot more. Even with all this functionality I’m quite happy with the performance we’re able to achieve, so I thought I’d share some benchmarks with everyone.
Since the framework completely abstracts out the web server library used, I was able to try out various web options, but I think we’ll stick with Misultin for our production enviornment since it seems to perform significantly better than other implementations. Here are the results of running AutoBench on our framework powered by Misultin.
The server was running on an m1.large amazon instance running ubuntu and the tests was run from an m1.small amazon instance.
$ autobench --single_host --host1 xyz.com --quiet --low_rate 20 --high_rate 200 --rate_step 20 --num_call 100 -num_conn 5000 --timeout 5 --file results.tsv

read more