Best Practices | Knowledge Management | Security | Tutorials | Books | Tools

Intranet Journal

Home | Exchange | FAQ | Software & Standards

Wednesday March 10, 2010

The Wireless Intranet Part III  

WML, the Language of the Wireless Web


By Troy Dreier

Another language to learn? Great, you must be thinking, just what I need. While it's true that coding for wireless devices means learning a new set of tags, don't fret. Wireless Markup Language (WML), one part of the Wireless Applications Protocol (WAP), isn't a completely new paradigm. In fact, seasoned HTML and XML coders should be off and running after only a few brief tutorials.

This is the third part of our series on the wireless intranet. We'll look at the evolution of WML, aiming to provide a context for developers who are now learning the language. We won't be providing tutorials themselves. As the links below show, there are already exceptional free WML tutorials online.

For a look at the history of WML, we turned to Scott Goldman, CEO of the WAP Forum. The Forum itself started in December, 1997, formed by four companies: Erickson, Motorolla, Nokia, and Phone.com, which at the time was known as Unwired Planet. "The intent was to develop a specification that would help people access and deliver content from the Internet on their wireless devices," Goldman explains.

The forum saw early on that HTML, the language of the Web, was impractical for the unique limitations of wireless devices. A new language was necessary. As Goldman says, "WML was developed as a specific markup language to accommodate several of the nuances, or peculiarities, or strengths, of the wireless device: limited screen size, limited RAM, limited ROM, latency of delivery, irregular coverage areas, one-finger navigation, and a number of other peculiarities of the wireless world.

The Logic of WML The result was the language we have now, one designed to offer the most clarity and content with the least amount of hassle or download time. WML lets developers provide clear choices and a streamlined interface. Get the information across to your mobile workers quickly, because they don't want to wait for it.

"When content is written for a wireless device," Goldman says, "it must be structured in such a way that it appears on a small screen in a logical fashion, so that you can drill down in menus quickly."

Goldman likes to compare the differences between traditional Web surfing and wireless use to the differences between a buffet and room service. A buffet, like the wired Web, offers a huge variety of choices. You can look from one item to another, sample what you'd like to try, and jump around at will. But the wireless Web is more like room service: you select from a limited menu, then your request is delivered.

WML's tags reflect its streamlined purpose. The font formatting tags, for example, offer much less choice than those of HTML. "The language tags were designed very much for a wireless device," notes Goldman. "Wireless devices today have monochrome screens without much control over the font. The tags differ in that you can't create much in the way of bold and underlining and so on, whereas on an HTML page you can do that."

WML also differs in how it helps the developer break up the content. "Information has to be compressed into small screens so that it is sampled in chunks that the wireless device and the wireless user can actually digest, as opposed to asking the wireless user to scroll down through a whole long series of text on their phone," says Goldman. Long sections of text are impractical, he notes, and would be cumbersome for the wireless user. So tags are put in to break the text into multiple screens, with Next and Previous cues at the bottom of each screen.

Tips Learned Along the Way One reason that WML is successful, is because its developers learned from previous markup languages. Peter King, the Principle Architect at Phone.com, saw how WML used the lessons of the past to build the future.

"There were various inputs to WML," says King. "One was HDML [handheld device markup language, a previous attempt at a wireless language]. Other things we looked at included HTML. Both of those languages had been defined before the XML system for markup languages came out. One of the areas that we cleaned up was to define XML as the system for defining the markup language."

"In HTML, the rules for starting and ending elements are somewhat lax," King explains. "If you look at the implementations of HTML browsers, they're quite complex because they try to accommodate the looseness in the language and the way people develop the language."

For example, coders don't need to use start and end paragraph tags in HTML. They're preferred, but you can get along without them. WML, like XML, is stricter.

"It's easier to build tools that validate XML-based languages to make sure they're syntactically correct," says King. "Using XML makes the structure and syntax of WML simpler and more regular, which makes it easier for computers to process and makes it easier for tools to be developed. It's a lot more cost effective."

WML's Future
The bad news about WML's future is that it doesn't have one; WML will shortly be replaced by another language, and that language will be supported by new devices within a year. The good news is that it doesn't matter. WML-coded pages will still display correctly.

"The next generation of WAP is moving towards true Internet standards," explains Scott Goldman, "so we are moving much more toward XHTML than we are towards enhanced versions of WML."

While we will see continued improvements to WML within the next year, furthering the language won't be a top priority. Instead, XHTML will take its place in the Wireless Applications Protocol.

XHTML has the advantage of letting developers code once for a variety of devices. The server will determine what kind of device is requesting a page, and what connection speed that device has. Content delivery will be automatically customized.

Don't worry that you'll be wasting your time learning WML. XHTML will be fully backwards compatible, so any work you do now will still render correctly.

The Pep Talk
The tutorials linked below will teach you the rules of WML development in no time. You can even use your favorite applications, rather than doing the work by hand. Some of the major site design tools support WML; those that don't soon will.

Peter King says the challenge isn't simply learning the tags. "The most interesting thing about developing for wireless phones is defining a user interface that looks and feels good on the constrained form factor. It's a small screen, it has limited input capabilities. It takes a bit of thought to construct an application that looks and feels really good," he says.

"The wireless Web of today is in the same position that the wired Web was back in 1994 or so," says Goldman. "The explosion of content is already starting to occur. Right now, there are about 4.4 million WML pages available for WAP-enabled devices. Roughly at the same time in the development of HTML, there were about 2 million HTML pages."

Now it's time to make your intranet a part of it.

Resource links

AnywhereYouGo's WAP Instruction Page:
http://www.AnywhereYouGo.com/ayg/ayg/Content.po?name=wap/Fivesteps

AnywhereYouGo's Introductory Tutorial on WML Programming:
http://www.AnywhereYouGo.com/ayg/ayg/Content.po?name=wap/Helloworld

A WML Tag Reference Guide, with Downloadable PDF Version: http://www.AnywhereYouGo.com/ayg/ayg/Content.po?name=wap/Wmlidx

Copyright 2002 Jupitermedia Corporation, All Rights Reserved.
Legal Notices | Licensing, Reprints, & Permissions | Privacy Policy | Advertising on Intranet Journal
Home | eXchange | F A Q | Find | Register |