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!

Flash Player 9 Update 3 Sim-Ships on Windows, Mac, and Linux

Yesterday was a monumental day for Flash Player. For the first time ever, a major release of Flash Player was simultaneously shipped for all three of the major operating systems - Windows, Mac, and Linux! This illustrates Adobe’s commitment to being truly cross-platform. There isn’t a ubiquitous platform in existence that is as committed to cross-platform compatibility as Adobe is with Flash Player. This is one of the things I love about Flash Player. Sun promised us “Write Once, Run Anywhere” with Java and yet they have never been able to really deliver it. Theoretically maybe, but in reality how many Java apps / applets do you see with the breadth of use that Flash Player has? Despite Java’s disappointing failure of true ubiquitous cross-platform compatibility I am hopeful that the OpenJDK will fix this. The OpenJDK does seem to be fixing the recent problem of Java 6 not being available on OS X.

Congrats to the Flash Player team! This is a significant milestone that everyone benefits from!

For those of you building Flex applications you can download the debug versions of this new release here. Also there is more information about all the great new features and bug fixes in this release on Tinic’s blog, Mike’s blog, and Emmy’s blog.

What is a Rich Internet Application?

The more software experiences become like the natural world the more users are pleased with those experiences. One of the most powerful, understandable, and universal concepts in computing is the idea of a desktop containing files and folders. Users embraced this metaphor in their software because it modeled their natural world experience.

There is a paradigm shift underway. In this shift, developers are creating user interfaces which more closely model the natural world. Since 2002, the term used to describe these types of software applications is “Rich Internet Applications”, or RIAs. Technologies like Ajax, Flex, Silverlight, Adobe AIR, and JavaFX are growing in popularity as this shift to RIAs gains momentum.

But what is an RIA? Answering that question is like trying to answer “What is a tree?” You may be able to identify an RIA or a tree with certainty when you see one, but coming up with an exact definition can be very difficult. In cases like this, the best one can do is to identify some of the fundamental characteristics that the term encompasses.

When you break down the phrase “Rich Internet Applications”, you find that “Internet” and “Applications” are well understood. It’s the “Rich” aspect that makes RIAs interesting, and it’s the “Rich” aspect that requires a fuller explanation. Essentially, a Rich Internet Application is capable of delivering a rich experience to the user. It is the richness of the experience that is often enhanced by making software that is more natural – more connected, more alive, more interactive, and more responsive.

Connected

We are all connected. On this relatively small planet we all have many things in common. We communicate with one another via many different methods, in many different languages, sometimes easily and sometimes with difficulty. Likewise RIAs are built on a network that connects us all - the Internet. RIAs use this network of billions of connected pieces to help us communicate - between each other and between systems, sometimes easily and sometimes with difficulty. And like each of us, in some scenarios RIAs need to be able to work when disconnected from the Internet.

Alive

Movement and the passing of time are critical to our experience of beauty and the emotional reaction we have to it. Watching waves continuously crash on a beach is an experience which fills us with life. Similarly, we would not sit and watch a beautiful sunset for very long if it never changed. In RIAs, we create rich experiences by modeling the movement and beauty we find in the natural world. Smooth sliding transitions, zoom effects, soft blurs, drop shadows, and rounded corners are elements of RIAs which help make software feel more like the natural world. Beauty is often simple and never overdone. Software that feels more alive evokes an emotional response from us. That emotional response can help to improve our overall satisfaction with the software. RIAs should feel alive.

Interactive

When people communicate they interact — sometimes physically, sometimes audibly, and sometimes visually. Interaction is how we transmit and receive information. The richness of an experience is heavily dependent on this interaction made possible by our senses. RIAs facilitate physical, audible, and visual interaction. Many new devices are allowing for more natural methods of physical interaction. Multi-touch interfaces like tablet PCs and media players are becoming more common because users want to interact with software like they interact with objects in the natural world. Many more software applications are also adding video and audio capabilities, and some of these applications support bi-directional multimedia interaction. This allows users to interact visually and audibly in the context of an application. Imagine filling out a form online and, if needed, being able to interact via webcams with someone who can help you complete the form. Applications which embrace interactivity to that level are helping to bring natural world interactivity to software experiences.

Responsive

In the real world when people interact with each other or with objects like rocks and trees, those things typically respond quickly. If I kick a rock it immediately moves, unless it’s a big rock in which case my foot immediately hurts. If someone speaks to another person they expect a timely response. At a baseball game, you can see scores whenever you want, just by looking in the right place. Too often in the world of software people are forced to wait for their computers to respond. Whether due to network connectivity issues, processing limitations, or other problems, software too often makes us wait. Most web applications leave users waiting for at least four seconds every time the user clicks on something. With many applications the wait times can be significantly longer, even on a broadband connection. Imagine what an everyday conversation would be like with that latency. Real-time streaming, high performance client side virtual machines, and local caching mechanisms are becoming in integral part of RIAs because these technologies reduce latency, increase responsiveness, and make software feel more like the natural world.

Natural Software Experiences

All kinds of software applications — from ERP business applications to word processing applications — are embracing the characteristics of what we now call Rich Internet Applications. This move is happening because users intuitively want to experience software like they experience the natural world.

Rich Internet Applications are proliferating because they are more connected, alive, interactive, and responsive than yesterday’s software. In ten years nearly all software will be what today is called a Rich Internet Application. But in ten years it will be only natural to just call it “software”.

Flash 9 Now at 93.3% Adoption

Emmy Huang just posted a note about the Flash adoption statistics as of September 2007. Flash 9 is now at 93.3% adoption! This is great news for Flex developers! If you develop with Flex 2 or the upcoming Flex 3, 93.3% of your visitors can run your applications without any hassle of having to update Flash. Now why haven’t Sun and Microsoft published their statistics so that developers are able to compare the adoption of the different RIA platforms?

Flex & Flash as Competitors to Java?

As previously discussed, my friend Joshua from Sun recently blogged about how the consumer JRE will take market share from Flash in 2008. Today Sameer Tyagi , also from Sun, blogged about problems with using Flex to front-end JAX-WS. Both posts seem to insinuate Flash and Flex as competitors to Java. Yet for me Java and Flex have always been a perfect match.

The continued success of Flash and Flex only helps to better position Java in the enterprise. Adobe is not a threat to Java’s continued dominance on the server. In fact many Adobe enterprise products are built on the Java platform including Flex Data Services. If you must have an enemy then I suggest targeting those who actually have something to gain by Java losing market share in the enterprise. That is definitely not Adobe.

As I’ve said elsewhere, Java and Flex developers should be working more closely together to make building RIAs easier for developers and to make experiencing those applications better for end users. Both technologies have similar values when it comes to openness, free tools and runtimes, and cross platform support. And the areas in which Java and Flex overlap are really very minimal. Developers and end users have much more to benefit by our harmony than by our discord. I continue to meet many people who are embracing this vision of a harmonious union of these two great technologies. I encourage others to consider doing the same.

Now to respond to Sameer’s disappointment “with the Web Services support, or lack thereof, in Adobe’s recent Flex 3.0 beta release” I built a quick Flex app which calls the non-trivial Web Service from the JAX-WS samples that Sameer referenced. Here is the code for what I came up with:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

  <mx:Script>
  <![CDATA[
  import mx.rpc.events.ResultEvent;
  import mx.rpc.events.FaultEvent;
  import mx.controls.Alert;

  private function handleFault(event:FaultEvent):void
  {
    Alert.show(event.fault.faultDetail, event.fault.faultString);
  }

  private function handleResult(event:ResultEvent):void
  {
    Alert.show("Your shipment number is: " + event.result.shipmentNumber, "Purchase Order Accepted");
  }

  private function submitPO():void
  {
    var po:Object = new Object();
    po.customerNumber = "1";
    po.orderNumber = "1";

    var item1:Object = new Object();
    item1.itemID = 1;
    item1.name = "a";
    item1.price = 1;
    item1.quantity = 1;

    var item2:Object = new Object();
    item2.itemID = 2;
    item2.name = "b";
    item2.price = 1;
    item2.quantity = 1;

    po.itemList = [item1,item2];

    srv.submitPO.send(po);
  }
  ]]>
  </mx:Script>

  <mx:WebService id="srv" wsdl="http://localhost:8080/jaxws-supplychain/submitpo?wsdl" fault="handleFault(event)" result="handleResult(event)">
    <mx:operation name="submitPO"/>
  </mx:WebService>

  <mx:Button label="Submit PO" click="submitPO()"/>

</mx:Application>

This is a very simple example and doesn’t have the UI necessary to actually assemble a PO based on user input. That piece would also be trivial so I’ve left it out of this example. The key thing is that it correctly talks to the JAX-WS based Web Service. This is just one example which uses Java and Flex together. There are many more. And there are plenty of enterprises happily using Java and Flex together. Pitting these technologies against each other does nothing to benefit developers or end users.

2008 - The Year of Client Java?

My friend Joshua from Sun has predicted that “2008 will be the year that client Java starts taking market share from Flash”. This is a pretty bold prediction reminding me of when I used to hear this same sort of statement about Desktop Linux… “1999 will be the year of Desktop Linux”.

Don’t get me wrong… I love Desktop Linux. Been using it since about 1993. And I love Java. Been using it since 1996. But lets be honest about the reality of client Java, desktop Linux, anything that touches the mass consumer space. It has to just work. I’m thankful that Ubuntu and the Consumer JRE are headed this direction. But Flex and Flash are there today! Flash just works. So much so that in the first nine months, Flash Player 9 reached 84% adoption in the US and is likely well beyond 90% currently. That is a platform you can rely on. One you can build on today. Tons of consumer Flex applications have already been deployed. And tons more are not visible because they are still being built or behind the corporate firewall.

So to my friend Joshua and his pals at Sun: Keep up the good work. Seriously! I’m excited about where you are going!

And to the people building Rich Internet Applications: As JD says, “You can ship with Flash.” Not in 2008, but today.

Cringely on AIR, Flash, and Flex

My all time favorite journalist, Robert X. Cringely, has just published his weekly PBS article, this time discussing the future of Adobe’s platform technologies. It’s a great read and great press for our (Adobe) platform. Let me know what you all think about his opinions.

How I Overcame My Fear of Flash

Long ago I remember the first Flash site I ever saw–spinning gears replaced typically boring site navigation and sound illuminated a previously silent web. My jaw dropped and I said to myself, “I want to build these kinds of websites!” After playing with Flash Professional for days, I realized that my mathematically inclined brain just could not output the kind of beauty that I began to see all over the Flash powered web. I gave up and resorted to building very ugly HTML interfaces. Not because I didn’t want them to look better but rather, it was just too much work and I lacked the skill.

(Continue reading the rest of this article…)

My Tribute to Flash 9 on Linux: Compiz Like Wobbly Windows

I’m sitting in Caribou Coffee in Ann Arbor Michigan looking out at beautiful ice covered trees glistening in the sunlight. It’s Jan 17th 2007 and this day is going down in history! Today is the day Flash Player 9 was officially released for Linux! This is HUGE! The web allows anyone with a PC to engage with information and others. Flash has always pushed the limits of how that engagement happens, most recently with video. Even though many Desktop Linux users prefer free software, Adobe has still committed to making Flash work on Linux. I think this is noble. Do you see MS or Apple doing this with their platforms? By having Flash 9 for Linux, Desktop Linux is made all that much better. I have been using Linux as a desktop since ‘96 and without Flash I would be missing out on some pretty amazing stuff. Some will say “But Flash isn’t Open Source”. You are right. But if you don’t want to run proprietary software, rather than complain, go help Gnash. Ok, now that I’ve espoused my religious views, lets move on to the cool stuff!

First the demo: Wobbly Windows on the Web

That’s using Flash Player 9 and was built with the free Flex SDK. The wobble isn’t as refined as Compiz’s/Beryl’s, but that can be fixed once I (or you) figure out the math for doing that. Let’s walk through how you can compile that application.

First get the code from SourceForge. It’s in the wobbly module of the flexapps repository.

You need to get the free Flex SDK. Also if you don’t have it, you will need the Sun JDK 1.4 or better.

Set the FLEX_SDK to where you extracted the Flex SDK to.

In the directory where you checked out the wobbly code, run build.sh

Load the build/wobbly.html file in your browser!

This still needs some work, and since it’s Open Source, I’d love your help! Let me know what you think.