Code Comparison
By Joachim Bamrud, Wed Jan 16 00:00:00 GMT 2002

WML is both easier and more difficult to use than HTML, developers say. Will XHTML help clear things up?


While the wireless Internet is growing significantly every day thanks to more Web-enabled phones, its content offering still lags far behind that of the fixed Internet.

The gap between WAP and Web content can partially be explained by the mere fact that the former is the new kid on the block. Another major reason is that the two use different markup languages: WAP uses Wireless Markup Language (WML), while the Web uses Hyper Text Markup Language (HTML).

That means that any existing Web site has had to develop a separate version for WAP, an additional expense in time and cost that many smaller sites have chosen to forego.

Code qualities


Some developers who have used both languages say WML is relatively easier to code than HTML.

"Usually, the sophistication of HTML documents is higher than those for cellular phones because the medium, the web, is richer than WAP," says Michael Mosiewicz, CEO of the Poland office of Internet developer and hosting company Proinet. "WML is simpler [and] thus probably easier."

The two languages both use many similar tags and support simple text formatting, but each "page" in WML (referred to as "cards") can be grouped together into a single deck and then downloaded as one block of code to the mobile device. When the user makes a request, the wireless browser doesn't have to request a new card from the server, but displays the card from its cache.

These are big advantages for the end-user since the wireless Internet is charged by airtime usage (2G) or packets downloaded (2.5G).

Panagiotis Konstantinidis, a UK-based developer for HotGen Studios, says the two markup languages are about the same in terms of ease for any developer.

"If you already know HTML the transition to WML is a piece of cake," he says. "On the other hand if you have no idea about HTML, it is not difficult to learn how to build WAP sites."

However, some developers say WML can be a bit more difficult since it is stricter than HTML in terms of syntax and case sensitive codes.

"WML is very tedious to write, and there is very little good WML page designer software out there," says Espen Lyngaas, a Norwegian developer who came up with one of the world's first WAP cam sites. "The fact that they are forgiving is possibly one of the reasons why so many master HTML, and so few master WML."

Barbara Ballard, who designed user interface for US operator Sprint's TouchPoint 3000 smart phone and created the style guide for its wireless web, says WML can be both easier and more difficult to design than HTML.

"WML is a little easier than HTML as there is less to it, " says Ballard, who was recently appointed principal user experience architect at US-based Little Springs Design Inc. "However, if someone has designed a site with the extra navigation tools that make it easier to understand, it is harder to code."

Development dilemmas


WML has several disadvantages compared with HTML, developers say.

Lack of advanced applications such as color, proper images, sound and video is one drawback of WML, although these are largely restrictions created by the fact that browsers don't have the necessary capabilities to provide them, says Konstantinidis. The good news is that the new WAP 2.0 standard does address these issues, he says.

One major challenge in writing WML is that while the language itself is adequate, a major problem is the lack of uniform standards for all mobile devices.

"Developers have to cater to all kinds of mobile phones, and in the worst cases have several, almost identical versions of the code for each type of mobile phone," says Lyngaas.

Ballard agrees. A select list, for example, is rendered as a link to a separate screen on Nokia and Ericsson browsers, but it is a numbered inline list on an Openwave browser, she says. Openwave displays do event labels in the soft keys, while Nokia requires the user to go into the "Options" menu to see the do events.

"These differences make designing good WML difficult," says Ballard, who also includes a lack of font size and table limitations among the negatives of WML.

Another problem is the lack of adequate tools. Many developers routinely complain about emulators not working as they should.

"The emulators available on the market do not emulate the corresponding phone 100 percent," says Konstantinidis. "When you try to test the WML page on the mobile phone that the emulator was emulating you find that it does not quite work as expected."

And, of course, there's the syntax problem. "Strict syntax causes problems for many HTML programmers new to WML," says Mark Ridgeway, an Australian developer and technology teacher.

Developers disagree on whether designing a WML page takes less or more time than designing an HTML page. Estimates on how long it takes to design a WML page can vary from as little as one day to months. Alexander Wesdorp, a Netherlands-based developer who recently started designing WML pages, developed a wireless site with around 300 lines of code in three weeks.

Many WAP industry officials are hoping a new markup language, XHTML, will help boost WAP content significantly. XHTML is a new language that merges WML with HTML, enabling designers to develop one site, or at least use one language, for both wireless and fixed sites. It's supported in the new WAP 2.0 specifications.

Developers themselves, however, are split on the issue.

"It will not only make life easier for developers but it will reduce development costs as well and make applications easier to be used by the consumers, hence enhancing the potential for wide spread WAP usage," says Konstantinidis.

One size doesn't quite fit all


But developers like Mosiewicz and Ballard warn that having one language won't solve the fact that mobile devices are different than desktop PC's in terms of screen sizes, multimedia capabilities, power and usage costs.

An ordinary screwdriver may be the right tool for both car and a TV set. However, when humans invented standard-sized screws they didn't automatically leverage skills necessary to repair both car and TV sets, Mosiewicz points out.

"XHTML is a big giant can of worms," says Ballard. "It will look like a holy grail for developers and will be terrible for users, although users will get prettier web sites."

With one site for both wireless and wired Internet, a lot of content on the mobile version will be "hidden". Yet, the mobile browser will download all of the content. Which means the end-user is paying for content he won't even see, Ballard points out.

And some content - like columns and tables - will appear in formats not ideal to the small screens of phones, she says.

"If you thought horizontal scrolling was bad on a computer, just wait until you see it on the phone," she says.

But, no matter what the opinion is on WML vs. HTML vs. XHTML, WML developers are keen to see more wireless content. Says Lyngaas: "If just a fraction of the people who today have a web site, made sites for wireless devices, I'm sure the handheld device development would leap forward."

Joachim Bamrud is an award-winning journalist with 17 years experience as a writer and editor in the United States, Europe and Latin America. Bamrud has worked for various print, broadcast and online media, including Latin Trade, Reuters and UPI.