Thursday, October 6, 2011

From Android to Blackberry application development - story of a developer



I have recently started developing applications for Blackberry for a client at my Xebia India office. This blog is about my journey of partial migration to Blackberry development.
From the starting of my career, I have been working on Android. I have been reading, working, using, talking, learning and teaching Android for past two years and then I tried something new and something risky: Blackberry development.

Initially I got scared of the Blackberry API's. There is little support for Blackberry development as compared to Android. No big developer communities. Not many discussion forums and groups. Being an Android developer it was very dangerous for me to deep dive into Blackberry development without much support. But thanks to my mentor and colleague Saurabh Raheja who taught me some life saving techniques while working in utterly hostile (Blackberry) development environment.

 During Android development, in case of a query my usual habit was to either visit the Android developer site or just Google for that question and I would be flooded with the answers. The main task would be to try 2 or 3 seemingly best solutions and choose best or easiest from them. In case of Blackberry, RIM doesn't seem to be much interested to provide as much help to developers as Google do. The reason for this may be that from the day one of launching Android, Google has been nurturing big ambitions of taking Android to masses. Third party application support was a way successfully experimented by Apple. Google knew the recipe - entreat developers, ask for applications and build up a giant application market. Now Blackberry is also trying the same. In the latest releases of development environments, Blackberry has made the SDK more developer friendly , introduced some very good API's and also made efforts of fancy UI.

Challenges in Blackberry development:

Little or no developer community: The developer’s community is very small as compared to Android and iPhone. If I am stuck with a problem, limited numbers of resources are there to ask. 

Less support for fancy UI: If you are trying to imitate fancy UI of iPhone or Android in Blackberry for applications supporting version 5.0 or prior, I beg you, do it only when you have months of time for UI.
You have to override two or three methods just to change the height and width of your button object. UI components (ButtonField, RichTextField, ListField) are provided with only basic attributes and if you are trying to customize them a little to make them look different from native Blackberry UI, you would have to inherit base classes and override their drawing methods.

Emulator is a spoiled child: Blackberry emulator is powerful. It can simulate incoming/outgoing calls, locations, messages, sd card, camera and other lots of things. But to play with it you need to have a patience of Gandhi. It knows every reason on earth to refuse to run. On most of the exceptions in your program, you would need to run it again by cleaning it from the options menu.

Learn to live without error logs: In Android, I was in habit of checking out DDMS for error logs every time I found exception. There is nothing like this in Blackberry. Only way is to debug your application with breakpoints.

Advantages:

With all these challenges, Blackberry development sounds a difficult task. But it has some really positive things:
Flexibility: Blackberry has provided a good support of basic API's to developers which they can use to develop quality applications:

  • API's for accessing hardwares like accelerometer, bluetooth, camera and media player
  • GPS and maps
  • Inter app communication, notifications and message list
  •  Strong API's for network connectivity
  • Background multitasking
  • SMS, mail
  • Customized web browser

The feature I liked the most in Blackberry application development is : multiple entry points. 
Applications can be of two types: UIApplication and Application. First type is for those which have a user interface or screens while the second type of applications can run in background without presenting anything to the user. Both types of applications can have active control through multiple entry points. And developer can use these multiple entry point feature to give user a seamless and comfortable navigation within the same application or multiple applications. We can also use native applications to perform some general tasks like email, sms, gallery and media player to name a few. I have started liking development in Blackberry and would like to go deeper into it.