IBM Worklight v5.0.5 > Migrate from the WAS Feature Pack > Migration scenarios

Migrate an application that uses the client programming model

Migrate a mobile app using the IBM Worklight client programming model, where the mobile web application is repackaged as a mobile hybrid application.

IBM Worklight assumes that the application is packaged with HTML, JavaScript, or CSS and that it can be updated in static form to the native shell, using direct update features. After migration, you can package the app and deploy it to an app store.

To maximize the reuse of services and user interface code, you can refactor the code to use Environment and Skin support. Keep the basic code in the common directory and create overrides for each environment. Use dojo/has feature detection for skin-specific behaviors.

Finally, you can extend your mobile app to use advanced features of Worklight. For example, you can use Cordova to control device features such as cameras, and you can use Worklight client APIs to control security.

  1. Create an Worklight application, selecting the appropriate target environments.

    A common directory and a directory for each environment are generated.

  2. Because devices vary in the features or functions they have, you can use application skins to provide a finer distinction than environments.

    The Worklight application skin is a user interface variant of an application that can be applied during run time based on runtime device properties. These properties include operating system version, screen resolution, and form factor. For example, within the Android environment folder, you might create a subfolder for Android 4.0 to take advantage of features only available in Android 4.0.

  3. Migrate the project structure to the IBM Worklight Environment Model:

    1. Copy common web resources to the common directory.

    2. Continue to use "has" feature detection...


    3. Continue to use the deviceTheme feature for default Dojo mobile themes.


Parent Migration scenarios