When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles
ASPFAQs.com
Message Board
Related Web Technologies
User Tips!
Coding Tips

Sections:
Sample Chapters
Commonly Asked Message Board Questions
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Security
Stump the SQL Guru!
XML Info
Information:
Feedback
Author an Article
ASP ASP.NET ASP FAQs Message Board Feedback
Print this page.
Published: Wednesday, June 21, 2000

HDML or WML?

By Christina Biggs


So you've heard of HDML and you've heard of WML, but you don't know the differences, and you don't know which to use. Perhaps you're already using one and thinking of switching to the other. Perhaps you've heard that they are the same (as I first did). Let's clear up some of this confusion.

- continued -

First, some background information. In May of 1997 Unwired Planet, a member of the World Wide Web Consortium (W3C), submitted a request to the W3C for the HDML (Handheld Device Markup Language) Specification. The full specification can be found at www.w3.org. Although the submission was acknowledged by the W3C, it is still considered a "working draft" and no further enhancements have been made since its inception. In June of 1999 the WAP Forum, currently enrolling over 200 members, released WML (Wireless Markup Language) v1.1 and shortly after, it released v1.2 in November of 1999. The most recent WML Specification can be found at www.wapforum.org.

Both languages share the same basic programming model and functionality; however, there are some notable differences to discuss. The main difference is that WML is XML-based, while HDML is not. The main benefit of being XML-based is that a company can use commercially available XML tools to generate, parse and manipulate WML, and they can also user XSL/XSLT to construct WML decks from XML meta-languages. (To learn more about XML be sure to check out the XML Article Index!)

Another major difference between HDML and WML is that HDML does not allow scripting, (sorry JavaScripters), while WML allows it's own version of JavaScript, called none other than WMLScript. WMLScript allows the programmer to check the validity of user input, access other facilities on the device (make a call on a phone, add a number to the phone book, etc.), generate messages and dialogs, and other device-specific tasks. HDML has the functionality to do most of the same tasks; however, using WMLScript reduces overall network traffic by performing the task locally.

HDML does not have a DTD (Document Type Definition) while WML does. As expected, there are also other smaller functionality and syntax differences such as WML's intrinsic events and the ways in which variables are set and passed.

Comparison Table
FeatureHDMLWML
XML-based No Yes
DTD available No Yes
Scripting None WMLScript
Display Cards Yes Yes
Choice/Select Cards Yes Yes
Entry/Input Cards Yes Yes
Nodisplay Cards Yes Yes
Images in Text and Anchors Yes Yes
Variables Yes Yes
Deck Access Control Yes Yes
Deck Cache Control Yes Yes
Timers No Yes
Multiple Choice Lists No Yes
Bookmarks Yes No*
Nested Activities Yes No**
Images in Labels and Choices Yes No**
Mobile Originated Pre-fetch Yes No**
Key Accelerators for Links Yes No**

* UP.Browser supports this feature via WML meta tag
** Supported by Up.Browser 4.0 via Phone.com WML extended tag

So which language is the most promising pick for the future? Based on the aforementioned facts, I'd have to say that WML is going to live much longer and go farther than HDML. Unfortunately, I think Unwired Planet came out with HDML just a tad before its time. When the HDML Spec was released, XML was so new, Unwired Planet did not know enough about it to make HDML based upon it. Although the Phone.com's UP.Link platform will continue to support applications written in HDML, they are recommending to its users to move to WML. Remembering this and all the other limitations of HDML, I think WML, or some form thereof, will stick around to see the future of WAP.

In Europe and Japan, some WAP devices already do not accept the HDML format. In the US and Canada many of the commercially available CDMA and CDPD phones only support HDML. It is most likely that the future US and Canadian phones will all support WML also. Fortunately, it is not difficult to convert HDML to WML and the learning curve should be minimal. (For more information on WML and HDML be sure to check out The WML/HDML Article Index!)

Happy Programming!


References:

  • W3Schools.com - www.w3schools.com
  • WAP Forum - www.wapforum.org
  • W3C Submissions - www.w3.org
  • Phone.com - developer.phone.com


  • ASP.NET [1.x] [2.0] | ASPMessageboard.com | ASPFAQs.com | Advertise | Feedback | Author an Article