+

Search Tips   |   Advanced Search

Change the Dojo version for MobileFirst projects

We can change the version of Dojo used by an existing MobileFirst project.

A "pre-built" folder for versions of the Dojo toolkit is provided by MPF and is officially supported. If we download Dojo from the Dojo website http://dojotoolkit.org/ and use that for the Dojo library, Step 5 in the following procedure does not happen.

The procedure explains how to upgrade from the version of Dojo that is included with MPF to a new version of Dojo that is included with MPF. To take advantage of a version of Dojo in open source that is not yet included in IBM MobileFirst Platform Foundation, extra steps are required, see Alternate Procedure.

  1. In the Project Explorer view, locate the project.to change the Dojo version for.

  2. Right-click the project.and select Properties to open the Properties dialog.

  3. In the left pane, click Dojo Toolkit to open the properties page for the Dojo Toolkit used by the selected MobileFirst project.

  4. Choose one of the following options to change the Dojo version used by the project.

    • From the Dojo Library Project list, select an existing Dojo library project to use in the project.

    • Click New Dojo Library to create a Dojo library project for use in the project.

  5. Click OK. A dialog box opens prompting you to confirm whether to overwrite the existing Dojo layer files with the new Dojo layer files.

    To avoid unpredictable behavior, use Dojo layer files that match the Dojo library. For example, using Dojo 1.8 layer files with a Dojo 1.9 library, may cause unpredictable behavior. If we choose not to overwrite the Dojo layer files now, we can manually overwrite them later using the pre-built files contained within the Dojo library project. In the Project Explorer view, expand Dojo library project > toolkit > pre-built.

Alternate Procedure

  1. Follow the Procedure steps 1-4. Then continue with the following steps:

    1. Ensure the resources that are being used by the application are copied into the application. Follow the documentation that is outlined for the Dojo Library Requests view or Console (depending on Studio version).

    2. One suitable method involves building new layers from the new version of Dojo so the same core and mobile UI layers are created from the updates. Manually copy them into the project's www folder.

    3. The alternative way is to remove the references to the core and mobile UI layers ("layers/core-web-layer" and "layers/mobile-ui-layer") from the application's JavaScript file, and use the Dojo Library Requests view or Console to find out what's used and then start copying them into the project.


Parent topic: Use JavaScript toolkits for the user interface