The spectrum of hybrid mobile app development with Worklight

The hybrid approach to developing mobile apps offers advantages for those wishing to produce pure native apps or those that have HTML5 content.

Earlier in 2012, on January 31, IBM announced its planned acquisition of Worklight, a provider of a mobile application development platform. Several weeks later the deal closed. There’s a lot of discussion of Worklight and IBM’s Mobile Enterprise strategy here at the IBM Impact Conference in Las Vegas this week.

Worklight’s components include a Java-based server that can run on the WebSphere Application Server, developer tools that can integrate with app lifecycle products from IBM Rational, a runtime monitoring and application management console, and multi-device runtime support. For this last part, Worklight uses a hybrid approach based on PhoneGap (now incubating in the Apache Software Foundation as the Cordova project).

A hybrid approach like this is an elegant way of using open technologies and standards to span the full spectrum of mobile application development.

The mobile spectrum for hybrid

The advantages to using HTML5 is that the content (HTML), CSS (formatting and UI), and Javascript (coding logic and UI) are portable across browsers on many devices. Your HTML5 will look and operate the same on Apple iOS, Android, and other modern devices.

If you can build your app entirely using HTML5, do it. You can place it on the web or your intranet and your users can access it anytime they want. You can also update it when you wish. You can also skip the whole app store experience. This approach is based on open standards, the best way we have found to handle interoperability.

At the other end, we have Native. This uses the low level APIs and programming languages for specific devices. For example, for Apple iPhones and iPads you would usually code your app in Objective-C and link in any other libraries you need. The full power of the SDK and device is available to you.

It is also completely non-portable, albeit powerful. When you need to produce an Android version, be prepared to code the app all over again. Each version will look completely native to the device, and this is an advantage to multiplatform approaches that force apps to have a common but non-native look everywhere. (“Our app works the same and looks ugly everywhere.”)

For hybrid apps, you use only enough native code to establish the main processing loop for your app, use device capabilities like the camera, and link in any special binary libraries. You try to maximize your use of HTML5 so that as much of your app is portable. PhoneGap and hence Worklight can help make your use of native code easier to port across platforms. Throw in Worklight’s support for Javascript frameworks like Dojo, jQuery Mobile, and Sencha Touch, and you’ve got a powerful solution.

Here’s something important that a lot of people miss about the hybrid approach. If you use no HTML5 content whatsoever, you still get the app manageability, push notification framework, and security from Worklight. So you get a pure native app that is nevertheless in the same “family” as your mobile apps that do include HTML5.

At the other other extreme, even if you use no special native features and try to have your app being almost completely HTML5, you get to put your app in an app store, and you, once again, get the app manageability, push notification framework, and security from Worklight.

Worklight logoSo Worklight and its hybrid approach covers almost the entire range from pure HTML5 to pure Native.

What if you already have a source of HTML like an app server or portal and want to build a mobile app around it? You can use this content, CSS, and Javascript as the main core of a mobile app built with Worklight. So what you built in the past can be repurposed in your mobile apps.

This also means that your developers’ web programming skills are usable when building Worklight hybrid mobile apps. If you are a software developer, this is a very effective way to quickly add mobile app development to your portfolio of skills.

Some apps will use a lot of HTML5, some will use very little. With Worklight’s hybrid approach, your skills are applicable across many different kinds of mobile apps. This is important, trust me, because you won’t be building just one mobile app in the future.

Also see:

This entry was posted in Mobile and tagged , , , , , , , , , , , , , , , , , . Bookmark the permalink.