One
fine day, Mr dotcom millionaire is roaming around in his Mercedes. Suddenly, he
remembers he has to buy a fast laser printer for his new office and luckily,
there’s a computer peripherals shop nearby. But before buying one, he wants to
go through the printer reviews on PC Quest Website. However, he doesn’t have a
PC or a notebook, a modem or a phone line in his car. What he always carries
along is his small metal brown-colored cellphone. Does he give up saying "I
can’t get connected"? For the dotcom millionaire’s of this world, who
want to connect to the Net from anywhere and everywhere, welcome to the
unconnected world–welcome to the world of WAP.
Before you misinterpret what we’ve said above, by
unconnected world we don’t mean a world that isn’t connected. We mean that
there are no wires or cables, but you’re still connected. Interesting? Read on
for more on how this is happening around the world, with the help of this
exciting technology–in fact, a protocol (set of rules)–to access computer
networks, especially the Internet, through your mobile or cellphone. It’s
called WAP, short for Wireless Application Protocol.
WAP
is meant to provide services to all small devices–cellphones, pagers, PDAs,
etc–that you can carry along comfortably. It’s meant primarily to access the
information highway–that is, the Internet–through devices with low and
inadequate resources like slow CPUs, less RAM, small displays, and low bandwidth
and connection stability. The protocol builds upon existing wireless networks,
like mobile or cellphone networks, and also provides some enhancements, like
better user interface, to their standard services.
Let’s contrast HTTP with WAP to understand how you can
browse a WAP-enabled Website.
WAP defines a protocol stack which has a layered design
similar to OSI network layers. It defines a Wireless Application Layer (WAL),
Wireless Session Layer (WSL), Wireless Transaction Layer (WTL), Wireless
Transport Security Layer (WTSL) and Wireless Datagram Protocol (WDP).
WML (Wireless Markup Language) is to WAP what HTML is to the
Web. If you’re familiar with HTML, you’ll find the WML syntax very similar.
WML pages are designed such that they can be viewed comfortably on small
displays. So, a wireless device seeks for a WML page from a Web server, to be
displayed on an embedded microbrowser, very much like your browser seeking for
an HTML page. The difference is that the wireless device uses an additional
intermediary called the WAP proxy.
A WAP transaction with a Web server
The figure depicts a simple transaction that requests a WML
page through a mobile phone.
The mobile phone user; keys in a URL in the microbrowser in
his cellphone, say www.foo.com/foo.wml or www.foo.com/foo.html and connects to
his mobile service provider. The request is encoded for transmission across the
wireless network and is sent to a WAP proxy, which is most likely installed at
the service provider’s site. The WAP proxy constructs a standard HTTP request
and contacts the Web server addressed. The Web server sends the requested WML or
HTML page to the WAP proxy. If the page is a WML page, the WAP proxy encodes it
for the cellphone network you’re using, and simply forwards it to the
microbrowser running on the WAP phone. If it’s a non-WAP page, say an HTML
page, the WAP proxy applies a filter to translate it to a WAP page, encodes it,
and delivers it to the microbrowser.
Non-Internet services
As explained above, a WAP proxy acts as an intermediary
between your WAP phone and a remote Web server on the Internet. But that isn’t
the only thing that you can access using WAP. Your mobile service provider could
use WAP to make available additional services–including virtual private
networks to your office network, from your cellphone. This is done using WTA
(Wireless Telephony Application) servers. Here, the wireless device (your
cellphone) connects directly to the WTA server, which is usually installed at
the mobile service provider’s site. The WTA server may provide some standard
as well as service provider specific services. For example, a WAP-phone user
could maintain an address book on the WTA server. The WTA server can also be
used to maintain a private database accessible to all cellphone users from a
subscriber company, etc. Enhanced security would be an obvious feature in a WTA
server.
WAP for users
As a user, you get a whole range of customized, up-to-date
services when on the move. For instance, you could check your cash position at
your bank before committing to deals. Or, you could track your stock portfolio
when on the move. You could even buy or bid for products on a WAP-enabled
Website. WAP implements a security layer called Wireless Transport Layer
Security, which is based on SSL (Secure Socket Layer), for enabling secure
transactions. Not only that, you could also view your e-mail inbox, while on the
move, or use WAP-enabled search engines to search for anything and everything.
Moreover with WAP’s push technology, you can be notified of events like
changes in airline schedules, by your service provider or a Website.
WAP for developers
WML is based on XML (eXtensible Markup Language) and supports
both text and images. A simple static WML page which displays "PCQ Labs, No
hype, only unbiased truth" on your device’s display would be:
"http://www.wapforum.org/DTD/wml_1.1.xml">
PCQ Labs, no hype, only unbiased
truth
Here, the first two lines are the XML declaration and
Document Type Definition (DTD). The
is similar to the
the smallest unit sent to a WAP-enabled device is called a deck. A deck in turn
consists of cards, which are displayed one at a time, since the display area is
small. The above example is thus a simple WML deck. This deck contains a single
card enclosed within
tags
are similar to the HTML
tag and the message to be displayed is written
within them.
WMLScript is a scripting language similar to JavaScript for
client-side scripting. The first use of such scripting is validation at the
client side. The example below illustrates how WMLScript can be used for
checking whether the ID the user enters is of the prescribed length or not. The
actual script is in a separate file named script.wmls, which is called from
scripttest.wml.
scripttest.wml
http://www.wapforum.org/DTD/wml_1.1. xml">
Enter ID (5 digits):
name="ID"/>
You entered: $(ID)
You entered an incorrect ID
________________________________
script.wmls
extern function validate (ID)
{
if (String.length(ID) != 5)
WMLBrowser.go("scripttest.wml#
error");
else
WMLBrowser.go("scripttest.wml#
Sok");
};
The file scripttest provides the user with an input text field (similar to
Form text element)
When the user enters the ID, the ID is passed to a function validate() of the
script.wmls as
The function validate( ) is defined as an external function,
in the file script. wmls, using the keyword extern. This function employs an
if-else construct to check whether the ID supplied is of the correct length. If
not, it tells the microbrowser to show the card with ID "error" of the
scripttest deck, else the card with ID "ok" of the scripttest deck is
shown. To accomplish this, the library function WMLBrowser.go( ) is used.
Since a WML page can reside on a normal Web server,
server-side scripting languages like Perl, C, PHP, Java Servlets, etc, can be
used to deliver dynamic content to WAP devices. You must configure your Web
server to understand WML and WMLScript MIME types as:
MIME type : text/vnd.wap.wml
File Extension : wml
MIME type: text/vnd.wap.wmlscript
File Extension : wmls
The WAP future
WAP as of now delivers only text, but is expected to become
more versatile in the future. Currently, WAP is restricted by bandwidth and
hardware constraints. As these constraints get removed, WAP is expected to
deliver much more than it can today. And don’t be surprised if by that time
WAP undergoes metamorphosis, into something totally different and beautiful–a
butterfly