Learning WML - Tools and Structure
This series of articles describes how to provide Web content to mobile devices through WML (Wireless Markup Language). This article covers some essential tools for coding and debugging WML code, as well as the basics of creating WML decks. Future articles will cover advanced WML language, tips and tricks to provide content, and how to integrate other technologies such as PHP to make your pages more flexible.
Note: These articles cover WML version 1.1, which is 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.
Essential Documentation and Tools
There are several tools you should assemble before beginning to code your WML applications.
Note: The recommendations in this article are simply that: recommendations. You can make do with a simple text editor (such as Windows Notepad or vi in Linux) and the Web server, but spending some time assembling some good tools will pay off in the long run.
Tip: If you decide not to use one of the WAP SDKs/IDEs and use Windows as your OS, try TextPad, a nifty text editor that's very versatile and code friendly (http://www.textpad.com).
There is an abundance of WAP/WML documentation on the Web, mostly courtesy of the Open Mobile Alliance (OMA) and other WAP organizations. You should spend some time reading the user interface (UI) suggestions, developer guidelines, and language reference text at the sites listed in the following sections.
Open Mobile Alliance - http://www.openmobilealliance.org
The Open Mobile Alliance (OMA) is a relatively new standards organization made up of several key players in the WAP arena, including most cellular providers and phone manufacturers - visit http://www.openmobilealliance.org/members.html for a full list. The new site is still evolving, but much of the content from the previous site (the popular "WAP Forum") is still available. As of this writing, you can access the documentation by using the "Access to WAP specific information" link at the bottom of the main OMA page. A full list of WML release specifications, WAP specifications, and DTD definitions is available.
Openwave Developer Program - http://developer.openwave.com
Openwave, the company behind the popular Openwave Mobile Browser (formerly the UP.Browser) maintains a library of technical documents and developer guidelines. Follow the links on the left side of the main page to access WML language references (in the Technical Library), UI guidelines, lists of supported devices, and more.
Forum Nokia - http://www.forum.nokia.com
Nokia was one of the pioneers in the WAP arena and maintains an impressive number of emulators and related documentation. Their Documents section has a handy search feature to help find the document most applicable to your needs.
Emulators and SDKs
You could test your WML code with a cell phone, but most providers charge a premium for Web access, and testing could get rather expensive. Instead, use one of the following emulators, some of which are packaged with a full SDKsome even include a full Integrated Development Environment (IDE).
Note: Most of the emulators and SDKs are only available for Windows, although a few are available for Solaris and other operating systems.
Tip: No emulator can fully replace actual device testing. Although you can initially code and debug on one of the emulators, dont neglect testing on your actual target device(s) as well.
The Gelon Wapalizer - http://www.gelon.net
The Wapalizer is a Web-based WAP emulator and offers several skins to emulate popular phones. Simply type your URL into the Wapalizer box and click the Wapalize button to open your code in the default emulator. Alternatively, choose a different skin and use the emulated device's interface to navigate to your URL.
Note: The Wapalizer is not as robust as some of the other emulators. Although it's a handy way to quickly check a page, you should also use an emulator that closely resembles your target microbrowser.
The Openwave SDK - http://developer.openwave.com
The Openwave SDK 5.1 provides the best suite of tools I've run across; I use it as my primary coding and testing environment. The Openwave developer site (http://developer.openwave.com) has several SDKs available, depending on what WML language revision and feature set you need. SDK 5.1 can be used for most applications, providing that you stay within the coding boundaries for your target device's supported version of WML and you fully test your code on the target device(s).
Nokia Emulators - http://www.forum.nokia.com
Nokia maintains an impressive list of emulators, including several that tie in to their Mobile Internet Toolkit. Note that you must register on the site to download any of the tools. Many are Java-based, and therefore require you to install a Java Virtual Machine (JVM) on your system to run the tool.
If your device isn't compatible with the emulators listed above, visit the manufacturer's site for the device to see whether they offer a compatible tool.
Tip: If you need to find out what browser your target device uses, access a nonexistent file on your Web server and examine your server logs for the browser identification information. (A nonexistent file makes it easy to find the pertinent log entry.) For example, if I use my Samsung A400 phone to access "missingfile.jpg" on my Web server, I find the following log entry:
[25/Jun/2002:16:27:50 -0500] "GET /wireless/missingfile.jpg HTTP/1.1" 404 306 "-" "SEC-spha400 UP.Browser/4.1.22b1 UP.Link/22.214.171.124c"
This entry shows the client ("spha400") and the browser and version (UP.Browser 4.1.22b, now the Openwave Mobile Browser, but still identified as UP.Browser).
Page 1 of 3