<img height="1" width="1" style="display: none" src="https://www.facebook.com/tr?id=976470819114134&amp;ev=PageView&amp;noscript=1">

IBM Worklight - extension of Apache Cordova

Our R&D developers have been playing with IBM Worklight quite a lot recently and think it’s pretty fantastic, so we wanted to share a few of its features. Just quickly though; what is Worklight?

In a nutshell, Worklight helps you build cross-platform mobile applications more easily. Because it takes care of some tricky things like code translation, it means there’s much less complexity during development. And what that means is you can get a highly functional app out to market faster - which is obviously very important in this fast-changing environment we find ourselves in.

Delving just a little bit deeper into the technical side of the product, Worklight has five main components;

The purpose of this particular blog isn’t to cover everything, but rather to give a brief rundown of some main features of the Worklight Studio and Worklight Device Runtime Components, plus a couple of other points of interest.

Features of Worklight Studio and Worklight Device Runtime Components

1. All the features of Apache Cordova

Apache Cordova is a set of device APIs that allow a mobile app developer to access a native device function - such as the camera - from JavaScript. Apache Cordova forms part of the underlying software within the open-source framework Phonegap. In turn, Phonegap is leveraged by Worklight to help extend its own capabilities well beyond that of the open-source framework. Ultimately what you get is a framework that’s a uniform bridge between standard web technologies and the native functions that different mobile platforms provide.

2. Several authentication mechanism options

Worklight provides a list security method to protect user resources from both vertical and horizontal perspectives. Types of resources that can be protected include adapter procedures, applications and static Worklight web applications such as the IBM Worklight Console.

3. Offline cache encryption and JSONStore

Encrypted Offline Cache (EOC) is a mechanism for storing sensitive data on client applications, but Worklight provides another encryption mechanism called JSONStore. What JSONStore offers is improved on-device storage for offline access, as well as full IBM support. JSONStore uses the same encryption form and security mechanisms as EOC, but the IBM Worklight Team is responsible for making major technical updates to JSONStore.

4. Data synchronization

Using the JSONStore API, the existing adapter connectivity model can be extended to store data locally and push changes from the client to a server. The local data store can be used to search, update and delete data, while it’s also secured using password-based encryption.

Convert Phonegap to become a Worklight application

As mentioned above, Phonegap is an open-source framework leveraged by Worklight to help enhance the latter’s offering. The following points deal with converting a Phonegap application into a Worklight application.

1. Purely web-based Phonegap applications

This concerns applications that do not have direct control over native device functions. - they normally consist of Javascript files, CSS files, images, HTML files and original platform-specific files. Since Worklight also provides similar platform-specific structure, converting Phonegap to a Worklight app is the same as adding a web-based resource into a Worklight project. A clear understanding of this helps reduce the complexity of relevant conversion tasks.

2. Hybrid Phonegap applications

This type of application involves having direct control over native functions of device, and that’s the main difference between purely web-based Phonegap applications and Hybrid Phonegap applications. In order to convert this type of application, you need to convert both the web-based resource and some native resources, such as activity files.

IBM Worklight Shell Component

Shell Component is a feature provided by Worklight with the idea being to create two levels of development inside the organization; skilled native developers and web-based developers. Shell component consists of native classes and shell-specific web resources to be used for its inner applications. Normally, native developers are responsible for the shell development.


Acknowledgement: Parts of the information above reference that which can be found in the IBM Worklight Infomation Center: