The name "Wireless Application Protocol" (WAP) is misleading. WAP is not actually a protocol at all, in the sense that HTTP and IP are protocols. In fact, WAP involves multiple protocols and a complete network architecture for delivery of wireless content.
In 1997, several companies organized an industry group called the WAP Forum. This group produces the WAP specification, a (long and detailed) series of technical documents that define standards for implementing wireless network applications. Hundreds of industry firms have given strong backing to the WAP Forum, so the technology should become widely adopted, and it is already well-hyped.
WAP specifies an architecture based on layers that follows the OSI model fairly closely. The WAP model, or stack as it is commonly known, is illustrated below
WAP's session layer is the Wireless Session Protocol (WSP). WSP is the equivalent to HTTP for WAP browsers. WAP involves browsers and servers just like the Web, but HTTP was not a practical choice for WAP because of its relative inefficiency on the wire. WSP conserves precious bandwidth on wireless links; in particular, WSP works with relatively compact binary data where HTTP works mainly with text data.
These three protocols can be thought of as "glue layers" in WAP:
WTP provides transaction-level services for both reliable and unreliable transports. It prevents duplicate copies of packets from being received by a destination, and it supports retransmission, if necessary, in cases where packets are dropped. In this respect, WTP is analogous to TCP. However, WTP also differs from TCP. WTP is essentially a pared-down TCP that squeezes some extra performance from the network.
WTLS provides authentication and encryption functionality analogous to Secure Sockets Layer (SSL) in Web networking. Like SSL, WTLS is optional and used only when the content server requires it.
WDP implements an abstraction layer to lower-level network protocols; it performs functions similar to UDP. WDP is the bottom layer of the WAP stack, but it does not implement physical or data link capability. To build a complete network service, the WAP stack must be implemented on some low-level legacy interface not technically part of the model. These interfaces, called bearer services or bearers, can be IP-based or non-IP based.
WAP supports dial-up networking using IP and Point-to-Point Protocol (PPP) as the bearer interface underneath WDP. It also supports Short Message Service (SMS) and General Packet Radio System (GPRS). SMS passes text and binary data between digital phones. GPRS is a relatively new technology that implements faster, "always-on" connections for wireless devices; GPRS actually runs on top of IP.
The single most popular component of WAP is undoubtedly Wireless Markup Language (WML). WML allows developers to specify how content will be presented to a WAP browser. WML can be compared to HTML in terms of its syntax and functionality, but many differences between the two exist.
WML supports a tag-based syntax just like HTML. Many tags with the same name can be found in both languages, although the behavior of these tags may differ:
<a> <img> <input> <p> <select>
WML attempts to improve on the inconsistent syntax seen in much of today's HTML. WML generally requires stricter conformance to standards -- specifically the inclusion of end-tags or closed empty-element tags. For example, the <p> tag must always be followed by a matching </p> tag (or else the page will not display). Tags without a matching end tag, such as br, must incorporate the ending slash as follows:
Because WML is a subet of XML designed for XML parsers, the top of every WML page includes the following header information to specify the Document Type Description (DTD):
<?xml version="1.0"> <!DOCTYPE wml PUBLIC -//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
The most apparent difference between WML and HTML source files is the concept of WML cards and the <card> tag. Cards effectively implement multiple WML screens within a single page. WAP browsers display only one card at a time, but they load a page file (called a deck) that contains multiple cards in one transaction.
Loading multiple cards at once caches potential screen views locally on the WAP browser to reduce the need for network requests. In addition, one network request to fetch a file the size of a typical HTML page will generally execute faster than a series of requests for much smaller pieces of the file. In these ways, WAP’s implementation of cards and desks is a clever optimization of the limited bandwidth on today’s wireless networks.
WML supports variables. The <setvar> tag assigns a value to an alphanumeric name as follows:
<setvar name="index" value="1">
Accessing a variable in WML is similar to Perl:
<a href="page_$(index).wml">Next page</a>
WML supports control flow through tasks. It also supports events including timer events with the <timer> tag. These features make things like form validation in the browser easier for developers to implement in WML than HTML. Validating form data in the browser saves bandwidth over the alternative of sending data to the server for validation.
The way in which mobile wireless devices are used differs dramatically from the way we use PCs. On a PC we may spend hours constantly connected to the Web hunting for information at work or playing complex, immersive games at home. On a wireless device, we tend to be away from home and "online" for relatively brief and unpredictable periods of time.
The wireless industry hopes that WAP devices will become popular for ecommerce applications like online banking in the not-so-distant future. In the short term, it is more likely that useful WAP applications will simply extend the functions of telephone and allow us to answer a phone message with an email, for example. The early WAP applications have featured news feeds, stock quotes, and weather forecasts -- hardly compelling content. Significant backlash against the hype and optimism surrounding WAP has certianly occured as a result of the uncertainly about its future.
The popular search engine Google claims that fewer than one percent of Web sites include WML published-content today. Nevertheless, Google offers a slimmed-down version of its engine and an index of “WAP only” sites, and it also implements a service that translates pages from HTML to WML on request.
So-called WAP gateways like Google's are currently a fashionable way to provide content on wireless networks. A WAP browser sends requests to a WAP gateway that in turn forwards the request to a true Web server. The WAP gateway generates WML based on the HTML pages delivered from the Web server. Then, the gateway sends decks back to the browser.
WAP today is tied to the Web mindset in many people's minds. These people see WAP as just a technology that gives mobile devices access to the Net directly or through gateways. They find it confusing that so many new network protocols, similar but different from the Web protocols, have been developed. However, it is possible that WAP will enable a new and completely different kind of content network in the more distant future.
In responding to the backlash against WAP, advocates are quick to point out that WAP technology exists today in a very early, primitive form compared to how it will evolve.
WAP defines an alternative to the Web for content delivery networks. The WAP model was optimized for the following constraints, that are very different from the constraints found on today's Web: