Java in the Flash Player

Sunday, April 26, 2009
Adoption of Flex accelerated after Flex 3 was released. A big part of that acceleration came from Java developers who were now comfortable coding ActionScript using classes and object oriented techniques. Adobe should go one step further and add Java to the Flash Player itself.

I know some developers will cringe at the idea. After all, Java has become quite bloated with various APIs and features. But Adobe should look at what Google has done with the App Engine. Don't bring over the entire JDK. Just bring over what APIs make sense for the Flash platform. Perhaps even just the core language and core features as spec-ed out in the Java Foundation Profile.

Why would Adobe even bother? Well certainly it would encourage even more Java developers to adopt Flex. Some Java libraries and open source projects would be reusable in Flash. More exciting - the various languages that have been ported to the JVM would come along for free (i.e. Groovy, JRuby). Arguably the most appealing benefit would be the new synergy between Flash and J2EE servers. Microsoft enjoys this with Silverlight and .NET and it’s a huge competitive advantage. This synergy goes further than just client-server communication too. When building Flex apps, developers typically use a variety of tools that were originally written for Java (Ant, Maven, etc). In fact, building an enterprise Flex app today practically assumes the knowledge of Java.

But adding Java to the standard Flash player could increase its size significantly (even if they limited it to the Foundation Profile). Instead, Adobe should simultaneously create an extension model for the Flash player so that new additions don't have to be placed in the default player. Rather they could be downloaded on demand when a Flash app requires them. The existing Runtime Shared Library (RSL) feature in Flex might suffice but I don't think so. Either way, Adobe doesn't want to increase the size of the player and most users don't mind an extra on-demand download as long as it’s done quickly and quietly (no scary dialogs).

This might be an interesting time to start doing this. Oracle just bought Sun and there are various theories on what Oracle will do with JavaFX. Many sources seem to think Oracle will likely cut, starve, or kill it. Oracle might be interested in collaborating with Adobe on bringing Java to Flash (while also dropping JavaFX). If Adobe did make this happen - the payoffs could be massive.

0 comments:

Post a Comment