Wednesday, November 1st, 2006

Leveraging HTML/JavaScript and Ajax in Apollo Applications

Category: Adobe, Presentation

Chris Brichford gave a talk at Adobe MAX on Leveraging HTML and JavaScript within Apollo.

Here are some notes from the talk:

Overview of Apollo

Apollo is a cross-platform runtime that allows you to take your web skills to build desktop applications.

Your applications can be all Flash, all HTML, or a mixture of both.

The first demo showed an HTML Control Tester mixing an HTML window with Flash content behind. On the fly the application had controls to blur, rotate, change transparency, and it all still worked (e.g. links and such). Check out the video here to see using Google upside down :)

Motivation for supporting HTML

Realize that we need to be able to reuse the web application content for rich desktop applications, and want to leverage the knowledge of Ajax and CSS.

The use cases are:

  • Embedding a full browser: integrate live partner content, or building a dashboard
  • HTML UI: Text field on steroids, create UI widgets using HTML markup

HTML Support

HTML engine renders to Flash display list object, and can be treated as any other display list (e.g. filters, fransforms, opacitiy).

Considering using Flash fonts to render HTML text.

HTML form widgets will be visually consistent with your application so the user can’t tell what is Flash and what is HTML.

On the scripting side JavaScript and ActionScript object models are bidirectional and seamless.

HTML can be loaded from the network, URLRequest, ActionScript string, or an adobe-app:/ package.

HTML Engine Choice

Using WebCore and JavaScriptCore from the WebKit open source project.

They chose it because:

  • WebKit is mobile friendly.
  • WebKit is a small source code base for a modern HTML engine

Planning to keep Apollo in sync with Safari’s HTML and JavaScript support. So, if you support Safari, your Ajax app would work as-is inside Apollo.

Apollo will support Adobe Reader and Flash plugins.

API overview

Still in the works.

New ActionScript class called HTMLControl which is a subclass of Sprite and the default behaviour is modeled on an iframe.

You can subclass the HTMLControl yourself and change behaviour (e.g. what happens when a link is clicked, when is called, when a form is submitted, etc).

A nice demo was Maptacular that was a mashup of Google Maps with application behaviour.

Key Takeaways

Unified HTML and Flash rendering pipelines.

Bridging JavaScript and ActionScript object model.

Posted by Dion Almaer at 11:35 am

3.8 rating from 51 votes


Comments feed TrackBack URI


You can find infomation on Apollo here:

mike chambers

Comment by mike chambers — November 1, 2006

plug-ins are evil

Apollo is not a plugin, it is a desktop runtime.

Comment by mike chambers — November 1, 2006

I think browsers are evil! LOL You have to rewrite stuff to run on each platform! And then things like IE upgrading happen. BOY, what a pain. Apollo will provide a common browser standard on all three platforms and features that are beyond the browser. You won’t depend on browser limitations any longer. (Unless you choose to… nostalgia is sometimes strange.)

Note: Javascript support is not consistant, CSS support changes from browser to browser. Solution… we use plugin libraries! (Granted, they are loaded into your browser without your approval or review and have been the source of a great number of virus attacks and annoying popups. But lets admit that all JS libraries aren’t bad just because of that!) Also, Flash just happens to be the most accepted plugin. Take a look at Flex… think it over again. You just might find it’s not as bad a solution as someone has told you. When we think that all plugins are evil it is technological biggotry!

Comment by John Farrar — November 2, 2006

– Mike I hope you read the article and watched the demo.

I filmed the demo and work on the apollo team.

Apollo supports HTML in two ways (both rendered via WebKit).

1. You can embed HTML within a Flash based application

2. And this is the part that is not shown in the demo (since we are currently implemented it), Apollo will allow you to build RIA desktop apps completely in HTML / JavaScript / CSS. You don’t have to use Flash if you dont want to.

So, just to be clear, Apollo supports both Flash and HTML as first class application technologies. You can use one of the other to build your application, or if you want, you can mix and match them. The demos in the video show using HTML within Flash.

I suggest taking a look at the FAQ at:

It gives a lot of info on this.

mike chambers

Comment by mike chambers — November 2, 2006

That is why we have web Standards. If IE does not respect web Standards that is a different story, but recommending a proprietary technology instead of web Standard works for people who don’t know computing exist outside of Windows and IE.

I always enjoy seeing these kinds of comments on Ajax sites. Let’s remind ourselves… What standard is XHR based on? Why does XHR exist?

And for the “plugins are evil” crowd… Didn’t Netscape add the plugin feature so that accelerated innovation could take place outside of the snail’s pace inherent in web standards?

All that aside, Adobe continues to move Flash towards being more open and standards based. The most recent versions of Flex & Flash use the ECMAScript 262 standard for scripting.

I’m am totally an advocate of standards. I sit on the expert groups for three JSRs. However, I recognize that there is balance between using only standard based technology and using de facto standards, like Java, Flash, XHR, Word Documents, etc. Those who choose to stick to one side may be saints, like RMS, but quickly become irrelevant as the world moves forward. Does anyone live in a world confined to only open standards? What about the hardware and drivers in your computer? What about the OS you use? The document formats you save in? Is the car you drive built entirely on standards based technology? I firmly believe in the ideals of open source and open standards, but I also live in reality.

Ok, enough blabbing about it, time for me to go write a book. :)

Comment by James Ward — November 2, 2006

Leave a comment

You must be logged in to post a comment.