Tuesday, January 8, 2008

Frustrated Android

Well, I've been coding some mobile demo applications up recently. Not much really, just a message of the day application on a server that offers SOAP and Restful services.

The idea is to showcase a mobile client for each of the major toolkits out there i.e., Java ME (CDC and CLDC), .Net Compact and Android.

Well, it has been a lot tougher than I thought, every one of the platforms had hurdles except .Net Compact. In Java ME, both editions didn't have anything to parse XML. No big deal, had to pick up a 3rd party open source library but it's a good thing the server had Rest and not just a SOAP API. Microsoft .Net Compact was just a charm to work with. Really no problems. In all, it took 1 hour for the .Net client, 4 hours for the CDC client and about 6 hours for the CLDC client.

Enter Android, I was really eager to start work on this client. Java 5 syntax. Most of the Java 5 platform classes. What could possibly go wrong?

Well, the first problem is the IDE. NetBeans isn't supported. You can say what you want about the NetBeans vs Eclipse debate but NetBeans 6 is a killer application. Going back to Eclipse hurts.

The second problem is the complexity of the user interface building blocks. What I mean by that is that you can't just have a combo box and fill in some data for example, you have to setup an adapter that wraps around your data and plug that into the combo box. I'm all for flexibility but too often this is overkill. Not enough common adapters are provided in the platform. I think this is a real issue. Look at Qt 4, it suffered from the same problems, great flexibility in its models, but to do even the simplest of task meant huge amounts of coding. Trolltech introduced common model classes in subsequent releases of Qt 4.x to address this. I really think Google needs to do the same here too, just too much of a pain to fill in widgets when you don't need flexibility.

Where do I report bugs? Because I encountered a lot. No public issue tracking system is available.

The documentation has issues too, most of the time I just had to guest what a return value of an adapter method had to do. Also, I can't find anything recommendations on how to use threads on this platform or should they all just be shunned in favor of Android services?

All in all, it was a very painful process. I wanted this to be my favorite platform and I ended up cursing at it. At this point, I've spent two days on the Android client and I'm done for now. I'll pick this up again when Google refreshes their SDK.

Now that the dust has settled, I find it a bit unsettling that .Net Compact 3.5 was by far the best mobile platform. Competition with .Net has really made Java SE and EE superior products, but where are the Java ME improvements? What's really annoying too is that my .Net client can run as a rich client and Silverlight application without modification, just different build settings. I know, I tried, it works.

No comments: