Now that the BlackBerry 10 smartphone platform has finally been launched, along with the new Z10 and Q10 devices, it’s clear that the newly re-named BlackBerry is targeting the BYOD market with the latest version of BES and its new OS. Built on the QNX real time OS, BlackBerry 10 can take advantage of its built-in sandboxing to separate personal and corporate data – and personal and corporate applications.
With a device running BlackBerry Balance, IT departments are able to lock down corporate partitions and corporate data, while your own personal apps and information can run uncontrolled. There’s separation of church and state, data can’t be shared across the partitions even though you can be running a personal app at the same time as a business app.
That means it’s easier to build and run your own apps. While your code might be designed to work inside the corporate Balance partition, you can build and test in your own space without affecting corporate apps. Once an app is ready to distribute you can work with IT to get it signed with a digital certificate and added to a private enterprise store. Of course if you’re working with publicly accessible data and services you can add your app to the public BlackBerry World store, or sideload it onto colleagues’ devices using a free code signing key.
BlackBerry has taken an unusual, and interesting, approach to mobile application development -- one that’s more akin to the PC model. Instead of limiting development to one framework and one toolkit, BlackBerry 10 gives you a wide choice of different application development frameworks – from C++ and QT, to ActionScript and AIR, to HTML5 and BlackBerry’s own WebWorks – and Android apps can be wrapped and delivered as BlackBerry apps, running on a version of the Android virtual machine. All deliver code that runs on the device, and that can take advantage of core device APIs, including access to device sensors and integration with the BlackBerry Messenger Service.
If you’ve tried downloading BlackBerry development tools in the past, you’ll find the new BlackBerry developer site a lot easier to use – and there’s no need to register for downloads. All you need to do is click and go…
Building a WebWorks app is just like building a mobile web site – and you can use the same tools you’ve always used. Code can be edited in any development environment, whether it’s a basic text editor or a web design package like Dreamweaver. You’ll need to start with a config.xml file that describes the app you’re building. You’ll use this to describe the resources, features, and capabilities of an application – as well as the permissions it needs on a device. If you’ve developed an HTML widget for any other framework in the past you’ll find configuring a WebWorks app very familiar – right down the XML syntax of the configuration document.
The Ripple emulator is an important part of WebWorks, as it lets you quickly test your code inside a desktop browser, without needing to run a full device emulator. Once installed in Chrome, all you need to do to test your app is click the Ripple button in the toolbar. You will need to configure the SDK path, the root folder for a project, and a name for the final app (and where you want to deliver the compressed files that make a completed app). Once you’ve tested an app you can click the package button and run the resulting files on an emulator or on a BlackBerry 10 device.
If you don’t want to make an app available through BlackBerry World you can use debug tokens to sideload on to up to 100 BlackBerry devices. Tokens are valid for up to 30 days at a time, and let unsigned apps run – once a token expires you’ll need to install a new version of the app with a new token. You can only have 100 tokens in use at any one time, so it’s a procedure that’s really only suitable for departmental applications or for your own personal code.
WebWorks apps can take advantage of many of the same device features as native BlackBerry apps. These include the ability to launch other apps and to get access to the device location. The launch API lets you do a lot more than just fire up an app. You can add new contacts, send SMS messages, make phone calls, and open the camera. Other APIs handle notifications, integration with BBM and using the PIM applications, as well as BlackBerry’s own push service.
With BlackBerry 10 vying for third place in a crowded mobile marketplace, the company has worked hard to attract and support developers. The result is one of the most open mobile platforms around, and with WebWorks one that’s accessible by anyone who’s built a web app. Taking your web applications with you wherever you go makes a lot of sense, especially with ability to take advantage of the BlackBerry features we’ve grown used to over the years, even on a new platform. Free tools (and sample code on github) make it easier to get started, using WebWorks to quickly bundle your sites up into apps – and share them with colleagues.