Application designer and developer are freely to choose which technologies to use when building blackberry solution: java or web.
Java applications are deployed directly in the device and provides very high level of interoperability with native systems and use a huge set of powerful java APIs. These type of application tends to be very powerful and functionality however the developers and designer should spent some times to design an attractive user interface, on the other side, the web application (widget) can be used to describe any content that can be access by a web browser. These type of application is easy to design and develop because is based on standard web technologies, that are well common by developer, but provides a less integration with the device. They cannot access the most of the blackberry java APIs.
|Easy to design user interface||no||yes|
|Ability to integrate with native system||yes||low|
|Dependency on network coverage||no||yes|
The concept of hybrid blackberry applications, that is the merging of java development and web development technologies, to get the best from both world, is an emerging reality nowadays. Developer can build powerfully java application that combines the use of embedded browser object with the functionalities provided by the native blackberry device software.
The old way
Before JDE 5.0, you had only one way to add web content to your application: BrowerField APIs.
The additional cookie management code will need to handle storing the cookies, applying correct domain matching policies, and expiring the cookies appropriately. Moreover you should correctly pass any valid cookies along with a new request…
Cookies, caching, server side redirect, headers it a brief list of thing that you should manually handling when using the BrowserField 1.0 APIs.
You can learn more on the net.rim.device.api.browser.field looking at the sample applications, BrowserContentManagerDemo and BrowserFieldDemo, that demonstrates how to create a web browser using the old API. The samples application are distributed in the sample folder of each JDE installation.
BrowserField 1.0 may fails to rendering some page on older devices, keep in mind this aspect if you intend to display “untested” or arbitrary web page on this field.
Introducing Browser Field 2 API
Introduced in blackberry JDE 5.0 the new Browser APIs included in the package net.rim.device.api.browser.field2 adds important improvement on the embedded browsing area. The new api called Browser Field 2 exists alongside the old api and not replace the previous embedded browser api. The most important improvement Browser Field 2 API has over Browser Field API is that it is use the same rendering engine of native browser. Layout Engine determines how web content is rendered.
BlackBerry Browser Layout Engine Overview
Original – introduced in 4.1, still exists in 5.0
Mango – name for new engine introduced in 4.6
|Device Software||Native Browser||BrowserField1||BrowserField2|
This is a very important changes, it ensure that a web content displayed in application will look similar to web content rendered in the native browser application running on 4.6 device or later.
|Send GET/POST request for a web resource||yes||yes|
|Render web content to the screen||yes||yes|
|built-in cookie manager||no||yes|
|history collection and management||no||yes|
|Access to the DOM||no||yes|
|Built in listener||no||yes|