BlackBerry’s struggles to stay alive over the last couple of years, in a market that it single-handedly invented, are well documented. I participated in that fight in my own small way by creating and delivering training to enthusiastic developers around the world. During that period, I lived and breathed BlackBerry so it’s no surprise that the topic of my last article was related to BlackBerry development. A lot has happened since I wrote that post. A BlackBerry 10 OS update has hit the market (10.2), the 10.2 Native SDK has gone gold, and the corresponding WebWorks SDK was realigned with the Apache Cordova open source project.
While the Native SDK has been released for some time, the BlackBerry WebWorks 2.0 SDK just went Gold today! This represents an exciting new set of opportunities for “old-school” WebWorks devs and it also represents an open invitation to a significant group of mobile devs who are already building their mobile apps with Cordova.
If you’re coming to the new WebWorks SDK with Cordova experience, then “blackberry10″ is just another new platform that you can target. But if you’re a traditional BlackBerry WebWorks developer, there are a few changes you’ll need to learn about. Here’s a summary of what’s new:
- Accessing BlackBerry APIs
- BlackBerry 10 WebWorks v1: You had to manually add a <feature> element to your config.xml document for each API or set of APIs that you wanted to use in your application. The BlackBerry WebWorks Packager (bbwp) took care of bundling the necessary libraries into your application at packaging time.
- BlackBerry 10 WebWorks v2: Now you use the command line to add libraries (known as plugins) to your application at design time. The required libraries are added to the plugins/ folder.
- Application packaging
- BlackBerry 10 WebWorks v1: You used the command line to execute bbwp manually or you used the Build and Deploy service in Ripple.
- BlackBerry 10 WebWorks v2: The command line is still an option for packaging and deploying your applications but Ripple has been replaced by a browser based tool that can edit your application’s configuration document, package and sign your apps and deploy them to a device or simulator.
- Application initialization
- BlackBerry 10 WebWorks v1: You had to include the webworks.js script and then wait for the webworksready event to fire to initialize your app.
- BlackBerry 10 WebWorks v2: Now you include the cordova.js script and you initialize your app in response to the deviceready event.
- Setting up to sign applications and create debug tokens
- BlackBerry 10 WebWorks v1: You used to have to apply for a developer key, wait for the email attachments to appear in your inbox and then register those keys on the command line to generate the developer certificate that would allow you to sign your application so it could be submitted to BlackBerry World.
- BlackBerry 10 WebWorks v2: Now your developer token is associated with your BlackBerry ID so it is provided immediately upon submitting the application form. There’s no more waiting for email attachments. Your developer certificate, which is used to digitally sign your application package, is generated using the command line and now it can be done right away. If you already have a developer certificate, it can be linked to your BlackBerry ID using a simple command line tool.
- Testing your applications
- BlackBerry 10 WebWorks v1: Ripple was the recommended tool for quickly emulating your application’s web content. You used a Chrome extension to enable the emulator to wrap your application in what looked like a BlackBerry 10 device in your browser window.
- BlackBerry 10 WebWorks v2: Ripple is not compatible with the new WebWorks SDK. You can still test your application’s web content in a browser but, as always, you must use a simulator or a device to test your application’s BlackBerry 10 features: BBM integration, the Invocation Framework, etc.
Stay tuned as I continue to drill into each of these points in more detail in the coming weeks. And head over to BlackBerry Developer to download the latest SDK to get started.