Wireless LAN and Personal Area Network Protocols

Lesson 04 Wireless (WML)

© Oxford University Press 2018. All rights reserved. 1 Markup by tags in between a text

• Done to give characteristic of information • A specific meaning to the text within the tags • Define the specific function or action of the text • Tag may associate definition of attribute (s) which provides the data or additional characteristic information for the text within a pair of start and end tags

© Oxford University Press 2018. All rights reserved. 2 Mobile Device Characteristics

• Narrow bandwidth network connection with intermittent loss of connectivity • String parameterization and state management, for example, display sate management • State management─ an important feature in mobile devices [Refer Example of state management] © Oxford University Press 2018. All rights reserved. 3 Mobile Device Characteristics

• Constraints of limited user input and output facilities [T9 keypad input, text presentation in a layout with small display screen, or image or pictogram presentation on a screen with small resolution] • Constraints of computational resources and limited memory © Oxford University Press 2018. All rights reserved. 4 WML

• Used to create the cards for mobile application (s) (just as pages in HTML) • Two versions─ WML 2.x and WML 1.x • WML 2.x includes XHTML-MP which includes XHTML • WML 1.x does not include XHTML

© Oxford University Press 2018. All rights reserved. 5 Information in WML

• A collection of decks and cards • A WML deck is saved in a file with extension wml • Each file contains one deck • For example, a welcome deck can be saved in a WML file welcome.wml

© Oxford University Press 2018. All rights reserved. 6 WML deck

• Can have number of cards • There is a navigational link from one card to another • WML provides for management of the navigation between cards and decks

© Oxford University Press 2018. All rights reserved. 7 WML card

• A scaled down set of procedural elements • Used to control navigation between cards • A card represents an interaction with the user and the deck contains the cards

© Oxford University Press 2018. All rights reserved. 8 WML card

• Provides the content (for example, a program, command, data, string, or image) • Supports variety of formatting commands as well as layout commands • Commands are defined by tags and attributes

© Oxford University Press 2018. All rights reserved. 9 WML card

• Provides user interface for mobile devices with constraints as mentioned in the preceding text • Organizes similar to deck and cards

© Oxford University Press 2018. All rights reserved. 10 WML parser

• Parses the tags, attributes, and underlying text within the tags present within the deck or card • The parser is a part of a browser or server

© Oxford University Press 2018. All rights reserved. 11 The format of a WML deck and card

© Oxford University Press 2018. All rights reserved. 12 WML card

• First validated against its declared document type using WML 1.3 DTD () before parsing • Parsed data, information, and contents used to give input to a Java program for the application or server which runs method(s) at the browser or server • Browser program runs at the client © Oxford University Press 2018. All rights reserved. 13 WinWAP

• WinWAP has an Emulator which is an alternative program used for emulating the actual run at the mobile client and runs on a PC • WinWAP is for a computing system running on PocketPC, WindowsMobile 2003, or Windows operating system

© Oxford University Press 2018. All rights reserved. 14 Application Running using WML Card

• A WML card containing a client-request is transmitted and response is received from server • Element do is used to process the text within the do tags • The element label is an attribute which defines a text, the purpose of which is simply to specify the incoming text or action

© Oxford University Press 2018. All rights reserved. 15 Example

© Oxford University Press 2018. All rights reserved. 16 Application Running using WML Card

• Label text is not the input to any program or processing element • For example, label = “Show Welcome Message” • This means that next action in the sequence of actions for navigation to the card is showing the welcome message • The navigation is by

© Oxford University Press 2018. All rights reserved. 17 WML Tags

, , , , , , and for bold, underline, italic, big, small, strong, and emphasis rendering, respectively, for a text-display • HTML anchor tag is used for linking and navigation in WML also

© Oxford University Press 2018. All rights reserved. 18 WML Tags

─ the actions on events are by the tags , , , and • The renderings after the actions on the events occur as per the interior paragraph entities

© Oxford University Press 2018. All rights reserved. 19 WMLScript

• A script language in which each line is loaded in computer and is executed at run time only • There is no pre-compilation • WMLScript in WAP is similar to JavaScript and is used for client-side scripting

© Oxford University Press 2018. All rights reserved. 20 WMLScript

• It obviates the need to communicate with the server by sending a request and waiting for the response generated by an application running at the server

© Oxford University Press 2018. All rights reserved. 21 WMLScript

• Can embed the markups in WML • WAP browser displays the page having WML and WMLScript • WMLScript used to open dialog box so that the user can input data or text • Also used for generating error messages • The execution of WMLScript is fast

© Oxford University Press 2018. All rights reserved. 22 Example of the division z = x + y carried out using WMLScript extern function divide (varCompute x, y) { var z = x/y; WMLBrowser.setvar (varCompute, z) WMLBrowser.refresh ( ); }

© Oxford University Press 2018. All rights reserved. 23 Standard Library Function─ WMLBrowser

• Has the functions to control the WML browser or to get information from the browser

© Oxford University Press 2018. All rights reserved. 24 Standard Library Function- WMLDialogs

• Has the functions which display the input boxes to users, also provides for alert and confirmation messages

© Oxford University Press 2018. All rights reserved. 25 Standard Library Function─WMLLang

• WMLLang library has the core WML functions, for example, for converting a data type integer to string character

© Oxford University Press 2018. All rights reserved. 26 Standard Library Function─ WMLString

• Has the functions that help in concatenation, truncation, picking of select portions, and manipulation or finding the length of the strings. An example is the find() function to know whether a sub-string is a part of a string

© Oxford University Press 2018. All rights reserved. 27 Standard Library Function─ WMLString

• If yes, then the function returns the index of the first character of the match in the string, otherwise it returns 1 • String.find (“09229122230”, “30”) returns 9 which is the index of first character of the match in the string

© Oxford University Press 2018. All rights reserved. 28 Standard Library Function─ WMLString

• String.find (“09229122230”, “39”) returns 1 since there is no match between sub- string characters and the string • var strlen = String.length (“WELCOME TO ABC MOBILE) returns 21 because number of string characters are 21 • Space is also a character

© Oxford University Press 2018. All rights reserved. 29 Standard Library Function─ WMLURL

• Has functions for using relative URLs or absolute URLs for finding the port number or for testing whether a URL is valid or not. [For example, http://www.microsoft.com/msoffice/winword/ is a relative URL • Full form http://www.microsoft.com/msoffice/winword/ne wfile.doc in which the file name newfile.doc is also mentioned in the end after the winword/ is called absolute URL

© Oxford University Press 2018. All rights reserved. 30 Standard Library Function─ WMLFloat

• Has the functions that help in performing floating-point arithmetic operations in case a specific WAP device supports floating-point operations, conversions, and calculations

© Oxford University Press 2018. All rights reserved. 31 Summary

• WML deck • WML cards • A card method runs an application • WML library functions

© Oxford University Press 2018. All rights reserved. 32

End of Lesson 04 Wireless Markup Language (WML)

© Oxford University Press 2018. All rights reserved. 33