Posts on August 29, 2011
Developing for webOS versus Android
Posted on 2011-08-29 13:20:00
Tags: essay palmpre projects programming android
Over the weekend, I spent some time working on porting LJ for WebOS to Enyo, and after I got stuck there, I worked on porting FlightPredictor to Android. Since I was developing in both environments, I thought I'd give some more thoughts on Android (here's part 1):
I'm definitely learning more as I go, but there are still some areas (well, most areas) that developing for webOS is way easier than Android. I admit I'm biased in the matter since I've done a ton of webOS development, but sheesh:
- The Eclipse I'm using is decent in some ways and really frustrating in others. (I'm using MOTODEV Studio, because...well, I had an email from them and I just picked something) Keep in mind I'm used to developing in a text editor so the bar's pretty low here. It took me a while to realize that when you start debugging something you then have to switch to the "Debug" perspective to actually see what's going on. And 90% of the time when the app crashes, the only info I can see is that a RuntimeException was thrown, somewhere. (even when it's something easy, like a NullPointerException in my code!) Worse is when none of my code is on the call stack and I don't have the Android source code, so it gives me very little idea of where to start looking.
Honestly, the Intellisense is nice, but it just doesn't feel quite right, and often gets in my way. Hopefully as I get used to it I'll stop fighting with it so much. And the emulator is slow - it takes 15-20 seconds to get from pressing "Debug" to the app actually starting, and given the limited information I get back from the debugger it's almost not worth doing. (although if I know where the problem is, I can set breakpoints, etc., which is nice)
- To include a big list of structured data (i.e. a list of airlines), for webOS I just have to include a simple .js file assigning a big JSON array to a variable. For Android I have to generate an XML file (or a JSON file, I guess? Didn't try that...), and write initialization code to parse the XML file and store it.
- In webOS, doing an asynchronous web request is drop-dead simple - just use an XmlHttpRequest! Yay! In Android you have to spin up a new thread and post messages back and forth and such. Just reading that section of the book I'm borrowing depressed me, and I'm sure when I get to that it will suck.
- I wanted to have a Spinner (a list selector) that displayed a string and would return the associated value if it was selected. You know, like EVERY LIST SELECTOR EVER. Except, no - you can easily display a Spinner with a list of strings, but if you want to do something crazy like associate a value with it, you have to implement some interface and things generally get more complicated. What's so hard about a freaking templatized value type?? This makes me angry.
Anyway, nothing so terrible that I'm giving up, but a lot of annoyances and I really have to be in a tolerant frame of mind or I will start throwing things and cursing.
FlightPredictor HD in the latest webOS app pack!
Posted on 2011-08-29 13:52:00
Tags: palm palmpre projects
There's a new pack of free webOS apps, and I was pleasantly elated to find that FlightPredictor HD is one of them!
I somewhat jokingly suggested it after the last pack of free apps, but I had no idea they'd consider it and it would make the cut! happy happy happy
This backup was done by LJBackup.