Mobile world, technology and more

Sunday, July 17, 2005

Flash Lite versus J2ME showdown, will history repeat itself ?

Unless you've been living under a rock for the last two years, or using a Windows-based "smart" phone (with no correlation between both), you probably know that Java mobile applications are quite popular among vendors devices or operators' content delivery systems, just like ringtones, wallpapers or SMS services.

Even better, you can now find Java apps acting like ringtones or wallpapers microdelivery systems, for example photo albums allowing you to browse galeries of themed thumbnails pictures before buying the full wallpaper, or mini jukeboxes allowing you audio previewing of your favorite mainstream radio songs (sorry Apple addicts, this Motorola iTunes player will not be the wow-first-of-its-kind), sometimes also even bundling a karaoke player, if you are a really bored person, or want to impress your girlfriend because she really really liked that famous Lost in translation Roxy Music scene, you know.

Unfortunately for Sun, Japan didn't only export this weird kind of karaoke Java apps.

A little thing called Flash Lite (1.0 then 1.1) has been heavily gaining popularity in the archipel in the last two years. Then T-Mobile UK (then .de) launched around July 2004 its News Express service, a highly eye-candy Symbian+Flash Lite app allowing its customers to browse news on 3D-like floating panels. The app has now been discontinued, but it was enough to ignite the fuss on .us Macromedia Developer Forums about this blasting "flash mobile" stuff.

The Flash plugin was first not available to the public, and could not be easily extracted from the T-Mobile app. Then Macromedia decided to give the plugin for free to registered forums developers, restricting installation based on an IMEI serial number you had to send them, and this was enough to feed the happy mobile crowd, who had been playing with the mobile SDK, waiting for the real mobile plugin. In the meantime, Macromedia also hired Bill Perry, webmaster of and one of the first most active Flash mobile enthusiasts as - that won't fit on a business card - "Developer Support and Content Manager for Mobile and Devices". The bomb was set up.

It exploded at the MAX2004 conference in November, where the same Bill gave an enlightening presentation entitled "
Creating Dynamic Applications with Flash Lite 1.1", still available on his web site. Later on around January 2005, Macromedia revamped their web site mobile section, giving it a real portal at, launched a contest for the Best mobile Flash application, filled their Exchange zone with winners or hobbyists apps, and began selling the plugin to developers. It's now July 2005 and things have been moving slowly but surely for Flash Lite. Nokia and Samsung are integrating 1.1, and a few european operators are now including the plugin in selected pool devices, mostly Japanese phones or Nokia Series60.

While this little background story may sound like a Macromedia apologist, this is not right. I've written a few J2ME apps for my company, and I'm happy to see Sun adding new stuff to their MIDP API. But when I first saw the T-Mobile service, and saw my first Flash Lite apps living on my Nokia 3650, sorry, but this was just too cool. The thing is that this "cool factor" is IMHO a major spot in the mobile world, especially when you target a younger audience. See these stupid Crazy DJ Frog ringtones. But Sun probably doesn't care much about this, because there is a HUGE availablity of J2ME on phones, whereas the Flash Lite plugin is still trying to gain both operators and vendors.

Still, Flash already killed the applets, and Macromedia is obviously aiming at the mobile market. They have the tools, the right people, the money (well perhaps not that much since the Adobe story), and a clear objective. And they have the brand, everyone plays Flash, everyone knows Flash, but what's that "Java" thing ? Plus Duke is not that cool.

This will be interesting to see where - or if, or when - the battlefield will take place, either on the higher ground - vendors and operators - or the lower ground - J2ME studios versus Flash studios. This is about anticipation.

Cocoon is a bless, but Cocoon is a mess

Well, this is my first blog post ever, so I apologize for bad grammar because, you know, english isn't my mother tongue.

I've been using Cocoon at my workplace for over a year now, and I feel like writing down a sum up of this experience, in case it may help someone yet unfamiliar with this project.

For starters, Cocoon is a open source web application framework with strong XML and Java foundations, being developped by the Apache Foundation : the project homepage is here.

This may sound very abstract and buzzwordlike, so in short terms it means that if you have to (or want to) deal with concrete volumes of XML data (that is reading it, parsing it, producing it and generating multiformats representations of it), and you have basic Java skills, and you don't wan't to spend money on this, then Cocoon is probably the best choice as of today.

Cocoon is like a huge toolbox filled with tons of handy components, you glue them together in XML matrices, sometimes without writing a single line of "pure" code, and the final result is a web application with a proper separation between data, interface and obviously, presentation. And if there's no component to fit your needs, you can still write them from scratch, or you can simply plug already written company components written with other frameworks, because Cocoon doesn't tie you to its own core.

This is a powerfull framework, with very cool pieces like full internationalisation support, or the Control Flow which lets you write javascript or Java based controlers to build interfaces for various clients (from basic browsers to B2B partners systems). Another highlight is its forms framework called CForms which lets you write interactive and dynamic cross-browsers forms, which will soon fully support this "new" buzzthing called Ajax. It's a mature framework, used in fields from XML hobbyists to complex applications.

This is all fair and well, but IMHO this toolbox suffers from a "can do everything" duality syndrom. First, as Peter Parker was once told, "with great powers comes great responsibility", second, as every perl monk was told, "there is more than one way to do it". Forgive me for these easy quotes, but this is what comes to my mind to describe the current state.

Too much is better than nothing at all, but carrying a crusade to look for this "way to do it" is a plague : the biggest drawback of Cocoon isn't that it does too many things (fact is : it does them well !), it's that right now its documentation is scattered all over the web. I know a real life situation doesn't always reflect a global problem, but here you go : at my workplace there are two students, who weren't taught Cocoon at their uni, so they are trully starters. We don't have much time left to help them (this is the IT world where projects deadlines are always set up for yesterday, and where paying for training is the lesser of company priorities), and when we do have spare time to solve their Cocoon problems, it's now common to tell "just google for a similar problem", because I know that only the almighty Google can crawl through the vast amount of Cocoon stuff to find trails (or answers within articles, at best).

You have the official documentation and a wiki, but parts are either obsolete or undocumented. You have an unofficial resources site, promising but lacking content. You have a demo site, with real content (the demo, the Supersonic Tour), but lacking docs. You have books from three years ago lacking up-to-date samples or informations.

Right now, the best resource is the Cocoon Users mailing-list, where one can perhaps find every answer, which is a Good Thing (c), but is great and sad at the same time, given the work that's being done on this project by fantastic people.

That's all for this first post, and I hope it can introduce people to this great framework. If you want to learn swimming and are not afraid of the dark, you should probably give Cocoon a try.

It's worth it.