Porting your BlackBerry WebWorks application from the BlackBerry PlayBook to the BlackBerry Smartphone (and vice versa!)

How-to

BlackBerry WebWorks

Have you already written a BlackBerry® WebWorks™ application for the BlackBerry® PlayBook™ tablet or BlackBerry® smartphone platform, and now you’re wondering how to port it from one to the other? We’ve got some tips for you right here!

There is a great opportunity for vendors to provide versions of their applications that run on both the BlackBerry® 6 smartphones and the BlackBerry Tablet OS. In fact, due to the nature of Web technologies such as HTML and CSS – as well as how the BlackBerry WebWorks SDK is designed – vendors can easily port their applications from one platform to the other. There’s never been a better time to port with big prizes up for grabs in the Most Innovative BlackBerry WebWorks app on the BlackBerry PlayBook tablet and BlackBerry 6 challenge*!

Additionally, the latest in-market and BlackBerry App World™ storefront device breakdown stats show that an increasing number of users who download applications (both free and paid) have a smartphone running BlackBerry® 6. The upcoming BlackBerry® 7 devices will also expand the market opportunity for developers who ensure BlackBerry 7 compatibility. To get a head start on testing your application on these new devices, learn about the new screen resolutions and download the latest simulators. Also, if your app supports BlackBerry 5.0 and BlackBerry 6 smartphones, you will be able to address the largest market of potential users as possible. Vendors can easily port their applications to BlackBerry 5.0 by checking out which APIs are supported in this version in the BlackBerry WebWorks API guide discussed below, as well as testing with the simulators on BlackBerry Developer Zone.

Here are a few tips and tricks to consider before starting your porting efforts:

BlackBerry WebWorks APIs: There are differences between the BlackBerry WebWorks API sets for the BlackBerry PlayBook tablet and the BlackBerry smartphone, which are documented in the BlackBerry WebWorks API Reference Guide. Some APIs are available only in the BlackBerry WebWorks SDK for Tablet OS, while others are only available in the BlackBerry WebWorks SDK for smartphones. This gap in functional parity is due to the availability of the given feature in the underlying OS. We’ve also recently updated the BlackBerry WebWorks API reference guide to make it more developer-friendly by bringing together both sets of APIs into a single view that makes it easy to see which APIs are supported on each platform. Note that custom JavaScript® extensions are only available on the smartphone version, so if you’ve implemented any of these extensions, they will not be supported on the BlackBerry Tablet OS. Check out the latest BlackBerry WebWorks API Reference Guide.

Optimization: Your BlackBerry WebWorks application may render faster or perform better while running on the tablet, since its hardware specifications are more advanced as compared to the smartphone. However, the BlackBerry 7 OS introduces a “Just In Time” loader for JavaScript which, coupled with the new smartphone hardware, should vastly improve performance. If you are using JavaScript to perform animations, transitions or to conduct intensive computations in your BlackBerry smartphone application, you should look at ways to optimize your code to improve performance. Download the device and BlackBerry PlayBook tablet simulators to validate performance.

Adobe® Flash® Content: If your application contains Adobe Flash content, note that it will be supported on the BlackBerry PlayBook tablet only.

Icon Sizes: Icon sizes are different on the BlackBerry PlayBook tablet as compared to the BlackBerry smartphone. Take a look at the UI Guidelines document for the BlackBerry PlayBook tablet and UI guidelines for smartphones to understand best practices for creating application icons.

Ripple Development Tools: Our friends at tinyHippos have created a tool called Ripple that allows you to easily develop, test, and debug your application for both the BlackBerry smartphone and tablet platforms. Check out the blog post on the Ripple Emulator beta program here. We highly recommend using this tool to develop your BlackBerry WebWorks applications as it provides an easy way to develop for both platforms.

Code Signing: There are separate code signing processes for signing BlackBerry PlayBook tablet versus BlackBerry smartphone apps. Take a look at the guide here on how to sign tablet applications and this knowledge base article on signing your BlackBerry WebWorks application for a smartphone.

We hope these tips help you with your porting efforts and we look forward to seeing your apps in the challenge!

* No purchase necessary. Entry deadline 11:59PM ET on August 26, 2011. Available to be won: four (4) Grand Prizes (ARV: $32,497USD), four (4) First runner-up prizes (ARV: $17,497USD), four (4) Second runner-up prizes (ARV: $9,097USD), one (1) of each per Region; and one hundred Incentive Prizes; ARV: $550USD. The odds of winning a Grand, First Runner-Up or Second Runner-Up Prize depends on the total number of applications received and how the application satisfies the selection criteria as outlined in the Official Contest Rules. The odds of winning an Incentive Prize depend on the time at which an application is submitted and the number of applications received. See Official Contest Rules for complete challenge details at http://www.blackberrypartnersfund.com/webworksrules.

About Adam S.

Adam is a Team Lead on the Developer Relations Team at BlackBerry. He manages technical relationships with ISVs as well as incubating the developing community ecosystem. Adam specializes in producing applications based on web and native technologies.

Join the conversation

Show comments Hide comments
+ -
blog comments powered by Disqus