IBM Worklight Mobile Application Development Essentials

By Muhammad Saifuddin , Talha Haroon
    Advance your knowledge in tech with a Packt subscription

  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies

About this book

IBM Worklight helps you extend your business to mobile devices. It is designed to provide an open, comprehensive platform to build, run, and manage HTML5, hybrid, and native mobile apps. IBM Worklight can help you reduce both app development and maintenance costs, improve time-to-market, and enhance mobile app governance and security. The best part of IBM Worklight is that it contains numerous built-in modules used for Mobile Development to extend the functionalities to facilitate users.

This book will help you understand the development of Enterprise Mobile applications by introducing you to IBM Worklight and helping you create your own mobile applications. By the time you are half-way down through the book, you will gain a clear understanding of mobile application Development development with a high level architecture. By the end of the book, you will have knowledge of the best practices for Mobile Application Development using IBM Worklight and this will help you to build an IBM Worklight mobile app from scratch.

The book covers the most efficient practices of utilization and will assist you in developing Mobile applications in a very short time. You will then learn about advanced level development, for example, WorkLight security mechanisms, customizations, and data handling. In conclusion, you will be guided through the advanced features of IBM Worklight, which will help you modernize your mobile application to its best potential.

Publication date:
February 2014


Chapter 1. Getting Started with IBM Worklight

The mobile industry is evolving rapidly with an increasing number of mobile devices, such as smartphones and tablets. More people are accessing services via mobile devices than ever before. The mobile solution is directly impacting businesses, organizations, and their growing number of customers and partners. Even employees now expect to access services on a mobile device.

This chapter is an introduction to Worklight and where it fits into IBM Mobile Application Platform. At the end of this chapter, the reader will understand the basic components of IBM Worklight and how it contributes to building mobile applications. Currently, there are several approaches for mobile application development, such as the following:

  • Web development: This approach uses open web client programming modules, such as HTML5 and JavaScript.

  • Hybrid development: This approach uses the app source code that consists of the web code, executed within a native container that is provided by Worklight and native libraries.

  • Hybrid mixed: The developer adds arguments to the web code using the native language to create unique features and access native APIs that are available via JavaScript, such as APIs for a camera, an accelerometer, and other functionalities.

  • Native development: In this approach, the application is developed using native languages or transcoded into a native language via MAP tool's native appearance device capabilities, and performance.

To develop a similar application on a different platform requires a different level of expertise, which is expensive in terms of cost, time, and complexity. The following table outlines the major aspects of the different approaches to development. Reviewing this list can help you choose the approach that is ideal for your particular mobile application.




Mobile Web


  • Objective C

  • Java

  • HTML5

  • CSS3

  • JavaScript

  • Client-side frameworks

  • HTML

  • CSS

  • JavaScript


App store

App store


Development speed




Device accessibility

Full native device access

Full native device access

Partial device access

Application maintenance




The hybrid development approach is about taking advantage of both native and mobile web development approaches. It benefits from the versatility of web technologies combined with powerful device features and SDK. It is well suited for a range of applications and can still provide good user experience.

The following table highlights the advantages and disadvantages of the hybrid approach:

Advantages of the hybrid approach

Disadvantages of the hybrid approach

Lower learning curve

Performance of the application is slightly slower than native approach because of the data access across multiple layers

Fast to develop and release

Easy to port, making it cost effective

Access to and support for native device functionality

When escalating the business perspective to the mobile platform, we need to build an application for web-based responsive mobile apps with rich development environment for better performance and vast access control. IBM Worklight seems to be the most efficient and optimized to handle any kind of interactive and enterprise mobile application. Generally, the hybrid solutions are dependent on less secure or custom security identifiers, but Worklight's built-in security modules provides perfectly improvised frameworks to implement. Besides all of its classified and highly efficient features, it provides a complete studio to implement rich application development. For server-side security and implementation, it provides complete console management and accessibility for every component. It can also be utilized for creating a report and generating a complete view to study application statistics and performance. If you merge all cross-platforms into one, then IBM Worklight will be much trusted and efficient to use for business modernization and management.

IBM Worklight is an extensible mobile application platform that brings together many mobile capabilities into a single product and allows organizations to develop and deliver HTML5, hybrid and native applications, and deliver these applications with mobile middleware, security features, integrated data management, and analytics capabilities.


The IBM Worklight solution

In 2012, IBM acquired its very first set of mobile development and integration tools called IBM Worklight, which allows organizations to transform their business and deliver mobile solutions to their customers. IBM Worklight provides a truly open approach for developers to build an application and run it across multiple mobile platforms without having to port it for each environment, that is, Apple iOS, Google Android, Blackberry, and Microsoft Windows Phone. IBM Worklight also makes the developer's life easier by using standard technologies such as HTML5 and JavaScript with extensions for popular libraries such as jQuery Mobile, Dojo Toolkit, and Sencha Touch.

IBM Worklight offers an open platform to assist businesses to deliver existing and new mobile applications to multiple devices. According to IBM, "it is an important piece of IBM's strategy" that simplifies end-to-end security and service integration between mobile applications and backend systems. Additionally, it helps clients dramatically reduce mobile application time to market, cost, and complexity. Moreover, IBM Worklight came up with variety of components to efficiently develop, test, connect, run, and manage mobile applications.

The following screenshot summarizes the capabilities, extensive frameworks, and tools within Worklight:


Worklight capabilities and supported platforms

A relative newcomer to this world of cross-platform development, Worklight has dramatically taken its place within the community. IBM Worklight aims to change the way in which mobile developers think about creating rich functionality in their mobile applications. It does this in a very efficient manner, providing a complete platform for development unlike other cross-platform developers who only offer libraries to do the job.

Development in IBM Worklight is similar to web development, where developers and designers can leverage their existing knowledge of Cascading Style Sheet (CSS), Hypertext Markup Language (HTML), and straightforward JavaScript to manipulate pages and their elements directly, making development more rapid. The IDE works in conjunction with the native SDKs while building an app for Android.

The IDE builds and compiles the Android project and exports it within the same IDE. For iPhone, it generates files for an Xcode project.

In this book, we're going to take an in-depth look at what Worklight has to offer for building rich mobile applications. Let's start by finding out what exactly Worklight brings to the mobile development environment.


Components of Worklight

IBM Worklight is a mobile application platform containing all of the tools needed to develop a mobile application. If we combine IBM Worklight components into a stream, it would be clean to say that hybrid mobile application development is tightly coupled with a baseline.

Each component in Worklight is integrated with the other, for the creation of a rich interface and cost-effective mobile app in fragments, and to control the growing portfolio of an application. IBM Worklight provides high user experience index and full device access with native controls. It is a mobile application development tool that contains all modules, including the mobile application development framework and modules for testing and distribution. There are mainly two development editions:

  • IBM Worklight Enterprise Edition

  • IBM Worklight Consumer Edition

IBM Worklight Enterprise and Consumer Editions are identical except for the licensed models. The Consumer Edition is completely licensed per mobile application, whereas the Enterprise Edition contains license per device.

Every specified component provides a bundle of functionalities and support. The following is the lifecycle for mobile application development:

  • Worklight Studio: IBM Worklight provides a robust, Eclipse-based development environment called Worklight Studio, which allows developers to quickly construct mobile applications for multiple platforms.

  • Worklight Server: This component is a runtime server that activates or enables secure data transmission through centralized backend connectivity with adapters. It is used for offline encrypted storage, unified push notification, and many other applications.

  • Worklight Device Runtime: The device runtime provides a rich set of APIs that are accessible across platforms and offer easy access to the services provided by the IBM Worklight Server.

  • Worklight Console: This is a web-dependent interface for real-time analytics, managing push notification authority, and mobile version management. Worklight Console is a web-based interface and is dedicated to ongoing administration of Worklight Server and its deployed apps, adapters, and push notification services.

  • Worklight Application Center: This is a cross-platform mobile application store that fulfils specific needs for mobile application development teams.

Each component is discussed in detail in the following sections.

Worklight Studio

IBM Worklight Studio provides a complete extensible environment with maximum code reusability and device optimization. It contains client-side implementation and web technologies that rely on the Worklight optimization framework. In this component, a user can find third-party library integration with device SDKs. The main purpose of this module is to create a hybrid application that can be used on and is deployable to any mobile platform such as Android, iPhone, Blackberry, and Windows Phone.

Features of the Worklight Studio platform

The preceding screenshots illustrates the Worklight Studio. It's an Eclipse-based IDE to facilitate the developer with operating and controlling projects in a normal hierarchical structure and to organize the source code for easy access. It is responsible for code maintenance, framework implementation, and rich multiplatform development. It also contains a variety of procedures to achieve device portability.

We will explore the key functionality advantages of Worklight Studio in the following sections.

Pure native and web development

IBM Worklight Studio provides complete extensibility and compatibility in pure native and web application development. With a very simple wizard, a developer can easily add JavaScript frameworks such as Dojo, jQuery Mobile, and Sencha Touch and IDE provide a WYSIWYG editor for quickly building UIs in a drag-and-drop fashion with the support of UI components.

Shell development and concept

IBM Worklight provides a hybrid shell for mobile applications that offers all capabilities to web and native technologies. By creating a custom shell, you can add third-party native libraries that include Cordova/PhoneGap plugins and can implement custom security modules and extend features specific to enterprise modernization. The shell could be used as enforcement of corporate guideline specifications for designing and security rules. For example, a shell can be utilized to improve and amend default mobile applications or to control native features.

Optimized framework

Worklight Studio provides a common environment to be used as the simple development point that shares all code basis into one stream. An optimization framework consists of the skin concept (runtime skinning) that actually enables an interface for mobile applications depending on the device. This feature enables the runtime interface and enables different sets of customizations. All these settings are device dependent and can easily be transformed to hold any set of code.

Integrated development and mobile simulator

Worklight Studio can be used to develop a component called IBM Worklight Adapters for your application within the same integrated development environment. It allows you to test these adapters thoroughly. It also provides a browser-based mobile simulator for testing web and hybrid applications within IBM Worklight Studio. Mobile simulator is a cross-platform testing module for mobile devices with the support of various Apache Cordova APIs. It allows you to test hybrid applications that use device features without having to run them on the physical device. This reduces redundant development time and effort required for repeated deployment on devices.

Besides this, IBM Worklight Studio allows you to set Ant tasks that can be used to run any mobile application on multiple platforms. IBM Worklight Studio is available in three editions. The Developer edition provides all of the tools needed to build a mobile application. The Consumer edition and Enterprise edition add enterprise-level security and integration with the IBM Application Center.

Worklight Device Runtime

The IBM Worklight Device Runtime component delivers a smooth and uniform bridge between web technologies (HTML5, CSS3, and JavaScript) and the additional native functionalities added to the various platforms. IBM Worklight Device Runtime supports a variety of mobile OS and release levels.

The following screenshot shows the different features in Device Runtime that reduce the complexity and implementation time frame for a developer:

The following section provides details about the various features of Device Runtime:

  • Cross-platform Compatibility Layer: By using this layer, hybrid mobile applications can access common control elements such as tab bars, clipboards, and native device interface features.

  • Server Integration Framework: This allows applications to utilize a Server Secure Layer Connection to connect to the server all the time.

  • Encrypted Storage: This layer helps to access application restoration data in an encryption that helps a user to access data using this API.

  • Reporting for Statistics and Diagnostics: In this layer, the Mobile application transforms the data and sends it to IBM Worklight Server by executing an event that stores the data in a separate database.

Worklight Server

This component is utilized to bind a client-side/server-side integration with built-in security prevention and helps the application to have a strong communication with the backend system. This complete framework based on the cryptographic module to protect user-specific information as well as server specifications. The following screenshot is of the structure of IBM Worklight Server:

The following is a brief description of the structure of IBM Worklight Server:

  • Server-side Application Code: This module defends the security and performance of a mobile device. By using this code, you can have direct access to the backend system or cloud-based services.

  • JSON translation: JSON is a lightweight data structure format, such as XML, that automatically converts hierarchical data responses with optimized consumption.

  • Authentication Framework: If your mobile application is based on Worklight Server, you can benefit from enterprise-class security, which enables single sign-on using Lightweight Third Party Authentication (LTPA).

Worklight Console

IBM Worklight Console is an administration component based on the web interface. This web-based console is used to enable/disable applications, adapters, and push notification rules.

You can manage a mobile application by activating/deactivating its outdated versions. It can also be used to publish messages or notifications to users regarding new updates and new features released. Worklight Console contains an identifier to ensure security and application provisioning for users. This console also assists administrators with viewing statistics and user information from all running applications on IBM Worklight Server. This helps to make decisions regarding specific platforms, user interaction, and performance overview.

Worklight Application Center

Worklight Application Center is a web-based internal enterprise store to centralize mobile applications, including distribution, installation, and feedback. An application catalog helps to find available mobile applications that provides feedback on application versions.

During the development lifecycle, Application Center can be used to inline the movements of new application versions from the development point of view. It allows multiple versions of applications and can also be utilized to limit versions for any group of users as well as applications.



In this chapter, we have covered the history and background of IBM Worklight, approaches used in mobile development and why Worklight is the right choice between other mobile application development solutions with its inline efficient tools and components.

In the next chapter, you're going to install Worklight (Worklight Studio and Worklight Server) to set up the development environment on your computer to manage your application's lifecycle from development to deployment. Moreover, you'll be guided in setting up the Android SDK within the same environment to test the application on an Android simulator. This will help you to run and follow along with the examples discussed throughout this book.

About the Authors

  • Muhammad Saifuddin

    Muhammad Saif Uddin has diverse experience in mobile, software, and web development. For the past few years, he has been exploring new mobile development environments to make mobile app development easy in the future. He has exposure to most of the development technologies that exist but is mainly focused on Android and iOS mobile development. He has successfully designed over 30 mobile apps, which are distributed on iTunes and App Store—AMEX Mobile and Bayt Mobile are two of these apps. He is also IBM Worklight Certified, and besides his remarkable knowledge of the mobile world, he has introduced many enterprise and web applications with Responsive Web Design. He blogs at and writes articles and tutorials on different technologies that include Android, Worklight, and Java. He lives in Karachi, Pakistan, with his wife and family.

    Browse publications by this author
  • Talha Haroon

    Talha Haroon initially started working in the HRM and CRM fields as his main areas of focus, but later on in his career path, he dedicatedly moved to MobileFirst. If we glance at his specialities, then it would become apparent that he has proficient expertise in ERP's development and customization as well as mobile hybrid development. He is also IBM Worklight Certified and has deployed and developed many enterprise and mobile applications in which AMEX Mobile app and are the most highlighted and his biggest products. Moreover, he has introduced some futuristic business processes that will assist retail businesses to grow by themselves.

    Browse publications by this author
Book Title
Unlock this book and the full library for FREE
Start free trial