IBM Worklight v5.0.5 > Migrate from the WAS Feature Pack > Migration scenariosExample: Migrate the Dojo showcase sample from WAS FP for Web 2.0 and Mobile
The application to be migrated is the Dojo showcase which is a mobile web application that demonstrates the capabilities of the Dojo toolkit. You can run the demonstration at...demos.dojotoolkit.org/demos/mobileGallery/demo-iphone.html
To migrate the application...
- Create an Worklight project and create an Worklight application in the project.
- Copy all the resources for the web application to the common directory of the Worklight application.
- The Dojo showcase application contains only static html pages. If you have remote dynamic server pages, you can either use the JavaScript templating library or use web view.
The JavaScript templating library renders the pages locally on devices. Web view loads the remote server pages.
- In application-descriptor.xml, set the content of the <mainfile> element to point to the correct startup html page.
- If you have startup JavaScript logic that initializes the web application when the browser loads it, move the startup logic to the wlCommonInit method of the .js file in...
common/js
Worklight initializes its own library and runtime environment during startup and the application startup logic follows the Worklight initialization process.
- To keep the application as small as possible, do not add any other Worklight skin to the application.
Adding a skin results in the duplication of all the web application resources in the final package built.
- Minimize the required Dojo modules into one .js file so that the file size of the application is minimal.
Worklight does not provide any javascript shrinking in the build process.
Parent Migration scenarios