Building WML Gadgets: Phone Message Application
This series of articles describes how to provide Web content to mobile devices through WML (Wireless Markup Language). This article covers creating an application to aid the user of a mobile phone.
Note: These articles cover WML and WMLScript version 1.1, which are supported by the majority of mobile devices in use today. The articles assume a working knowledge of HTML and general Web technologies, and further assume that you have read the previous article(s) in this series.
Simple Applications
Not all wireless applications have to be super-applications. Some of the best wireless applications perform simple tasks to improve wireless functionality. The last few articles in this series have shown how simple, single-purpose gadgets can boost the functionality of mobile devices. This article will present a slightly more complex application in the same "extending functionality" vein.
The Application
This article will cover how to build a simple phone message application. Although we live in a time of portable phones, intelligent voicemail, and other electronic telephone magic, there are still times when messages are taken by one person (operator) and passed to others (recipients). For example, consider a businessman who often travels outside the home office. Many of his customers and contacts may occasionally call the home office and leave messages with his secretary. Using a simple Web form, the secretary can pass the message to the businessman's cell phone, where he can review the message and even return the call with the simple press of a button.
Application Specifications
This application will utilize the following components:
- A simple HTML form to input the message
- A flat-file database to store the messages
- A CGI script to access the database
Essentially, the application operates as shown in the following diagram:

FIGURE 1 - Our application's design. The operator uses a Web form to send the data to a CGI script that stores the data in a database. The same script is used by a mobile user (recipient) to access that data.
We'll use Perl for the CGI script, for the same reasons we've used it previously: It's available for most platforms and extensible enough to perform almost any task necessary.
Note: As with previous articles, teaching Perl is out of the scope of this series. There are numerous sources on the Internet for learning Perl, including the tutorial at http://wdvl.internet.com/Authoring/Languages/Perl/PerlfortheWeb/toc.html.
