Building WML Gadgets: A Calendar
This series of articles describes how to provide Web content to mobile devices through WML (Wireless Markup Language). This article covers creating small programs that extend the functionality of mobile devices, building on the previous two articles and examples:
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.
Note: Most mobile service plans offer a base amount of online time dedicated to "Web" use. So the user generally isn't paying more for the occasional gadget use.
To round out our small suite of useful gadgets, let's add a simple calendar application. This application displays a monthly calendar and enables the user to move forward and backward through the months.
A Little Help from CGI
We could accomplish this gadget using only WML and WMLS. However, it would require writing some pretty extensive code to do date mathematics in order to correctly display any month within any year. Instead, we will utilize a CGI program written in Perl.
Why Perl? We could accomplish the same results with almost any Web programming language that supports date libraries (such as PHP), but Perl offers a few advantages:
- Perl is highly extensible.
A variety of modules are available to extend Perl and give us the functionality we need.
- Perl is platform-independent.
Perl is available for most platforms and is easily implemented on each.
- Perl hasn't been used in this series of articles.
If you would rather use another technology, such as PHP, simply apply the concepts outlined here to your preferred technology, using previous WML and PHP (or your preferred technology) articles for help where necessary.
Page 1 of 5