Improved Open Source Testing Tools for Flex

Back in the early days of Flex there wasn’t much for doing unit testing, automated testing, performance testing, etc. Thanks to the community there are now numerous open source testing tools for Flex. Here are some recent updates you should definitely check out if you are building production Flex apps:

It’s very exciting to see these community driven projects continue to improve testing for Flex apps.

Tamarin-Tracing: Mozilla’s New VM for ECMAScript 4

[Update: QVM was an internal Adobe codename. The new VM’s name seems to be “Tamarin-Tracing”. For more info on this new VM read the announcement by Edwin Smith. Edwin doesn’t explicitly state that the VM is for mobile devices but it is hinted at. However the research paper that Edwin references does state that this tracing type of VM is good for mobile devices.]

The mobile space has been heating up lately with Apple’s iPhone, Google’s Android, and Sun’s JavaFX Mobile. But what about all of us developing with JavaScript 2.0 / ActionScript 3.0 / ES4? While we have been able to build for Flash Lite with Flash CS3, those of us developing with Flex haven’t had an easy way to use our existing programming knowledge to build mobile applications. Part of the reason for this is that the core language of Flex (AS3 / ES4) isn’t yet supported on mobile devices. The good news is that Adobe has just contributed a new VM targeted at mobile devices, to the Mozilla Tamarin project. Tamarin is the open source core of Flash Player 9 and will at some point be the VM in Firefox that executes JavaScript 2.0. More specifically AVM2 is the VM piece of Tamarin which executes ActionScript Byte Code (ABC). ABC can be created using the soon to be open source Flex SDK’s ASC compiler which turns AS3 (or ES4) into ABC. Unfortunately AVM2 wasn’t written to work well on mobile devices. So Adobe built Tamarin-Tracing – a new VM in Tamarin which is much better suited for non-pc devices. This is very exciting stuff!

Exchange MAPI Connector for Evolution

Just a quick note to say how excited I am that Evolution will be getting a MAPI Connector! I’ve been using Evolution with Exchange since 2003. Thankfully it works – but for me it crashes quite often. So I’m really excited about the prospect of a better Exchange connector. Screen scraping is just too brittle and too slow. This should also improve offline support. Currently before I get on a plane I sync Outlook in VMWare. That works but I don’t care much for Outlook and VMWare is a killer on my battery life. With this improvement to Evolution and the improvements that are happening with the video drivers on Linux, things are shaping up for Linux on the Desktop. Could 2008 really be the year of Linux on the Desktop? Just kidding. I’ve been happily using Linux as my primary Desktop since like 1996. It isn’t without some annoyances and required maintenance. But neither is any other OS. And at least with Linux it’s easier to fix stuff myself.

Ajax and Flex Data Loading Benchmarks

For close to a year I’ve been working (in my infrequent spare time) on an application that shows differences in data loading for RIAs (Rich Internet Applications), comparing Ajax methods, Ajax frameworks, and various Flex methods. The results are pretty surprising. The screenshot below is from a test run I did with the server running locally. (Note for the screenshot below: All tests except Dojo were 5000 rows, while the Dojo test was 500 rows.)

To run the benchmarks yourself, go to:
http://www.jamesward.org/census/

I have tried to be as fair as possible with these tests. Still, I encourage you to use these results only as an initial guide. You should always do your own benchmarks that more closely resemble your actual use case.

You can find more details explaining the tests and the results inside the “Guide Me” mode of the application, so I won’t go into depth here. Also, the code is Open Source (GPL) on SourceForge. If you feel that a test should be done differently or you find other things that you think should be changed, get the code, fix it, and send me a patch file. Please don’t just tell me I did something wrong. In the spirit of Open Source, help me fix it. I want this application to be as fair and accurate as possible.

While these results may be eye-opening to some, once you understand some fundamental differences between Flex and Ajax, they end up making a lot of sense. Flex applications run within the Mozilla Tamarin VM inside Flash 9. Tamarin does JIT compilation which makes code execution 10 to 1000 times faster than interpreted JavaScript in the browser. Also Tamarin can be very efficient when dealing with typed objects.

In addition, Flex supports a compact binary object serialization protocol, called AMF3, which is extremely fast. There are numerous Open Source implementations using various backend technologies for AMF3, as well as a commercial / supported Adobe product, called Flex Data Services. If you control both sides of the wire in your application, then there is rarely a good reason to serialize and deserialize text. Objects are blazing fast as you can tell by this benchmark. AMF3 is also typically much more efficient across the wire (even without compression) and consumes much less client side memory. JIT compilation and binary object serialization are the primary reasons why Flex AMF3 is so fast, even in the test with the full 20,000 rows. And, it’s not just faster for loading – it also speeds client side sorting and filtering. (Try client-side sorting in the Dojo benchmark and the Flex AMF benchmark.)

A quick note on compression: I did not include compression support in this version because its value really depends on many application-specific factors. For instance, if most of your users have slow connections then compression can help speed things up, but if most have fast connections the added latency can actually make things slower. However, I do want to add a Gzip option to this benchmark for the next release.

This is really a version 0.1 release. There are many improvements I have on the to-do list. And I’d love the community’s help. Here are some things I want to do for the 0.2 release:
– Add Gzip option on tests
– Add a Laszlo test
– Implement more Ajax frameworks that have DataGrids and that support paging and sorting
– Add a server side sorting option
– Add Ajax client side memory usage metrics (don’t know if this is possible)
– Improve the UI for use on projectors (I use this demo in every presentation I give)
– Integrate feedback I get from the initial version
– Maybe add a WPF/E test (which I won’t be able to do because I run Linux)

I sincerely hope that you find this demo useful. I built it as a tool to help people learn more about the various methods of data loading in RIAs. I did not in any way build this to attack Ajax, Dojo, and SOAP. Please help me improve this application so that we all continue to learn more about the technologies available to us.

Open Source Flex: Top 10 Reasons To Rejoice

Flex is going Open Source! This is really, really exciting news! I’ve been looking forward to this moment since before I worked at Macromedia. This will certainly change RIA programming in a major way. But what does this mean for you:
1) There will be a formal process for contributing to Flex.
2) Your voice is important. Join the Open Source Flex Google Group.
3) You aren’t locked into a single vendor’s monetization strategy. So is Flex now part of the “Open Web”? I think so.
4) More rapid innovation. Adobe has some really smart people. Combine those with a ton of other really smart people and we get better products, faster.
5) Adobe continues down the Open Source road. Tamarin was a huge step. Now Adobe takes another.
6) OEMs can more easily adopt Flex.
7) Open Source Flex can be redistributed.
8) Open Source Flex will further stimulate the already booming Flex ecosystem.
9) Flex is bigger than Adobe. Watch as many big organizations further invest in Flex.
10) Flex is going Open Source! ‘nuf said.

More information is available in the FAQ. Come join us! Together we will revolutionize the now-more-sexy “Open Web”! :)

Eckel Flex eSeminar; Buni Joins java.net; Twitter Addiction

Yesterday was an exciting day! Bruce Eckel and I hosted an eSeminar about Flex & Java. We had a few technical difficulties, but overall it was very good. You can watch the recording here:
https://admin.adobe.acrobat.com/_a227210/p16565134/

Bruce and I have a few more eSeminars coming up, find out more info here:
http://www.adobe.com/cfusion/event/index.cfm?event=detail&id=462539&loc=en_us

Also yesterday the Open Source Buni Meldware Communication Suite joined the Java.net community. This is a great step forward for the project, which uses Flex for it’s Webmail client. More info from Andy Oliver:
http://blog.buni.org/blog/acoliver/meldware/2007/02/28/Meldware-joins-Java-net

And lastly, while at the Adobe Engage conference, I gained a Twitter addiction. Please help me indulge my addiction and add me as a friend:
http://twitter.com/jlward4th