Friday, October 15, 2010

OpenRemote 2.0 and Android, first impressions

it has been a while since I did any code, well... 2003 to be exact? so I was a little rusty this week. In any case, i have decided to look into what we call the "serverless" mode at OpenRemote.

Just a bit of background on OR. For most professional scenarios in OR you will want to use the controller, called the ORB. However one OR's product that has a lot of traction in our community is iKNX, a serverless KNX console. The console talks directly to the hardware through IP. This product alone has established our reputation in the european installer community as a defacto choice for iphone/KNX control. It is based on iphone. The reason for this success is rather simple: it is easier to install software that just involves the iphone and a gateway rather than iphone software, PC software and a gateway. The barrier to entry is low.

With the release of OR 2.0, we are looking to generalize this with all the protocols we support. As long as you have a IP gateway, we should be able to connect to it and talk to it. This means that for straightforward control scenarios you don't need an ORB upfront (for professional scenarios, you will but that is another topic). So the console has got to connect to the server and download its data.

This is where I come in. I decide to step in and take a look. After all, how complicated can it be? Well turns out that a simple task such as generating a MD5 hash, sticking it in a HTTP header with Base64 encoding and unzipping the resulting file has taken me a good 3 days. This is probably something that would have taken me 3 hours in the past. And along the way I have made the following observations.

1/ I am getting older and slower, but that is normal.

2/ API support and documentation in Android is still "early stage" with information sometimes hard to find. Compared to what SUN had done in the past it feels a bit sloppy.

3/ APIs sometimes behave a *little differently* which can drive you mad. For example MD5 needed padding, Base64 needed trimming, little things that break your code. I expect this to stabilize over time.

4/ The same "community" feel is palatable in android. Most of the question I had, I could find answers in forums.

5/ Android is very cool.

Of course I have rediscovered the joy of development, that moment of "happy" when the stuff works like it is supposed to.


Bill Burke said...

I think its more the environment than you're old or rusty.

I did an iphone app a month ago. Hello world took me 2 days. The project I did took two weeks (it was a simple TOTP key generator). Objective-C is a bitch to get used to (ugh reference counting) and InterfaceBuilder is quirky.

Tony said...

I'm inclined to agree with identifying the development environment as playing an important role in the speed of development.

However, I would rate Eclipse to be only slightly better (for Android development) than XCode. I also typically only use Objective-C for OS interactions and then quickly call out to C or C++ code (but that's really just a comfort zone, I suppose).

That said, Visual Studio 2010 is the bees knees. :)

Nice post, Maison.