With the abundance of smartphones that come with highly capable, webkit-based mobile browsers, developing and deploying functional and engaging web applications can be made much easier by leveraging existing, proven frameworks such as jQuery, prototype and MooTools. In fact, such is the quality of these mobile browsers that a web application previously developed for “traditional” browsers (i.e. non-mobile) will work as-is, with perhaps some UI-focused changes to cater to the different user input methods and reduced screen real estate.
Once you have determined that the requesting device is a BlackBerry, you will then need to determine what to do with this information. The cleanest solution we have found is to redirect the user to a page that is specifically tailored to BlackBerry devices. This will remove the need to clutter your main web application (the one targeted to the more fully featured web browsers) with an overabundance of conditional statements in a misguided attempt to create a one size fits all solution. This can not only result in unreadable code but can lead to the temptation to scale back the functionality of the primary web app intended for your larger audience.
Once you have reviewed your application and determined what interactions will be restructured, it’s time to get down to work on coding those new (or restructured) interactions. While it may seem like taking a huge step backwards, you should first ditch all code based on a framework (i.e. jQuery) and instead aim to write your code directly utilizing the DOM level 2 API (i.e. getElementById(), appendChild(), etc.), as prescribed by the BlackBerry reference documentation. Although newer BlackBerry devices will support more advanced API calls, targeting the level 2 API will ensure your application will perform reliably across the widest possible range of devices. One time-saving strategy in this regard would be to develop in house a DOM level 2 only library of code that implements commonly performed tasks: for instance, image rollovers, dynamically refreshing the content of a specific page element, etc.
When all is said and done, there may still be some “smart” in the BlackBerry smartphones.
Latest posts by Mark Tovey (see all)
- Externalizing the Data Source of Your iOS App - June 2, 2011
- Sharing is Fun - March 28, 2011
- Mapping client success in a mobile environment – a case study and tutorial - November 12, 2010