by David Wilkerson, CTO
Welcome to mobility, IBM? This year IBM acquired Worklight, an interesting product for developing hybrid mobile apps. The tool was widely discussed at the IBM Exceptional Web Experience event in Austin, TX and although I was not able to attend I heard some of the buzz. Intrigued, I decided to develop an iPhone app using Worklight.
Let me start with a caveat. I have downloaded hundreds of tools for preview and in almost every case found the documentation to be sadly deficient, the tool to be somewhat buggy, and the features to be less than exciting. The process I am about to describe was exceptional. Of course my app is nothing more than “Hello World,” or in this case “Hello Worklight,” but contrary to past experience, Worklight was a pleasure to work with.
The tool consists of several moving parts and because I wanted to develop the app for an iPhone or an iPad, I needed to work on my Mac. Why? Because the native code for iOS environments can only be manipulated with Apple’s SDK.
Visit the download site for instructions to download, install, and configure the parts needed to start developing. You will need your IBM ID to access the page.
On the instruction page there are six steps:
(1) Download and install MySQL (Mac or Windows)
(2) Download the JDBC driver for MySQL
(3) Download the Worklight Server
(4) Download and install Eclipse (I used their link and installed the Indigo edition)
(5) Installed the trial version of the Worklight plugin.
(6) Configured my development environment as described in the Getting Started tutorial.
To create a mobile solution using Worklight the developer will first create a Worklight project and then an application. The project is displayed in the project explorer window and there were a number of familiar folders. The project folder structure is initially very simple with containers for adapters, apps, bin (binaries), and lib (libraries):
The bin directory and the lib directory are for deliverable and 3rd party libraries associated with the project.
Development is done in one or more “environments.” The default environment is called common. This environment contains resources that are shared among any other environments. In my case, I wanted to create an iPhone application. To do this I add a new environment using the context menu available on the app folder.
Once I added my iPhone environment I decided to test the app. In order to test the app on the iPhone I had to first build and deploy the app to the Worklight server. This is easily done with the context menu of the app folder.
In the web console of the Worklight server is a preview option that will display the app in a conventional browser interface.
After previewing the app through the console I proceeded to deploy the app to XCode. XCode is the Apple development environment of iOS development. You have to register as an Apple Developer and join the program in order to obtain the SDK. The development tools also include the iOS simulator for various versions of the operating system. To access this preview I used the context menu of the iPhone development environment I added earlier to Run As Xcode project.
XCode will open and the iPhone app project is imported into the tool. The tool validates the app and then launches the simulator.
In order to do anything “interesting” with the app, the developer is required to define an adapter to interact with a backend system. In an article on his private blog, Sunil Patil, a WebSphere Portal consultant, describes his experience defining an adapter. Patil concludes that the tool itself is simple and seems stable. The key component is the Worklight server, as this is the platform responsible for integration with the enterprise.
Whether the market will accept the notion of hybrid apps is not something I can decide just yet. However, it seems clear that the market wants more than a web only app solution. Can Worklight deliver this? I think there are some real possibilities but only time, and IBM’s intention for the product, will tell.
This article is from our monthly resource e-Newsletter. Did you miss it in your inbox? Visit our eNewsletter archives for past editions or if you want to receive our monthly newsletter automatically, simply write to Ruth Jarvis and request to be added to our E-Newsletter list. Thank you!