Server colocation, web database interface
design (mySQL/PHP), web site design
|
||||||
|
|
|||||
|
|
WAP Frequently Asked Questions
WML stands for Wireless Markup Language and is just one part of the WAP specifications - analogous to the HTML language used to build Internet web pages. It is a markup language based on XML and is used to specify the format and presentation of text, hierarchies of screens (known as a 'deck'), and hyperlinks between those screens (or 'cards').
A WML deck contains a collection of cards. The card element is a container of text and input elements that is sufficiently flexible to allow presentation and layout in a wide variety of devices, with a wide variety of display and input characteristics. A card can contain markup, input fields and elements indicating the structure of the card. A wml page is basically to a mobile phone what an HTML page is to an internet browser - it contains the code that lets the browser know what you want displayed on the screen. If you are already proficient or even know just a little about HTML, then you will find making WAP pages simple! All you need to remember is that wml pages are quite a bit stricter than HTML pages - they have to have perfect coding for them to work. Because mobile phones are not as powerful as computers, and certainly do not have as large screens, the code has to take on a special reduced form - a 'deck'. A deck is composed of a series of 'cards'. Because mobile phones have very little memory, you have to display all of your information as little chunks. These are cards. A group of these chunks (cards) is called a deck. A WAP enabled browser will deduce that the wml document is a deck, so all you have to do is tell it where the cards start and finish. Usually you have between one and three cards.
WML
"pages" or WML documents are referred to as decks. Each deck consists
of one or more cards. Each deck begins and ends with the <wml> tag,
and each card begins and ends with the <card> tag. When the WML micro
browser accesses a WML document (or deck), it reads the whole deck, and
navigation between the cards in this deck is done without the need to
load any more data. This is important to know, because once you've loaded
a deck, all cards within it stay statically in the WML micro browser memory
until the browser is instructed to reload the whole deck. The <card>
tag of WML is very similar to the <a name> tag of HTML.
Here is an example of a multi-carded deck, and how you can link between
the two:
WML
is very much like XML. It is very strict compared to HTML , which means
that when it is parsed and interpreted by the micro browser there is not
much room for error. Just as in HTML, the language uses formatting tags
bounded by < and >. Most tags have start tags <tag> and end tags
</tag>. The items contained between the start and end tags are called
elements. Some tags are so called empty-element, and have tags with no
content <tag/>. Most elements may have attributes which further describe
what is to be done with the content within it. Attribute names must be
in lower case, and the attribute values must be enclosed in double quotes.
Some elements require attributes, and some attributes are optional. Yes! And be careful, because WAP v1.1 uses lower-case tags.
Use two dollar signs together in the WML code to display a single dollar on the rendered page.
Use
the following in your document prologue:
There are a variety of SDK's available. AnywhereYouGo.com has a WAP SDK and IDE list that is kept up to date. You can check out a variety of tools to use from that section. The Nokia and Ericsson SDK's are quite popular, and the SDK from YoSpace has been gaining quite a bit lately. For writing simple WML pages, any text-editing tool is suitable. Certain HTML authoring tools may also be useful (especially if they support user-definable tags), such as Allaire Homesite. You can use the SDK for simple testing, but for larger projects this might be difficult. AnywhereYouGo.com is building a set of web-based tools to help WAP testing efforts.
When thinking about converting HTML pages, it's worth considering that WML is designed for small screens, and is therefore not as visually rich as HTML. Any conversion will compromise a great deal of the HTML content and formatting, as well as any in-line scripting. Some simple HTML pages may be converted satisfactorily. Conversion can either be once-off using a package such as Spyglass Prism, or on-the-fly by a WAP gateway filter.
Plug-ins for Adobe Photoshop 5.x and PaintShop Pro which support the WBMP format are now available from RCP Distributed Systems. Both GINGCO and Teraflops offer developer tools for converting various types of images into the WBMP format.
WMLScript is a client side script language based on ECMA script. It is very much like JavaScript. WMLScript has been modified to fit the limitations of the WAP environment, and is in many ways limited compared to JavaScript.
No. Unlike the way in which you can embed JavaScript in HTML pages, WMLScript must be contained in a file separate from the WML that calls it.
For a primer and introduction to WMLScript, we recommend the WMLScript.com site. It contains good WMLScript info and even a WML Script Library.
This is likely to vary from one phone to another. However, as a guideline, you should aim to keep compiled pages under 1,400 bytes.
After
a WML deck has been downloaded to the WAP device, it lives in the WAP
device's memory for a certain period of time. Until this period has expired,
the deck will not be downloaded from the server but instead from the WAP
device memory. This is known as caching, and it obviously speeds things
up considerably. However, in some rare cases you might not want the deck
to be read from the cache memory but from the server. A typical case is
where you have a deck containing cards with information that gets updated
frequently. By adding some cache information to the HTTP header you send
out from the server, you can tell the WAP device that the following deck
should never be stored in the cache. Note that this requires that you
are able to produce HTTP headers on the server side, either using PHP,
ASP, Perl or some other type of server side scripting language. The lines
cannot be included in the deck code as they are HTTP header information,
not WML elements.
Those
of you who have some experience from the web environment will most likely
have used the <meta http-equiv="refresh" content="1;http://somewhere.com/">
tag to force a browser to load a new or the same page. Although some META
tags are supported in the WAP environment, a much better way of doing
the same thing in WML is to use the <ontimer> tag. The following piece
of code will force the browser to load another deck after a certain time.
For the example below, the deck will jump to another deck called nextdeck.wml.
Yes.
You can create WML in exactly the same way that you create HTML. If you
have written your ASP pages to produce WML, just remember to set the MIME
type correctly at the start of the page:
Yes. You can create WML in exactly the same way that you create HTML. If you have written your application pages to produce WML, just remember to set the MIME type correctly at the start of the output. The form will vary depending on the language in which you have written your application.
Yes. You can create WML in exactly the same way that you create HTML. If you have written your servlets to produce WML, just remember to set the MIME type correctly.
As for creating HTML pages, any relevant server-side technology can be used for creating dynamically-created WML pages. Examples include Active Server Pages (on IIS servers), CGI, and Java Servlets.
To
serve WML pages with ColdFusion, simply add
To
configure your server for WML, first FTP into your site and go into the
/www/conf/ directory. You then edit your httpd.conf file (make sure you
open the file in edit mode), adding 'index.wml' to the 'DIRECTORYINDEX'
line. Finally, you edit your mime.types file (make sure you open the file
in edit mode), adding these mime types to the bottom of the file:
|
|||||||||||||||||||||||||||||||||||||||||||
Copyright © 1998-2012. ammonet. All rights reserved.
|