Page 156 - DCAP512_WAP_AND_WML
P. 156
WAP & WML
Notes Self Assessment
Fill in the blanks:
1. WML scripts are not embedded in the …………………….
2. WML Script resides within the high-level applications layer of the …………………….
3. Function names must be ……………………. within one compilation unit.
4. Function calls must pass exactly the same number of ……………………. to the called
function as specified in the function declaration.
5. All ……………………. to functions are passed by value.
11.2 WML vs Java Script
WML Script (Wireless Markup Language Script) is the client-side scripting language of WML
(Wireless Markup Language). A scripting language is similar to a programming language, but
is of lighter weight. With WML Script, the wireless device can do some of the processing and
computation. This reduces the number of requests and responses to/from the server. In the old
days, fewer round-trips can improve the performance of your WAP site significantly since data
transmission over wireless networks is slow. Today, the performance gained may not be so
significant any more as data transmission speed has improved a lot. However, you may still
find WML Script useful since putting some operations at the client-side can reduce the load of
your servers.
WML Script is based on ECMA Script (European Computer Manufacturers Association Script),
which is JavaScript’s standardized version. So, the syntax of WML Script is very similar to
JavaScript.
Did u know? The Javascript.
Java Script is a scripting language commonly used on the web.
If you have some programming experience with Java Script, you should be able to learn
WMLScript quickly. You may glance through or even skip some parts of this WMLScript tutorial.
A major difference between JavaScript and WMLScript is that JavaScript code can be embedded
in the HTML markup, whereas WMLScript code is always placed in a file separated from the
WML markup.
WMLScript has a number of standard libraries. They contain a lot of useful functions that you
should get familiar with. We will talk about them in later parts of this unit.
One common use of WMLScript is to validate form data. Another common use is to display
message boxes to give alerts and error messages or to ask for confirmation of actions (no round-
trip is needed for showing message boxes, which helps save bandwidth and improve the WAP
application’s response time).
WMLScript is the dialect of JavaScript used for WML pages and is part of the Wireless Application
Protocol (WAP).
WMLScript is a client-side scripting language and is very similar to JavaScript. Just like JavaScript
WMLScript is used for tasks such as user input validation, generation of error message and other
Dialog boxes etc.
150 LOVELY PROFESSIONAL UNIVERSITY