upgrade it when a new version is later released.
What
do the terms deck and card mean?
WAP applications interact with the user through a mobile device, such as a WAP-enabled
phone or PDA etc.
The display on such a device, be it small or large, is called the deck -
it is where all user-input and system responses are shown. Individual screens of
information, that perhaps carry out different tasks, are known as cards.
These cards can appear, one at a time, within the deck. Rather than storing
cards as separate files on a server, multiple card regions can be defined and
then loaded when required. The WML <card>...</card> container
tags are used for this purpose.
How
do I start writing WAP applications?
You can write static WAP applications that are just like
HTML
pages, and which require no programming skills. Alternatively, you can write
WMLScript
applications, which can be loosely described as "cut-down"
programming. Scripts are mini-applications that run on the WAP device to carry
out calculations and interact with the user, much like
JavaScript
does within HTML pages. Finally, you can develop WAP applications that integrate
with server-side databases and other stores of information e.g. spreadsheets
etc. To do this, you decide on a server-based programming environment, such as
ASP,
and then write applications that create
WML
dynamically, extracting data from databases as necessary.
How
does a WAP device connect to the internet?
Data travels from the
WAP device
to a receiving station, much like all voice calls do with mobile
cell phones. This receiving station is known as a
WAP Gateway, and its task is to act as a middleman between a WAP
device and a web-based resource (in other words a web server directly connected
to the Internet). Depending on the configuration, a WAP gateway may communicate
with a
WAP Server,
and the WAP server/gateway may even be the same entity.
Where
are all these WAP-related acronyms explained?
In the WAPuSeek.com online glossary.
Are
there any WAP newsgroups on USENET?
Not at the time of writing, although the following groups cover many WAP-related
questions, and will act as a good starting point:
- alt.cellular.nokia
- alt.cellular.gsm
- alt.cellular.motorola
- alt.cellular.sprintpcs
- alt.comp.sys.palmtops.pilot
- aus.comms.mobile
- comp.sys.palmtops
- comp.sys.palmtops.pilot
- uk.telecom
- uk.telecom.mobile
What
is a WAP simulator?
A simulator is a term used to describe a WAP device
implemented in software, and as such is not a physical device, like a mobile
phone for example. Simulators arrive as part of many SDKs
and allow for local WAP development, saving time spent on air with a real WAP
device in order to test WAP applications. Simulators can also be used
with online content, connecting directly to a given website using HTTP.
Why
do I need a WAP simulator?
For development purposes mainly, but also to view WML
content as well. Web browsers cannot (yet) natively view WML, although this will
doubtless be a feature added soon. Through use of a simulator you can test your
WML and WMLScript
without actually incurring any mobile call-charges.
How
do I access WML content using using a simulator?
Simply by typing in a URL,
much like loading a conventional web site. Many WAP
devices have special URLs that load content directly from the device
itself, such as configuration information, or address books etc., although it is
also possible to enter a URL of a WML-based
resource, for example http://wap.dhl.com, to get to DHLs parcel tracking
service. The naming conventions of many computers hosting WAP-content has
changed, altering the first three characters of the hostname to "wap"
rather than "www", to indicate the resource is a WAPsite and not a
website. Many WAPsites will serve both HTML-based
and WML, and vice-versa.
The
UP Simulator from Phone.com keeps crashing. Is this a known bug?
Some users have reported that the UP simulator "freezes" in certain
situations, rendering all applications unoperable. However, by calling up the
task manager (using CTRL-ALT-DEL for example), it is possible to halt the UP
simulator task. Control should then safely return in a few seconds. A future
release may cure the problem, although the exact cause has not yet been
accurately traced.
Where
can I find a list of all the available simulators?
The developers area
has a list. Other places include Phone.com,
Nokia, Ericsson
and WAP.net, all of
which have developed their own WAP SDKs.
How
can I upgrade from WAP 1.1 to WAP 1.2 or WAP 1.3?
The WAP software is stored on a flash chip in many WAP device models, for
example the Nokia 7110. It should be possible, for those phones with
flash upgrade chips installed, to update their version of the WAP software. A
small charge may be incurred for this although the operation only takes a few
moments. WAP upgrades will become necessary as new features are added, for
example WAP 1.1 does not support push technologies, although WAP 1.2 does.
Greater security facilities will arrive with WAP 1.3, due for release in Q2
2000. Check with your mobile operator vendor about upgradability before
purchasing.
Can
I access any resource on the Internet using WAP?
No. WAP devices are limited in the content that they can display, so a notable
exception will be "plug-in" content such as Macromedia Flash,
streaming video and the like. It is unlikely that WAP devices will ever offer
access to the same software as on larger Personal Computers, simply because of
the logistics involved (the size of most wireless devices has to be small in
order to be convenient to the owner). WAP devices can currently access all of
the Webs text content, and can interact with any back-end scripts and databases.
How
can I use another operators WAP service?
This is an area hotly under debate. At present, the WAP
Gateway you connect to must be specified by entering its Internet
Protocol (IP number) address directly into the WAP device. Some mobile operators
are then not allowing access to other portions of the Internet, in a bid to keep
users confined within their service. This is akin to an ISP not letting a
customer access other portions of the Internet, and is clearly a very bad idea
since it is so restrictive. Companies such as Ericsson have said from the start
that they would not restrict users. BT-Cellnet's network did suffer from the
problems mentioned, although their Genie service is due to start allowing full
access, i.e. to other WAP gateways.
How
can I set up my own WAP gateway?
This would be a large investment, and would need peering arrangements with a
mobile operator. Being a WAP Gateway host effectively means that you control Web
content to that gateway and could therefore make this gateway a portal to
specific services (with or without access to the Internet at large). Having
access to a WAP Gateway also means that it may be feasible to offer
location-specific content (specific to that gateways location, that is). Setting
up a WAP Gateway is a grey area at present and we'll be updating you in the
coming weeks, so check back often.
What
is the difference between WMLScript and WML?
WML is a mark-up
language for WAP-enabled devices, being equivalent to HTML for web browsers. WMLScript
is a scripting language that provides the ability to write self-contained
applications that interact with the user and carry out calculations etc.
WMLScript can also be used to generate WML-content.
Is
WMLScript is like JavaScript and JScript?
The syntax is similar, although with a completely different object model.
Client-side JavaScript is used with a object model that is based on the browser
model (document, frames, forms, hyperlinks etc.) whereas the WAP device object
model is based on cards and decks,
so objects will be tailored around these facilities instead. WMLScript is based
on ECMAScript,
which is an attempt to standardise the JavaScript language. Ironically,
Microsoft's JScript language (a clone of JavaScript, which even keeps some of
the Netscape environments objects) achieved ECMA compliancy before
JavaScript.
Can
I use JavaScript or JScript with WML?
Client-side JavaScript and JScript are browser-specific scripting languages, and
are therefore not suited to WAP applications. However, server-side JavaScript is
perfect for WAP development since it can integrate with back-end databases
(using ODBC, and
can even be mixed with environments such as ASP).
How
can I differentiate between HTML and WML clients?
Whenever a user requests a URL from a web browser or a WAP device, the Web
Server attached to the WAP
Gateway serving your request will send back a HTTP
Header which should include the ability to differentiate the User
Agent that is requesting that URL. On this basis, a server-side script
can examine this value and then generate WML or HTML, depending on the
capabilities of the device. The developers
section has code examples for this, although be forewarned that User Agent
detection is a vexed area with many incompatibilities.
WAP
devices have small screens. Does screen-size matter?
Screen size is important for certain types of applications. Clearly, graphics
and graphical applications are a special case since they need to know the
dimensions of a specific devices screen. Different WAP devices have different
screen sizes. The new WAP PDAs
tend to have larger screens, so it may be necessary to determine which type of
device is being used prior to displaying information that is dependent
on certain screen-sizes. Text will always wrap into a screen of any size, of
course.
How
do I configure my web server with the correct MIME types to serve WML?
When you access a HTML document using a web browser, the Web Server tells the
browser what kind of document it should expect to get back. This is done using a
technology known as MIME (Multimedia Internet Mail Extensions). Your PC will
have a long list of "MIME types" stored on it, since there must be a
corresponding MIME type for every type of file format (images, sounds, word
processed documents etc). This association is made on the filename extension,
for example .gif is a filename extension for a GIF (Graphics Interchange
Format) image, which are ubiquitous on the Web. If you opened a GIF image on
your computer, a specific application could then be used to open it, such as
Adobe Photoshop or Paint Shop Pro etc. The MIME type for a GIF image is image/gif.
Whenever you request
a HTML-formatted document in your browser, the .htm or .html
extension will be associated with your web browser, so the browser knows that
what follows needs to be rendered (marked-up) into a browser for the user to
view. However, some applications generate HTML automatically, for example you
may load a URL such as: http://www.xyz.com/homepage.asp.
So how does your
browser know that the ASP
script homepage.asp is returning HTML? Well, of course, we know it must
since we are using a Web browser, but to guarantee this, the script will send
back a content type HTTP
header. This header prefixes the actual HTML returned, and contains the
MIME type of that data - text/html for HTML content.
In order for your
Web server to be able to send back the correct content type header, the MIME
types must be properly configured, as follows:
How
can I integrate a ODBC database with my WML?
ODBC is primarily
a Microsoft technology, although it is now supported on many other computing
platforms, e.g. Macintosh. Essentially, ODBC
is a piece of software that enables an application to access information held in
a third-party database. Using SQL
queries embedded within a script, data can be accessed and then written out as
properly-formatted WML
code, on-the-fly. The server needs to set an appropriate content type in
the HTTP header
that prefixes the WML being generated. ODBCs operation, if installed on your
computer, will be transparant. You may need to acquire an appropriate ODBC
driver for a particular data source, however, although most major database
vendors are supported, e.g. Access, dBASE, DB2, Oracle, Excel, etc. The developers
section has many examples of scripts written in Active
Server Pages (ASP), ColdFusion,
and PHP etc.
How
can I use ASP/PHP/ColdFusion/Perl to make WML contents more dynamic?
See the developers
section has many examples of scripts written in Active
Server Pages (ASP), ColdFusion,
and PHP etc.
How
can I pass variables to server-side scripts, e.g. CGI scripts, ASP etc?
There are many ways of doing this in WML,
for example here is short piece of WML (with line numbers that should not be
included, note) that allows entry of a persons name, using an <input>
tag. The name of the variable is sendto, and a <select>
container then allows the user to choose whether or not to send the input to the
script named sendto.cgi which exists on the web server www.xyz.com:
<input
title="Name:" maxlength="50" name="sendto" emptyok="false"/>
<select multiple="false">
<option title="OK"
onpick="http://www.xyz.com/sendto.cgi?to=$(sendto)">Yes</option>
<option title="Cancel" onpick="#Home">No</option>
</select>
If the user selects
the "OK" option on their WAP device, the onpick event loads the
script sendto.cgi and passes the value of variable sendto as the
CGI parameter named to. Notice how WML variables start with a $,
and then encapsulate the variable name in brackets, e.g. (sendto). URLs
can contain CGI formatted name and value pairs of the form name=value,
so if we entered the name wapuser at the input prompt, we would in fact
be calling the URL http://www.xyz.com/sendto.cgi?to=wapuser. Server side
environments such as Perl and ColdFusion can extract parameters from the URL
with ease. Perl can use one of the many cgi-lib.pl libraries, and ColdFusion
can just say URL.to to get the value from the URL. More on this in the developers
section.
How
can I obtain user input in my WML page?
There are different types of user input, for example to provide text fields for
alphanumeric input, use the WML <input> tag. For multi-option
selection (a drop-down list), use the <select> container tag. More
on this can be found in the developers
area.
Is
WML case sensitive?
In WAP 1.1, yes. Prior to this (WAP 1.0) case did not matter, although for all
future development, it will. Ensure that WML tags are all lower case, e.g. <card>.
WMLScript is also a case sensitive language (just like JavaScript).
How
do I prevent a WML deck from being read from the cache?
When a WML deck
has been downloaded to a WAP device that code stays stored in the device for a
certain period of time, at which time it is expired. During the period up until
that code is stored in the WAP device, a request for that same code will result
in it being retrieved locally from the WAP device, rather than from the network.
This is known as cacheing, and is widely used on the Internet, and by web
browsers in particular. Cacheing is not always desirable, especially if you are
serving time-sensitive information, or information that will change very
quickly, very often - much more quickly than the cacheing period that is set
internally by the WAP device. In such cases you may want to force a
refresh of a particular URL and not use a cached version. This can be done by
sending an appropriate non-cacheing HTTP
header back from the web server to stop the cacheing operation
happening.
Your development
environment on the server will dictate which method(s) can be used. For example,
both ASP, PHP
and ColdFusion
can send back different HTTP
headers. The four headers required are as follows:
Expires: Mon, 01 Jan 1999
12:00:00 GMT
Last-Modified: 01 July 2000 12:00:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Line one tells
the WAP device that the deck has expired by setting a date that is in the past
- you can hard-code this in to your application. The second line is the date the
deck was modified - you can replace this with valid date and time values,
available from your programming environment. The third line is a HTTP
version 1.1 header that turns cacheing of this page off, and line four is
a HTTP version 1.0 header. You can omit one of these lines just as long
as you know which version of HTTP your web server is using. Include both if you
are unsure, or if you are going to move your scripts to a new server etc.
In ColdFusion
we would therefore code as follows:
<cfcontent type="text/vnd.wap.wml">
<cfheader name="Expires" value="Fri, 01 Jan 1999 12:00:00
GMT">
<cfheader name="Last-modified" value="#DateFormat(Now(), 'dddd,
dd mmm yyyy')# #Hour(Now())#:#Minute(Now())#:#Second(Now())# GMT">
<cfheader name="Pragma" value="no-cache">
<cfheader name="Cache-Control" value="no-cache,
must-revalidate">
...
where <cfcontent>
sets the MIME type (we could use a <cfheader> instead if you
wanted) and <cfheader> returns the additional HTTP headers. The DateFormat()
function is used to get the date and time information, and Now() returns
the current date/time.
Using PHP we
could code the following, just using the header() function to write out
the data directly, and using gmdate() to get the date and time string for
the third line:
<?
header("Content-type: text/vnd.wap.wml");
header("Expires: Fri, 01 Jan 1999 12:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "
GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
...
?>
As you can see, each
programming environment has its own API,
which you will need to learn before writing WAP applications that deliver WML
on-the-fly.
Can
I find out the identity of the WAP user, e.g. a telephone number etc?
An interesting question, the answer which still not universal or widely
publicised. Essentially, this question has privacy implications. Should WAP
gateways divulge the identity of a WAP user? In fact, the
"identity" of a WAP user is already divulged in manner of speaking
using HTTP headers
returned by the web server to the WAP gateway, although this is only done by
some WAP gateways at present. The Phone.com gateway located at uplanet.com
(that uses the UP.SDK software) provides a HTTP_X_UP_SUBNO HTTP header.
Each WAP device connecting to the gateway is assigned a unique subscriber ID
which is also unique throughout the world. Every HTTP request the browser sends
contains a variable which contains this ID, therefore you just have to use a
script to get at this variable. You could then this value as a unique key
in a database, for example. The format of the HTTP_X_UP_SUBNO value is of
the form 0000000000-00_devgate2.uplanet.com, where the hostname part is
the WAP gateway. The first sequence of digits may represent the
callers phone number, but it could also be a random string.
Notification
services are starting to appear on the market, so clearly the technology is in
place . However, this technology is WAP gateway dependent, and may require a
specific SDK.
For more
information, see Phone.com, whose SDK
arrives with notification code and a notification utility for WAP 1.1. WAP 1.2
and WAP 1.3 should include greater facilities for identifying mobile users (see
below).
How
can I make WAP applications that notify users about specific events?
This is known as notification technology. Notification is available at
some WAP gateways, but is not universally available at present.
Notification is
fully supported in WAP version 1.2, which should be arriving very soon now.
Developers should wait for WAP 1.2 before developing notification-based systems.
Alternatively, you can find a WAP 1.1 SDK that supports limited notification,
such as Phone.com's UP.SDK and UP.Browser.
Push Access Protocol
(PAP) will arrive with WAP 1.2 in the Summer of 2000. WAP 1.2 should then be
accessible in a variety of handsets and PDAs. See also: above.
In the meantime, most WAP phones support the SMS,
so offering an SMS facility is a possibility. There are a variety of SMS server
applications on the market (see WinSMS
for starters).
How
can I initiate a voice call from a WAP/WML application?
The WTAI standard
allows voice-initiated calls to be made from within a WAP application, e.g. from
within a WML deck.
For example:
<a href="wtai://wp/mc;1234567890">Dial
1234567890</a>
will provide a WML
hyperlink that initiates a call to the ficticious number 1234567890.
International numbers must have the initial "+" sign replaced with
"00", so instead of using +441234567890 (+44 is the
internaional code for the United Kingdom in this case), you would use 00441234567890.
Support for WTAI is not universal. The Phone.com UP browser supports WTAI
at the time of writing. More browsers are sure to follow suit.
WML
is described as being derived from XML. What does this mean?
XML is a standard
that defines the structure of information, rather than the layout of text
(like HTML does).
WML is based upon XML, from which it derives its syntax. XML has a much stricter
syntax than HTML, as you will learn when developing your own WML documents.
What
is ECMAScript, and why is WMLScript based on this?
ECMAScript is an attempt to standardize the JavaScript
and Jscript (Microsoft's) scripting language technologies that are used
extensively in both client (browser) and server-side environments. ECMA
is a standards setting body based in Switzerland.
WMLScript is similar
in syntax to JavaScript and JScript, hence the decision to base the language on
ECMAScript, which is the standardised version of these two dialects. JavaScript
programmers will have no problem learning WMLScript.
Can
WAP devices use graphics?
Yes, but due to the low resolution nature of WAP devices, the graphics must be 1
bit bitmaps, and must be stored in WBMP format at the current time of writing,
at least. A Windows bitmap formatted file can be used, but be sure to set a 2
colour palette, e.g. black and white (or monochrome).
Web graphic images
formats, such as JPEG and GIF are not yet part of the WAP standard, although
some devices are now supporting the GIF format. IT is likely that as WAP devices
become faster, a wider range of graphics formats will be supported.
How
do I create graphics for my WML pages?
First of all, we have a on-the-fly bitmap creator here at WAPuSeek.com,
which is available from your account
area. There is also a bitmap library containing hundreds of icons and
other small images. The bitmap editor allows you to create bitmaps through use
of a pixel grid.
There is also a free
Photoshop and Paint
Shop Pro plug-in here.
A Java convertor (PIC2WBMP) is available here.
There is another on-the-fly (web-based) bitmap editor here,
which takes a JPEG or GIF image, and converts it to WBMP format.
Be sure that the
size of the graphic is not more than 1461 bytes, since the WAP specification
quotes this as the maximum WAP device memory allocation. The dimensions of your
images should also be carefully observed. Some WAP devices have screens
typically less than 100 pixels in width, and 70 pixels in height, such as the
Nokia 7110 which has a 96x65 pixel display.
What
does a "1 bit" graphic actually mean?
It means one colour per binary digit (bit), and since a binary digit can be 1 or
0, there can be two colours. See above for more
information.
Can
I use Windows own paintbrush software to create WBMPs?
Yes, although it is better to use a dedicated solution, such as those mentioned above.
What
about moving images e.g. animations and video
Moving imagery and animation are coming to a range of next
generation mobile devices.
What
maximum size should my WAP graphics be, if any?
You should aim for a maximum of 1400 bytes.
My
WAP simulator says that "text/html mime type is not supported"
Some HTML-formatted text has appeared inside a WML-formatted file, which is not
permitted. Remember that if you are developing server-side WAP applications that
create WML dynamically, any error messages may cause a HTML-formatted message to
appear, which in turn will cause an error in the WML interpreter. No HTML tags
can appear in WML documents. If you are using a simulator, check the debugging
options to see if you can see the source code for your application. The UP.SDK
from Phone.com allows this.
My
WAP simulator says that the binary image of my WML page is "too
large".
This is quite a common occurence and essentially means that the maximum WML deck
size has been exceeded. As a rule of thumb, aim for the 1400 byte limit
for your deck (file) size. See the developers
section for more details - there is a specific article on programming re-entrant
deck templates. As a first resort try breaking up your WML decks into separate
cards, perhaps in different files, so that the size of the document loaded (at
any one time) is smaller.
Which
characters are not permitted in WML pages? Are there HTML-like entity codes?
Special cases here include the ampersand (&) which should be specified
literally as its entity code equivalent, &. Ampersands are used
when breaking up URL parameters when sending data from a WAP device to a Web
server, for example. If you need access to a dollar symbol ($), use two
dollars, e.g. $$ - the first is used to "escape" (remove its
significance) from the second. As a rule of thumb, use HTML entity codes when
you require any non-alaphanumeric characters.
|