4D Connects with Wireless Markup Language


ACI - Documentation Français English German ACI Technical Notes ACI Technical Notes, By Subject Back Previous Next Find

4D Connects with Wireless Markup Language

By Jonathan Baltazar, ACI US Technical Support

Technical Note 00-4

Technical Notes for Technical Notes for 00-01 January 2000

Introduction


Wireless Access Protocol (WAP) is the standard when it comes to wireless information and telephony service for digital mobile phones and other wireless terminals. WAP enables fast and easy delivery of essential information and services to mobile users. To fully understand WAP, Wireless Markup Language (WML) must also be understood. The following Tech Note focuses on the main issues of WAP and how WML is used along with it. It will cover general overview of WAP along with WML, its usage, how WML is used with 4D, and an explanation of the demo database that displays the interaction of 4D and WML.

Overview


WML is a language that is based on HTML, and is influenced greatly by HDML (handheld markup language). It is XML based, and is specified to using a full Document Type Definition (DTD). DTD takes the WML file and intelligently breaks it down to be parsed so it can be verified for correct syntax. It then takes portions of web page's to be displayed on cellular phones and other personal digital assistants (PDA's) via wireless access. The combination of Wireless Markup Language (WML) and Wireless Access Protocol (WAP) is used to develop Wireless Web Applications.

Through the use of WML, or by converting HTML into WML, microbrowsers, which are built into the handheld devices, have the capability to access any website. Either way this is done, it strips out the bandwidth-intensive graphics that are incompatible with small screens. The microbrowsers get the best use of each digital mobile device.

Just as HTML is the World Wide Web's markup language, WML is WAP's markup language. Much like HTML, WML uses "tags" such as " "go" " to identify the purpose and function of the blocks of text, so that the client device can properly display them to the user. WML is designed for small display screens. It is divided into a set of well-defined units of user interactions.

WML is a structure of XML (Extensible Markup Language) that interacts with HTML, to provide Internet access to specific mobile devices such as mobile phones, pagers, two-way radios, smartphones and communicators. WAP is designed to operate with a wide range of wireless networks. These wireless networks are CDPD, CDMA, GSM, PDC, TDMA, FLEX, ReFLEX, iDEN, TETRA, DECT, DataTAC, and Mobitex.

Usage


As stated above, WML is used in combination with HTML. Therefore, allowing the user to use their digital handheld device, whether it may be a pager or cellular phone, as a way to check vital information only accessible by the Internet.

WML provides the access to the Internet in the palm of a hand, with an everyday mobile device. It allows the users a variety of options to choose from, checking their email to connecting to an online database from where ever they may be. Instead of the everyday keyboard and mouse, the interface uses the buttons of the mobile device. The traditional 12-key phone pad is used to enter alphanumeric characters, including full range set of standard symbols. Navigation functions such as Back, Home, and Bookmark are also provided, in keeping with the standard browser model.

How it Works


The combination of 4D and WML will allow developers to create databases that can be accessed through various digital mobile devices. This combination will enhance the normal capabilities of Internet access on handheld devices, by allowing clients to access personal information such as email and corporate databases.

How does 4D and WML work? The answer is very simple, but needs some explanation. Once WML code is written, the code must be placed in one of two places. One place where the WML code can be stored is in the same folder as the database's Structure and Data file. The second place where the WML code stored is in its own folder. If it is placed in its own folder, then the path must be specified in the "Default HTML Root" under the "Web Server I" tab of the Database Properties dialog. When the WML file(s) are placed in the correct folder or the path has been correctly specified, they are ready to be accessed by 4D methods. This is accomplished by using 4DACTION and 4DVAR tags.

The interaction between 4D and WML is done through the use of 4DACTION and 4DVAR tags. The 4DACTION and 4DVAR tags, within the WML code, make calls to specific methods within the database. Once these calls are made from the WML code to the 4D method(s), the method(s) are then executed.

When the 4DACTION tag is used within the WML, it is being used as a WML comment (refer to 4DACTION as HTML Comment, in the Language Reference). This is example how it looks:

Comment:(<!--4DACTION/...>),

Once this tag is executed, it then accesses the 4D method for execution. Since the 4DACTION tag is used as a comment, then the 4DVAR option must be selected. This is option can be located in the "Web Server II" page of the Database Properties dialog. If the 4DVAR option is not selected, then this mechanism will not function. If you want to use 4DACTION in this manner, then the two tags basically go hand in hand.

The 4DVAR tag must be checked when using 4DACTION as a WML comment because of how it operates. 4DVAR simply states that the syntax need to be used is standard WML notation.

<!-4DVAR MAVAR->)

Otherwise, if 4DVAR is not selected, the syntax is set to default, which is not WML notation, and the notation needed is:

([MAVAR]).

Under the "Web Server I" tab of the Database Properties dialog, the default home page must be set in order for the digital mobile device to connect to a corporate database. This is very important, because if this is not set, you will receive the message:

HTML or Plain text.
Can't compile this...

This means that it is not being able to connect to your default WML code, which is the first WML code to be executed. This is why it is very important to set this information.

4D Demo Database


The demo database provided is a small database that allows a cellular phone owner to check stock prices through a 4D database (versions 6.5.3 and up). The database requires the use of a phone simulator that displays a cellular phone, to represent an actual phone. The simulator can be downloaded at http://updev.phone.com; (the file name is UP.SDK 3.2).

Launch the "Unwired" database and open the Database Properties dialog box to the Web Server 1 panel; the Default Home Page is set to index.wml.

This indicates to the web server what WML code to start off with and to default to. After the correct settings are made, the phone simulator, upsimexp, can be started.

The phone simulator Networking Setting must be set to LAN Network (no Delay), and the simulator must call the computer you are currently working on.

Therefore, the pull down menu which is set to default as device: home must be changed to 127.0.0.1, or if the database is on another computer, then you must set the IP address of that specific computer you are trying to connect to. Once the address is provided, the screen will change.

Before entering 127.0.0.1 After entering 127.0.0.1

NOTE: The simulator is available only for the Windows and Solaris operating systems.

WML CODE




Explanation:

The INDEX Code is used as the first display of the example database. It lets the user know that the mobile device has the option to communicate with 4D. If the user wishes to do so, then the option of [Try it now.] must be selected.




Explanation:

The MORE code is used once the user wishes to connect a 4D database. The 4DACTION tag is used to call the method "GETTIME", which then displays the current time, and provides the user with two options, [Corporate Directory] and [Home]. If [Home] is chosen, then the display will return to the beginning, but if the [Corporate Directory] is selected, then the user is able to search the database.

Explanation:

The SEARCH code allows the user to search the database. The 4DACTION tag used here calls the method "SEARCHD" which searches the database for the given information. In this particular demo, it allows the user to search the price of a specific company's stock.

Explanation:

The RESULT code displays the result of the search on the screen of the mobile device. The 4DVAR tag is used here to display the result. It will display the number of records found under that name, the company name and their stock price.

Conclusion


The introduction of WML adds functionality to digital mobile devices. What was once used as a way of communicating by speaking, leaving voice messages, numeric or alphanumeric pages, has now taken the form of a small computer. 4D's involvement with WML gives developers the option to create databases the are easily available to digital mobile device carriers. 4D's ability to use WML has enabled these devices to connect to a remote database and search for important information.

Website References


www.phone.com

www.iit.edu/~diazrob/wap.html

www.oasis-open.org/cover/wap-wml.html

www.tcm.hut.fi/Opinnot/Tik-111.550/1999/Esitelmat/Wap/wap/WAP.html#6.1.1


ACI - Documentation Français English German ACI Technical Notes ACI Technical Notes, By Subject Back Previous Next Find