Related Articles & Tutorials
TW Tech Glossary - Misplaced your bible? Well here it is! This truly took a while to complete and should be used by all from beginners to advance techies. Look into it, you won't be sorry. (Very Resourceful)
Mobile Commerce: The Palm OS - Way Beyond WAP - Allow me the to take you into the wonderful world of the Palm OS. This is the system that today powers over 75% of the personal mobile handheld market…
What's The Buzz on GSM? - This articles give the brief intro into the world of GSM and the wireless.
Wireless Application Protocol - WAP stands for Wireless Application Protocol, a secure specification that allows users to access information instantly via handheld wireless devices such as mobile phones, pagers, two-way radios, smartphones and communicators…
Improving TCP Performance Over Wireless Networks - The main problem with the TCP is that TCP falsely assume the packet loss as congestion. The TCP sender detects a packet loss when a time out happens or duplicate acknowledgements happen…
WML Tutorial - Get the hands on with Wireless Markup Language.
What is WML?
Short for Wireless Markup Language, an XML language used to specify content and user interface for WAP (Wireless Application Protocol) devices; the WAP forum provides a DTD (Short for document type definition. A DTD states what tags and attributes are used to describe content in an SGML document, where each tag is allowed, and which tags can appear within other tags. For example, in a DTD one could say that LIST tags can for WML.
WML is supported by almost every mobile phone browser around the world.
WML pages are requested and served in the same way as HDML (Handheld Device Markup Language is used to format content for Web-enabled mobile phones. HDML is Openwave's (formerly known as phone.com) proprietary language, which can only be viewed on mobile phones that use Openwave browsers.
For Web servers to serve WML pages, they must contain the text/vnd.wap.wml mime type MIME (Short for Multipurpose Internet Mail Extensions, a specification for formatting non-ASCII messages so that they can be sent over the Internet. Many e-mail clients now support MIME, which enables them to send and receive graphics, audio, and video files via the Internet mail system. In addition, MIME supports messages in character sets other than ASCII).
Another Description!
WML stands for Wireless Markup Language, and is what HTML is to a web browser. It is based on XML, or rather it is an XML application. If you're going from HTML to WML, with no prior knowledge of XML, chances are you'll find WML *very* strict. Just like HTML and XML, WML is read and interpreted by a browser built into the WAP device. For WAP devices, the browser is commonly called a micro browser, indicating that its capabilities are somewhat limited. These capabilities are of course also limited to the capabilites of the WAP device in which it lives.
Tips
Check your content on different browsers.
Most of the current WAP browsers suffer from bugs and incompatibilities with the published specifications. This problem is particularly severe when things should work according to the specifications but fail mysteriously on a particular browser. (This situation will get better with time; there is now an official test suite available and a certification program. But until both are widely adopted, incompatibility remains a serious problem.) This WAP browser incompatibility means that, for the time being, you should test your WAP applications on as many different devices as possible. Don't assume that some technique you've used will work everywhere just because it works on one browser. Try it out on different devices, preferably on one from a different manufacturer.
Check it on different screens.(#)
Don't write your applications for one device and assume that everyone else has the same screen size. There are few things more irritating than having a nice new PDA with a big screen and having four words of text on each page. On the other hand, be aware that putting long essays onto WAP sites will cut out the huge portion of your audience accessing your site via a cell phone. If you have content that will benefit from a big screen, consider making two versions of your site: one with lots of small files for cell-phone users and one with a few big files for PDA users. Things like news stories and sports reports really benefit from this sort of treatment.
Also, don't rely on a screen's width to be a particular dimension. Some sites lay out tabulated information by relying on a particular cell phone to put line breaks in the right places. This type of layout is completely unreadable on most other cell phones, let alone PDA browsers.
Provide alternatives to timers.(#)
Many WAP sites use WML's timer facilities to display logos and splash screens before the main content loads. Very few sites provide any alternate means of entering the main page if the timer does not work as expected. If no alternative is provided, the user will be stranded on a page with no way to go forward or back.
The most common reason for a timer to fail is a name attribute on the timer referencing a variable that isn't initialized properly somewhere else. This works fine the first time, since the default value is used, but later visits to the same page will use the value "0" for the timer, which disables it. To be on the safe side, always provide a Use images sparingly.(#)
WAP is not the Web. Screen sizes are small, and download times are long. Use an image only where a few words of text isn't enough. You can probably fit only one image on-screen at a time on most cell phones, so the complicated image-based layouts on so many Web pages are simply impossible on a WAP site. And don't use images as bullet points or other decorations. Not only does this slow down page display on most devices, but you cannot rely on the image appearing where you want it to on some browsers.
A direct call link in WML(#)
WML pages are designed to be viewed on a cellular telephone, and cellular telephones are designed to be used for calls. Combine these two uses by offering a link to your telephone number on your WAP site. Simply place a link of this type using the card you want on your WAP packet:
Then replace what follows 0 by your telephone number (remember to delete the first 0 here).
Convert images into WAP ready ones.(#)
What is a valid WML deck
Here is an example of a validation declaration in the header of a WML file:
|
|
Another example, using a different site:
|
|
WML is case sensitive.(#)
The currency rates were obtained from the Federal
|
Reserve Bank of New York on $(date). |
|
Content-type: text/vnd.wap.wml To view files, use the following syntax:
|
|
http://localhost/394/hello.wml |
Or, assuming a mount of the CTILAB machine on drive E:
To check syntax
Save the .wml file as .xml and open in IE. Or, associate .wml files with internet explorer.
This will check the XML well-formedness, and provide some useful feedback if not correct.
F9 is reload. Sometimes we have to restart the phone simulator to fix things.


