Murdoch University Logo B336 Advanced Internet Computing

Laboratory Week 12


Learning Objective:

  1. Learn to include WMLScript in writing WAP applications, building on week 11's lab.

Required Reading:

Week 11 lecture 2
Week 12 lecture 1

WML Online Reference:

  1. The Nokia WAP Developers' Guide - comes with the Nokia Toolkit, and includes a description of the basic WMLScript.
  2. Wireless FAQ section 11 - a listing of functions in 3 standard WMLScript libraries.
  3. Official WMLScript syntax and standard libraries specifications - for more detailed technical reference. You may save the PDF file to avoid repeated downloads if accessing it from home. Because of copyright, please DO NOT save it on the university's lab machines.

Access to Software:

You will require the Nokia Toolkit 2.0 for this laboratory. The software is available in lab SC2.31.

External students may download the required software and install it on your own machine. Internal students may do the same, but are encouraged to still attend labs for supervision when doing the exercises below.

Instructions:

  1. Make sure you have completed week 11's lab.

  2. Start up the Nokia toolkit. Using the File>Open menu item, look at the following example WML decks supplied with the toolkit one at a time. For a standard installation, they should be in the directory C:\Program Files\Nokia\WAP_Toolkit_2.0\Samples.

    deck3.wml
    windex.wml
    currency.wml
    morgage.wml

  3. Click on the "Show" button on the left window to display the decks in the right window. Learn how the cards in the deck receive input, and how to call WMLScript functions to do some processing.
    Look at the referenced WMLScript files to see how the different functions are implemented.

Exercises:

  1. Write a WML application that asks the user for two numbers, then displays the result of the multiplication of those two numbers.

  2. Retrieve your WML application from exercise 1 and 2 of week 11's lab. Modify it so that instead of giving the user the option of selecting from a set of options, the application reads the unit name as input. Have the application call a WMLScript function that displays the unit information depending on what the input is.

  3. Write a WML deck of 3 cards. Each card asks the user to input a number. By default, the number should be 0. Each card also has the option of calculating the addition of the number obtained by the other two cards.

  4. Write a WML application which randomly generates a statement from a fixed set of quotes, and generates a new one at regular intervals.

  5. All the above are relatively simple, since they depend only on the client devices doing the processing after all the WML and WMLScript have been received. The more interesting things that can be done will have to involve communication with the original WAP server. Those who are interested may look at an example of this in the Stock Quote Push Application in the Nokia WAP Developers' Guide page 69. This example uses a server-side Java servlet to generate dynamic WML/WMLScript to the devices.

    This is equivalent to the situation with HTML and JavaScript. In a web browser, HTML and JavaScript may be able to do cute things, but most of the more powerful aspects will come from the processing done by originating web servers before the HTML and JavaScript are sent to the browser.

    You are not required to produce anything of such complexity in Assignment 3. Interesting client-side WML and WMLScript will be more than sufficient.

Document author: H.L. Hiew, Unit Coordinator
Last Modified: Wednesday, 16-May-2001 05:35:57 MST
Disclaimer & Copyright Notice © 2001 Murdoch University