« December 2005 | Inicio

January 03, 2006

Flash Lite or J2ME?

Almost a year ago, I posted a comparison between Flash Lite and J2ME.

As you probably now, the Flash Lite 2 update for Flash Professional 8 has just been released through Macromedia Labs, and it’s time to rewrite that post.

Has there been any change?

Thankfully, yes!. While the J2ME platform has been slowly but safely following its well established path, adding a few new profiles, the release of Flash Lite 2 brings a lot joy and good news for mobile developers.

So, what’s new in Flash Lite 2?
Maybe the most important improvement in the new player is the support for ActionScript 2.0. So, we can forget about one the most important caveats of the old Flash Lite player, which was the flash 4 syntax (which also meant complex nested movieclips structures, code everywhere, and a deprecated syntax).

Now we don’t have to jump between two different syntaxes, and we don’t have to jump between two different development paradigms. We finally have an object-oriented language, with all its advantages: code reuse, small entities that are responsible of small tasks,... well, you know.

But the adoption of AS2 is not only an advantage by itself. Been able to develop a desktop application, a web application or a Flash Lite application writing exactly the same code will make much easier for all the developers out there to try the technology. And more developers working on "the shinny thing" means more applications available, and having more applications available will mean that there will be a stronger demand for more good applications. So, everybody wins.

Yeah, AS2, cool, but isn’t there anything else?

Yes, there are two more things, that, from my point of view, will make Flash Lite a serious J2ME contender: local storage and XML support. Why?

Local storage support is probably the most important feature of Flash Lite 2. GPS connections are expensive (here is Spain, are obscenely expensive, so you can imagine the cost of a 3G connection), so the users must be able to store small chunks of data in their devices. Period. This was something that was needed, and that Macromedia has implemented, so we can only be thankful for it.

But when there’s the need of downloading complex data, the old loadmovie command was a real pain. We asked for it, and now we have it. Cool.

So, one of the weaker points of Flash Lite, which was the lack of functionality, is not so important right now. Of course, there are many things you can do when developing a J2ME application, like accessing the Bluetooth or the PIM or the camera api, but in most applications there will not be the need to do so. I mean, how many mobile apps are multiuser Bluetooth-driven games?. Not so many.

So, there’s still a certain lack of functionality, but, from my point of view, it’s not such an important point as it was before.


J2ME is almost in the same point where it was a year ago. Flash Lite isn’t, and now, more than ever, I feel that, before starting to develop a new application, I can really stop and think about what’s the best tool for the job, if it’s Flash Lite or if it’s J2ME, because, right now I am not only constrained to J2ME.

I finally can choose.