Hessian and the Iphone (IRemoting for the Masses)
Well I splashed out on the Iphone 2 and one of the first things I did was go an grab an Objective C book and sit down to sort this new lanuage out
2 weeks later I am versed enough at the principals of Objective C to start causing trouble. I must admit its a very different syntax. The first thing I found laborious was xml and http handling. I was accessing web services on my web server just mucking around an it was so painful. Having come from the wonderfull worlds of Flex Remoting coupled with .NET through WebOrb I started thinking there must be a better way.
Guess what there is!
After running round and learning a few new things I was exposing methods in my .NET dlls to the Iphone using common Objects through a service. All Binary too
Sound familiar? Well it should, its what Flex remoting is. I couldn’t use AMF though as I couldn’t find an AMF sterilizer in Objective C and definitely wasn’t wanting to write one with my work load at the moment.
What I did find for now was Hessian, which covers a range of languages. After a setting up unit tests, I was passing native objects from each Language to the other (Iphone Objective C to .NET C#) in my unit tests and got all basic and complex types working along with custom classes etc. So now its off to build an app with this in hand.
Depending on how your objects are structured you can see a huge compression of the objects compared to markup (XML) alternatives. I was seeing 100kb xml to 9kb hessian protocol. Definitely something to look at with New Zealand’s 3G Data prices. And to top it off its less code than parsing xml, faster to develop and faster to use. Give me a yell if you want more info as it can be easily transported to ROR, Java etc.
Now if only Apple would hurry up and allow me onto the Iphone Developer program! its been two weeks!!!
Wouldn’t it be lovely to have the data pushes and streaming of Flash remoting on the Iphone. Stay tuned!




