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.
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.
- Create an Worklight application, selecting the appropriate target environments.
A common directory and a directory for each environment are generated.
- 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.
- Migrate the project structure to the IBM Worklight Environment Model:
- Copy common web resources to the common directory.
- Continue to use "has" feature detection...
- Continue to use the deviceTheme feature for default Dojo mobile themes.
Parent Migration scenarios