Please, Adobe. Give us the Ajax Builder!

I think, I already mentioned that I really like Adobe’s products for creating animations and rich internet applications, which are namely Flash Professional, Flash Builder, Catalyst and Illustrator. What I don’t like is the target platform: The Flash Player. So, after all these debates about Flash, isn’t it time to simply drop the Flash Player and add an additional compiler option for Flash Builder and Flash Professional? Yes, you guessed right. I am talking about HTML5 deployment. Wouldn’t it be great if one could build rich internet applications using technologies like ActionScript3 and MXML, which are both superior to JavaScript and pure HTML, without being forced to target the Flash Player? Flash Professional could simply render into HTML5’s <Canvas> element. It has already been shown, that this is possible. Flash Builder could simply transform the code base into HTML/Ajax, similar to the client-side part of GWT. I know that I might sound a bit childish here but, I’d call this “Ajax Builder” :-D

Don’t get me wrong. I didn’t say: “Replace the Flash compiler option.” – This is important since there are still some things HTML5 can’t handle, like webcam support for example.
=> No Flash, no ChatRoulette.
So, til HTML5 is ready to completely replace Flash, both compiler options must be offered.

Also, the whole Illustrator-Catalyst-FlashBuilder workflow should be kept and optimized for HTML5. Although Catalyst is still in its baby-shoes and has some serious mis-concepts, the basic idea is great. Adobe should keep working on this.

Further, AIR shouldn’t be canceled if Flash gets (ever) dropped. Instead, AIR could be a great way to bring Ajax-based rich internet applications to the desktop (and mobiles).

The benefit is clearly visible: Flash-developers can keep using their knowledge about AS3, MXML and Adobe’s software products, but simply target a Flash-free platform.
In the same time, all this Flash-sucks-no!-Flash-is-great-blahblah would finally come to an end.

Update: Seems like, Adobe heard me :-)

Instant Flash player engine in JavaScript?

Note: This is not a posting about introducing Gordon. This article describes a concept of automatically porting the Flash Player to JavaScript in a generic way, based on the idea of Gordon and Adobe Alchemy.


You might know Gordon, an experimental attempt of implementing the Flash Player runtime environment, completely written in JavaScript (by Tobey Tailor).
Demos have already shown, that this is possible.

The idea itself is great: Create a Flash application as you’re used to and then compile it into a SWF file.
Then, embed it together with Gordon into your website like this:

<html>
	<head>
		<script type="text/javascript" src="/path/to/gordon.js"></script>
	</head>
	<body>
		<div id="your_stage">Replace me</div>
		<script type="text/javascript">
		var movie = new Gordon.Movie("/path/to/your.swf", {id: "your_stage", width: 480, height: 320});
		</script>
	</body>
</html>

The problem here is that I doubt that one person alone can completely re-implement the full Flash engine. This is somewhere close to impossible, since Gordon currently only supports SWF1, while the Flash Player was just released in version 10.1.
Even open-source projects like Gnash, a re-implementation of the Flash Player (written in C++), which already exists since several years, currently only support SWF7 and SWF8 partially.

Now, here comes my idea:

What, if it would be possible to automatically transform existing Flash Player implementations into JavaScript?

I know that this sounds crazy, but read the following first.

Ever heard of Alchemy? It’s a transformation tool, which converts C/C++ code into ActionScript and then build a Flash file from. Yes, you heard right. This is not an April joke. It’s real and it works. There have already been ports using the original (open) Quake2 source, transform it into ActionScript and then run the game inside Flash Player.

Now, since this is nothing new, here comes the big trick: Why not use the source code of Gnash, send it through Alchemy and achieve the ActionScript version of it.
Then, write a transformation tool, which converts ActionScript into JavaScript code. Since both languages share some syntax similarities, this should be possible (Especially if it is possible to transform C/C++ into ActionScript, which would sound even more crazy to me, if I’d hear it in the first place).
After this, the achieved JavaScript code must be cleared of anything that the Flash Player offers, but cannot be handled by JavaScript/HTML5, like for example web-cam support.
Finally, an interface must be written in order to output video and audio. Since HTML5 supports the new <canvas> and <audio> tags, this should be possible. Simply draw the content of the graphical buffer, generated by the Flash Player emulator, onto the canvas element and playback the sound using <audio>. Done.

This way, it would be possible to run (existing) Flash applications without having the Flash Player plugin installed.

I know, this still might sound crazy but it might be possible with enough man-power and the know-how. The only thing that might become a bigger problem is the file size. I wonder how big such a .js file, implementing the full(!) Flash Player, might become. Maybe it would then be necessary to package only required subsets of it.

So what do we get at the end? A JavaScript-version of the Flash Player which supports up to SWF8, thanks to Gnash.
If Adobe ever releases the Flash Player as open source, it would be easy to throw it into our C/C++-to-JavaScript transformator. Sounds great, or not?

Update: It just came to my mind that, if it’s possible to transform C/C++ into ActionScript, why shouldn’t be possible to directly cross-compile C/C++ into JavaScript?
As far as I know, Alchemy is based on LLVM, which should be able to handle this.

Tagxedo: Crazy tagcloud generator

To be honest, I don’t really like Silverlight apps, but Tagxedo is truly great.

Just enter a website’s url (or just plain words) of your choice and it will generate a cloud for you, based on its content, as shown in the image below.

Variable parameters include font size, color, alignment and shape.

The app itself feels a bit buggy and the export-to-png didn’t work quite properly for me, so I had to take a screenshot instead, but still, the idea itself it brilliant.

Tagxedo Tagcloud

Forward- and back-button support in Silverlight

I noticed in the screencast below, that Silverlight seems to offer a great implicit way of supporting browser’s forward- and back-buttons. The basic idea is to modify the current url by adding or removing tags without forcing a page refresh.

Example: In the video below, a basic Twitter client is being developed using Silverlight. The main part is wrapped into a navigation component which automatically stacks sub-components, similar to the ViewStack component in Adobe Flex. The difference is now, if the displayed component changes, also the current url changes. For example, if the user sees the “home” view and clicks on “search”, the url, displayed in the browser, changes from http://www.example.com/application#/home to http://www.example.com/application#/search.

If the user now clicks the back-button, the Silverlight application automatically switches back to the home view.

This truly is a great (and so simple!) way of supporting browser history inside of plugin-based RIA technologies. I wished, there would be something like this for Flex.

RIA-Forum Konferenz

Ich werde sehr wahrscheinlich an der Konferenz “RIA-Forum” am 23. April in Darmstadt teilnehmen.

Inhaltlich geht es um verschiedene Themen aus dem RIA-Umfeld, verteilt auf vier Vorträge. Auf der Webseite der Konferenz gibt’s Details zum Zeitplan.

Neben ein paar anderen Referenten, wird auch Florian Müller, bekannt für das Buch “Professionelle Rich Client Lösungen mit Flex und Java: Web-Applikationen mit Flex-Frontend, Java-Backend und BlazeDS” zum Thema Flex im Enterprise-Umfeld sprechen.

Ich persönlich werde da sein. Wer sich mir anschließen möchte: Einfach bei mir melden. Teilnahme kostet 35 Euro inkl. Buffet.