Here's a review I wrote more than a year ago for Chris King's Advanced BlackBerry Development:
Joining the flurry of BlackBerry books released within the last year is Advanced BlackBerry Development by Chris King (Apress ISBN: 978-1-4302-2656-7). Marketed as a sort of sequel to Anthony Rizk’s Beginning BlackBerry Development, the book is supposed to kick it up a notch and dig into some of the more complicated things you can do with the BlackBerry Java platform. What you’ll find though is that the book should actually be entitled “Mobile Java Development Including BlackBerry” – I’ll try to explain below.
One of the things I’ve noticed lately as I read mobile development forums and the groups on LinkedIn is that when developers talk about mobile development, they usually generalize their comments and don’t identify which area of development they’re talking about: enterprise or consumer mobile application development. They both have very different needs, requirements and issues and effect how you look at a particular problem. Since I come from an enterprise development background, when I look at the title of this book, I expect to see advanced topics covered such as getting data from back-end data sources (especially connecting to XML-based and RESTful web services), dealing with encryption and security issues, plus managing the availability of different network connections. When looking at the topics covered in this book, it’s clear that the author is looking at the topic from the consumer side of mobile development – he gives some cursory coverage to the BlackBerry development tools, connecting to files and networks then jumps into a consumer oriented media grabber application that pulls media files down from web sites. While the book does address more advanced enterprise-related topics such as integration with device-side applications and security, these types of topics take a back seat to topics such as playing and recording media files and sending or receiving text messages. There’s nothing wrong with this approach, it just splits the potential audience for the book.
In digging through the chapters, the author does a really good job of digging deep into the major topic areas he’s selected for the book. The book is broken up into three parts and each part covers a different area of BlackBerry Java development. Part 1 deals with what the author calls Advanced API’s, part 2 deals with device integration and the last part deals with security and more developer oriented topics (as opposed to development-related topics).
In the advanced API’s part of the book, the author describes in great detail how to capture media files (pictures and video), playback media files (audio and video playback), send and receive SMS, MMS and email messages plus use available encryption API’s to encrypt data. For each of these topics, the author does a great job of explaining most available options and provides a wealth of source code that illustrates points made therein. What I found interesting though, was that as the author tackled a topic, in many cases he covered (in great detail) non-BlackBerry ways to address a problem before explaining the BlackBerry way of doing things. This is why I suggested the title change at the beginning of this review. What this book should cover is BlackBerry topics only – leave the other topics to any of the already existing JME books available to developers. The approach the author took here makes me feel that his target audience isn’t BlackBerry developers, but JME developers who work with multiple platforms and are adding BlackBerry to their mix. Again, there’s nothing wrong with this approach, it just isn’t what I expected from an advanced BlackBerry book.
Even the topic of cryptography is covered with a cross platform bias. Considering that the BlackBerry is the most secure mobile platform on the market, the author covers the open source Bouncy Castle cryptography API’s before digging into the robust BlackBerry security API’s and, recent purchase, the Certicom cryptography API’s.
In the second part of the book, covering device integration, contains the most detailed description of how to integrate with the Personal Information Management (PIM) capabilities of the BlackBerry platform that I’ve ever come across. The material includes a detailed description of how it works plus a lot of source code to help you integrate the concepts into your applications. RIM provides some information on the topic in its API documentation, developer web site and sample applications, but this is complete coverage of the topic and very useful.
The next chapter digs into several aspects of the BlackBerry browser. It covers topics related to the different types of browsers and markup languages, then shows you how to launch the browser from your application and embed the browser in your own applications (none of which are really advanced topics). The chapter finally enters the advanced realm at the end with its coverage of how to create and install a plug-in for rendering custom content in the browser. This is a topic I have never seen described anywhere else and I actually didn’t know this was available in the BlackBerry browser until now. It’s a cool feature and I’m not sure how many BlackBerry developers really need to do this, but it’s sure nice to have the information at your fingertips.
The last chapter in this part of the book contains a sort of strange hodgepodge of topics that really don’t seem to go together but needed to find some place in the book. The chapter begins with a very detailed coverage of how to use the Content Handler API (CHAPI, JSR 211) to allow your application to seamlessly communicate with other applications running on the device in a secure and manageable manner. This is another one of those advanced topics that really isn’t covered well anywhere else. It’s clear that the author has spent a fair amount of time working with these API’s in his applications and the reader can really benefit from his experience here.
The chapter next digs into the options related to application icons. It provides basic information about application icons then covers very thoroughly how to manipulate an application’s icon from within a Java application. I’m really not sure why this topic is in this chapter; it needed to be somewhere in the book and the topic is covered well, I’m just not sure why it ended up where it did.
Finally the chapter ends with detailed coverage of the options a developer has for manipulating the menu available to BlackBerry applications. Most BlackBerry Java developers quickly learn how to add menu items to their applications, but where things get more interesting is when you can expose features of your application through a custom menu item in another application. This comes in handy for example when you want to act on information contained in the Contacts application. Just add a menu item in Contacts that allows the user to pass data from a selected contact to your application. It’s this type of seamless integration that really makes a BlackBerry application shine.
The last part of the book provides the necessary coverage of BlackBerry application security. No advanced BlackBerry book would be complete without coverage of the topic. It then jumps into topics related to developing for multiple versions of the BlackBerry Device Software (an issue any BlackBerry developer has to deal with unless they work in a very controlled environment). Because the BlackBerry platform has been around for a very long time and has supported many different wireless networks, device form factors, screen sizes and keyboard layouts, there’s a lot a developer must to do to ensure their application will work on any BlackBerry device. The book does a pretty good job of covering the right topics, but the author refers to issues related to writing applications for different BlackBerry OS versions when that’s not how it works. The BlackBerry OS running on the device is the underlying software (kernel, hardware libraries and so on) that makes the device work – it’s the BlackBerry Device Software running on top of it that provides the UI and the features an application interacts with. Throughout the book, the author incorrectly refers to the OS when he really meant the BlackBerry Device Software.
This last part of the book wraps up with coverage of how to setup an automated build process for your applications. As you build more and more applications, especially if you have to support multiple BlackBerry Device Software versions with your applications, having an automated build process makes life much easier and it’s nice to see it covered in the book.
There were some serious problems with the book that I think are important to point out. I found myself writing ‘wrong’, ‘huh?’, ‘why?’ and ‘which ones?’ a lot in the margins of the book as I read through it. Let me explain:
The author clearly wanted to cover certain topics in detail but knew at the same time that he had to provide some background information to make the book complete. I really felt like he hurried through many of the more introductory topics in order to provide the needed coverage but was eager to get into the other stuff he wanted to cover. Selecting the right version of the BlackBerry development tools to use based upon the devices that will be using your application is a very important and is the most common thing missed by a developer when getting started. In the section of the book that dealt with this topic, there was only a cursory explanation and the importance of this really wasn’t stressed.
I found that there were quite a few places in the book where the information the author provided was just wrong. It was clear that he regularly encountered things with the BlackBerry development tools that didn’t work or didn’t work like he expected and, rather than try to find out what’s really going on, he just assumed it was a problem, wrote about it in the book and moved on. Very early in the book, on page 5 actually, he indicated that there was a bug in the Eclipse plug-in that prohibited you from having more than one project in an Eclipse workspace. This just isn’t true – it’s not how Eclipse works and it’s definitely not how the BlackBerry plug-in for Eclipse works. It may have been something he encountered with an early beta build of the tool, but a blanket statement like that did not belong in the book. For the entire remainder of the manuscript he created a new workspace before creating any new project and that’s just not the way it works. I have several BlackBerry workspaces in Eclipse and every one of them have multiple BlackBerry projects and it works very well.
The author clearly has a lot of experience working with the BlackBerry platform and through this has uncovered many places where things often don’t work as expected. It’s one of the reasons why people would purchase a book like this – to find out things that aren’t easily covered in the documentation and things that need to be avoided. The problem is that, although the author identified these types of issues in many places throughout the book, in every case he would omit listing the specific device models affected by an issue. He would identify the problem with a blanket statement such as ‘this doesn’t work on several BlackBerry models because of…’ but never actually identifies the models. This is partially useful information – I now know that the issue exists, but I have to look elsewhere to determine whether it affects a device I’m targeting for my application. Having to put down a book and fire up a browser search engine to find out the specific details behind an important topic is not what I expected from a book like this, especially due to the great level of detail included for so many other topics.
As you can probably see, I’m a little lukewarm on the book. It’s great if you are building BlackBerry Java applications and need information on the specific topics covered here – the author did a very good job of covering most of the selected topics in a very detailed manner (very appropriate coverage for an advanced level book). I find though that the book falls down in several areas. I would have liked to see more detailed coverage of how to deal with the different networks available to modern BlackBerry devices and strategies for communicating with back-end data sources but as I mentioned, it’s mostly a consumer oriented book and those topics aren’t as important to consumer application developers. Most of all, I wish the author wasn’t in such a rush to get to the topics he found more interesting and instead gave equal level of coverage to all included topics.