Open Source

BlackBerry DevCon 2010: A Developer's Perspective

By John M. Wargo, October 07, 2010

BlackBerry Advertising Service

Announced at the 2009 conference and finally available today is the BlackBerry Advertising Service (BBAS). This service gives BlackBerry developers with a single suite of API's to use to include advertisements from multiple ad sources into their applications while keeping 60 percent of the revenue generated by those ads. RIM has already built relationships with many advertising networks in including Amobee, Jumptap, Lat49, Millennial Media and Mojiva and expects to continue to add networks over time. They even went so far as to announce networks they haven't yet solidified relationships with including Buzzcity, NavTeq, Placecast, Sympatico, Transpera, Where, xAD and more.

As RIM describes it, the service consists of three components: a suite of API's a developer would use to leverage the service, a mediation platform (what RIM calls their web console for managing ad allocations, analytics, tracking, reporting and more) and the relationships RIM has created with the multitude of ad vendors the service works with. Using this service, developers will be able to serve up different types of ads and integrate them with their applications different ways and with other applications on the device as well (adding an event to the user's calendar or adding a restaurant's contact information to the address book).
As with the BlackBerry Messenger Social Platform APIs, the BlackBerry Advertising Service only helps a developer working on a BlackBerry application. If the application under development targets multiple mobile platforms, the developer will be able to use the BlackBerry Advertising Service for the BlackBerry version of the application but will have to look at other services (iAd for iOS for example) for other targeted platforms.

BlackBerry Analytics Service

Another surprise announcement made by RIM at the conference is that they worked with Webtrends to deliver free, enterprise class analytics for BlackBerry applications. With the increased popularity of BlackBerry applications and the tremendous growth of the BlackBerry App World, RIM recognized that application vendors needed an easy way to tell how much their applications were being used and which features/screens were the most popular.

A developer implements the service by implementing calls to the analytics service from within their applications. Once an application has been instrumented and is out in the wild, developers can view metrics for their application from a web console similar to the one shown in Figure 1. The service is expected to be available in early 2011.

[Click image to view at full size]

Figure 1: BlackBerry Analytics Service Console.

The WebWorks Application Platform

One of the most interesting application technologies RIM created recently was BlackBerry Widgets. They announced the technology right about the time they announced end of life for BlackBerry MDS Runtime (essentially a drag-and-drop, point-and-click application builder for BlackBerry) and Widgets was basically seen as its replacement. At this year's DevCon, RIM renamed the tools for creating Widgets to "BlackBerry WebWorks Platform".

With the WebWorks tools, developers build web applications that run within a Java application container; the architecture for the application is as in Figure 2. The application's code (HTML, CSS, JavaScript) plus additional resources (images, videos and more) are all packaged into a Java application (essentially an app with a single screen encompassing a big browser field). RIM provides special JavaScript libraries a developer can use to interact with device hardware such as the camera and other BlackBerry applications such as the calendar, address book, email client and more. If a particular API is not available or if there's custom code that needs to be executed in an application, developers can create JavaScript extensions (written in Java) that can be called from any WebWorks application. WebWorks applications can even be configured as Push listeners, allowing back-end applications to push data into a WebWorks application rather than requiring that the client-side application request updates from the server. WebWorks applications support GPS, text messaging, background processing, interacting with other applications and much more -- pretty much anything you can do in a BlackBerry Java application you can do in a WebWorks application.

[Click image to view at full size]

Figure 2: BlackBerry WebWorks Application Architecture.

The benefits of WebWorks applications are:

Developers can build BlackBerry applications using technologies they are already comfortable with rather than learning Java and the BlackBerry Java APIs.

Applications built on this platform deploy like Java applications, mostly because they are Java applications, through the BlackBerry App World, using Over the Air (OTA) Push or via OTA Pull -- you can't do that today with standard web applications without using third-party tools.

WebWorks applications leverage the same security model available to Java applications, so enterprise administrators, through the BlackBerry Enterprise Server (BES), can finely tune what the applications can and cannot do on a device.

Because the web application is running on-device, within the container, the application can operate when network connectivity is not available and can leverage a local SQLite database for local storage.

It's pretty amazing what you can do with these applications; at the conference, RIM demonstrated many WebWorks applications and you'd be hard pressed to tell the difference between them and native Java applications. They're web applications, so through graphics and CSS plus the available interface API's, you can essentially make the applications look and act any way you want. RIM provides thousands of JavaScript API's and continues to add more over time. At this time, most essential BlackBerry Java APIs are available to WebWorks applications through JavaScript.

The platform consists of a plug-in for either Eclipse or Microsoft Visual Studio; it allows developers to write, test and debug applications all from within the IDE. The BlackBerry simulators plug into the IDE as well, so when you're testing application, you're doing it right alongside the IDE (with real-time debugging). The core of the platform is a packaging utility that takes a web application's files and packages them up into a Java application. This can be accomplished via a command line tool or directly within the IDE. If you're looking for something to compare WebWorks to, think of PhoneGap or Appcelerator Titanium.

Now that RIM is leveraging the WebKit rendering engine, it looks like RIM is putting a lot of effort behind this newly renamed platform. I expect that because it's so easy to build these applications that you'll find most BlackBerry development shifting over to this platform. There will still be a place for building BlackBerry Java applications, but only for high performance, very complicated applications or hardware device drivers that can't be built any other way.

There has been a lot of pressure on RIM to release its development tools using an open source license; considering how often they get sued, it's been a really hard issue for them to address. With WebWorks, RIM is making their first big contribution to the Open Source community. RIM has released the full source code for WebWorks to GitHub. RIM expects developers to take Java APIs that haven't been exposed through the WebWorks JavaScript libraries and publish their own libraries that leverage them. Expect RIM to make additional open source contributions over time.

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task.
However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Video

This month's Dr. Dobb's Journal

This month,
Dr. Dobb's Journal is devoted to mobile programming. We introduce you to Apple's new Swift programming language, discuss the perils of being the third-most-popular mobile platform, revisit SQLite on Android
, and much more!