< Previous | Next >

Lesson 1: Create a Dojo-enabled web project

In this lesson, you learn how to create a web project that is configured for Dojo application development by enabling specific project features.

About this task

This product provides a project setup wizard where you can customize how your application accesses Dojo during development and at runtime. The simplest option (and the one used in this tutorial) is to have a copy of Dojo in your project and deploy it along with the rest of your project resources. Another option is to use a public Content Delivery Network (CDN), a remote server with a copy of Dojo. The use of CDNs are not covered by this tutorial, but they are simple to use. For more information about CDNs, see www.dojotoolkit.org/download/.

To create a web project that is configured for Dojo application development:

Procedure

  1. In the main menu, click File > New > Web Project.
  2. In the Name field, type LoanPaymentCalculator.
  3. From the list of project templates, click Dojo Toolkit to use the Dojo Toolkit project template to create your web project.
  4. In the Programming Model section, click Client-side only (HTML, JavaScript,...) to use the Client-side only programming model when creating your project.
  5. Click Next to configure your new web project.
  6. From the list of available configuration options, click Dojo Toolkit to open the Dojo Toolkit page. The Dojo Toolkit included in this product includes additional IBM® extensions to the base Dojo Toolkit, including libraries for ATOM (ATOM Syndication Format) data access, analog and bar gauges, and simplified access for SOAP Web services. By default, the latest Dojo Toolkit supported by IBM is copied into your web project.
  7. To determine how you want to use the Dojo Toolkit in your web project, click Change these setup options to open the Dojo Project Setup Options wizard. The wizard contains the following options:
    Dojo setup options wizard
    Copy Dojo into this project. It will be deployed from there.
    The Dojo toolkit is included inside your web project. You can specify the name of the Dojo folder and whether to use the default Dojo distribution included in the runtime environment or to use a Dojo distribution from disk.
    Option to copy Dojo into your Web project
    Dojo is in a project in the workspace and will be deployed from there.
    On this page you can browse to the root Dojo folder in another project in your workspace. The copy of Dojo will not be copied into your project. It will be deployed from the project where it is currently located.
    Browse to a Dojo in another project
    Dojo is remotely deployed or is on a public CDN.
    Use this option if your application uses a remotely hosted public CDN (content delivery network) or an existing copy of Dojo already deployed on your network.
    • Public CDN: You can enter the URL of a publicly available content delivery network. Content delivery networks provide geographically distributed hosting for open source JavaScript libraries. When a browser resolves the URL in your web application, the browser downloads the file from the closest available server.
    • Remote URI: You can enter the URI of the remote location to the root Dojo folder.

    In the Corresponding Dojo section, you can choose a Dojo source distribution that is the closest match to your remote Dojo Toolkit. If Dojo is not contained in your project the tools must reference a corresponding copy of Dojo in order to provide content assist and validation. You can choose the default Dojo Toolkit provided with this product, or browse to a Dojo folder in your workspace or file system. This option does not copy Dojo into your project or workspace.

    Remote Dojo setup
  8. Click Copy Dojo into this project. It will be deployed from there. to include the Dojo Toolkit inside your web project for this tutorial.
  9. Click Next and accept the default. Click Finish.
  10. Click Finish to create your web project.

Results

Your project is now created and appears in the Enterprise Explorer view. Expand the WebContent folder to show the Dojo folder that contains all of the Dojo resources. If asked to switch to the Web Perspective, click Yes.

Lesson checkpoint

You created the Dojo-enabled web project.

You learned :
  • How to create a Dojo-enabled web project.
  • How to change the setup options for a Dojo-enabled web project.
< Previous | Next >
Icon that indicates the type of topic Tutorial lesson topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: loan_lesson1.html