How To: Turn your jQuery app into a HTML5 using BlackBerry WebWorks app

Are you working with jQuery wondering what you need to do to bring your app to the BlackBerry platform? Maybe you’re already a web developer considering BlackBerry, jQuery, or both. If you fall into any of these camps, head on over to our jQuery to WebWorks Fundamentals Guide for some pointers. Learn what you need to do in order to port your web solution to BlackBerry smartphones and tablets, what BlackBerry WebWorks can bring to your project, as well as considerations for leveraging jQuery.

This article is intended to guide BlackBerry® WebWorks™ developers who are considering jQuery™ within their application, or jQuery developers who are considering branching out to one of the available BlackBerry platforms.

This article starts with a brief overview of what jQuery and WebWorks can offer, followed by the steps to configure your PC for WebWorks development along with instructions for launching a basic Hello World jQuery sample.

Following WebWorks configuration, we dive deeper into jQuery: it’s advantages and limitations, as well as additional considerations when leveraging JavaScript® frameworks.

What is jQuery?

At the core, jQuery is a JavaScript library that simplifies many complex actions such as DOM manipulation or web service calls via JSON or Ajax. This allows a developer to minimize the amount of code they write, reducing development cycles, and eases the future maintenance/update of their applications as well.

If you haven’t yet, now would be a good time to get acquainted with the jQuery website:

One key thing to remember is that since jQuery is built on top of JavaScript, what will or will not work becomes dependent on a platform’s support of JavaScript. If you have a desktop browser-based solution already implemented with jQuery, there is a very good chance that newer platforms will simply run your code.

jQuery can be used under the MIT or GPL licenses and is available for use within commercial applications.

Why WebWorks?

When you hear WebWorks, think HTML5. The best starting point for WebWorks development related would the following microsite:

Here you can find samples, guides, as well as a detailed API reference for WebWorks specific functionality.

For developers who already have a jQuery solution hosted on the web, they may be asking, why do I need a WebWorks application, can’t I just direct users to my website?

This is a valid question and really depends on the project you’re providing.


The difference between existing within an end-user’s browser bookmarks, or on the home screen can be a big deal. Even if you’re not planning on making any changes to your application, a Launcher Icon can ensure that your application stays visible to the user and minimizes the steps it takes to access your application.

Getting onto devices are now simpler than ever too as you can distribute your application via BlackBerry App World™ to the millions of subscribers who are downloading applications every day. No registration fees, no submission fees.

Finally, the option to make the resources of your application local to the device can not only reduce load times, but allow your content to be accessed without the requirement of a data connection.


jQuery is great at many things, but at the end of the day it is a JavaScript framework and limited to what JavaScript can do. If you’re looking for a solution that deeply integrates with the platform it is on, a WebWorks application will give you access to the BlackBerry OS that JavaScript/jQuery simply can not. Some examples include:

Platform Services

There are a number of BlackBerry-specific services that are offered as a part of the WebWorks platform.

  • Advertising– Earn additional revenue with in-app advertising.
  • BlackBerry Messenger– Integration with BBM™ has driven application downloads to new levels.
  • Payment– Leverage the business model that’s right for your application.
  • Push – Allows content to be delivered directly to end-users in real-time.

Hardware Integration

WebWorks APIs give you access to GPS and device movement information. Combined with camera and microphone support, truly unique products can be created.

Leverage Native Apps

Direct access to the device’s messaging capabilities (email, SMS), phone, and media applications allows you to integrate directly with the functionality that users have come to expect.

Filesystem Access

Server-side storage is a boon in many cases, but the cloud isn’t a one-size-fits-all solution. Client-side access to the filesystem gives new opportunities for data storage, retrieval, and presentation.

More information on leveraging these APIs can be found within the WebWorks API reference.