Archive for July, 2010

Flash vs. Java vs. Javascript

July 21, 2010

I’ve been looking at implementing a new user interface for a sensor system that my company builds, so I started to investigate possible platforms. I can’t use a client/server approach because access to a central server is not available. A few years ago I ported my Pin Hockey game to flash so I kind of know flash. The current UI is built in Java. A third possibility is Javascript, the engine of choice for HTML5. So then I thought, what are the real differences among these language? Flash (really Flex because I only develop on free platforms) seems to be more user interface oriented, Java more general a language but clumsy for interfaces, and Javascript very browser oriented and bit free-wheeling (i.e. no type checking– yet). But after more thought it occurred to me that all of these languages are basically the same. They all depending on a complex “interpretter” that uses byte-code instructions generated from the high-level language. They are all object oriented, single inheritance, interface based with built-in garbage collection. Beyond the basic language and interpreter are various libraries that do vary quite a bit from platform to platform, and that is one area where flash really shines. The underlying flash library is very rich and pretty.

With the Apple (Jobs) / Adobe war going on now we have Javascript (which Jobs calls HTML5) versus Flash/Flex with Java not even a close third. Everyone knows that Javascript as a big development environment is just not workable, although many of people are trying. So my suggestion is to eliminate this pettiness and just come up with a single underlying engine that can implement all three languages. An byte-code based engine that allows the source code to be developed in any language, that allows for a variety of libraries but preferably one good built-in one, and provides for maximum flexibility in interoperability. In fact, an underlying byte-code engine should be able to run all existing Flash, Java, and Javascript programs as is, eliminating the Apple/Adobe war altogether. The ultimate goal would be an open-source engine implementation, perhaps based on the current open source Java engine. But I’m dreaming.

The more predicable end to this story will be that Apple buys Adobe, war over, and presto Flash becomes remains the defacto standard of the UI. I’m expecting an announcement in a few months.

Advertisements