473,379 Members | 1,381 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,379 developers and data experts.

Intro to WML - WAP Basics #2

5,000 Expert 4TB
Originally posted on www.developer.com/ws/proto/article.php/1377381

By Steve Schafer
June 26, 2002

Edited by RedSon

Understanding Decks

WML pages are structured within "decks," allowing several pages ("cards") to be defined in each WML file. This deck analogy allows multiple pages to be delivered to the mobile client at the same time, minimizing the loading time between related pages. However, the limited memory on most devices constrains the deck size, usually to less than 1024 bytes. Therefore, careful consideration and planning should go into any WAP application; don't start coding without investing time in planning.

Note: Remember your audience. Mobile users generally scroll through cards rapidly and will be reading on a display that's a mere handful of characters wide (usually less than 20 characters) and usually less than 10 lines high. Keep your content to a minimum, provide an intuitive navigation structure, and optimize your decks to maximize links within the deck and minimize links outside of the deck.

Visualizing a physical "deck of cards" structure can help in understanding the principles of WML. For example, suppose we have three simple cards (pages).

These cards together form a deck and are delivered to the mobile device in one file. Now suppose that each card links to the next (card one links to card two, which links to card three, and so on), and that each card also has a "back" link to take the user back to the previous card. As the user navigates the deck, the cards stack in memory.

A developer accustomed to HTML might be tempted to implement the "back" feature by providing a link to the deck, specifying the previous card. However, this would cause the mobile device to re-request the whole deck before redisplaying the card-a card it already had in memory.

Instead, you should use the tag, which tells the browser to remove the current page and display the previous page in the history list (like using the Back button on a PC browser). Of course, the content of the previous page might need to be refreshed each time it's accessed; in that case, valid techniques could include recalling the whole deck or specifying that the page not be cached. Proper navigation will be covered in future articles.

The <prev> tag "pops" the top card off the stack (out of the history list), redisplaying the previous card in the history.

Setting Up Your Server for WML

To configure your Web server to deliver WML, you must define the related MIME types for WML content. Web servers and client browsers use MIME (Multipurpose Internet Mail Extensions) to communicate the type of data that is being sent. Before sending data, the server sends a MIME identifier to the client browser, identifying the format of the following data. The client browser can then properly decode and apply the data. Most WML applications require three MIME types, as listed in the following table.

Expand|Select|Wrap|Line Numbers
  1. File Extension     MIME Type Definition              Use
  2. .wml                   text/vnd.wap.wml                    WML source file
  3. .wmls                 text/vnd.wap.wmlscript            WML script file
  4. .wbmp                image/vnd.wap.wbmp              Wireless bitmap file (image)
To add MIME types to your Web server, you must have administrator access to the server. The following sections cover setting up Microsoft's Internet Information Server (IIS) and Apache for WML. If you're using another type of server, read your server's documentation for more information on adding MIME types.
Feb 27 '07 #1
0 7139

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Kamus of Kadizhar | last post by:
I'm looking for a good intro to python book. I'm very familiar with programming, but know nothing of OOP or systems (OS type) programming. All of my programming experience is in number crunching...
by: manish | last post by:
Hi, I am a fresher in the programming field i.e although I have done programming at the basic level but at professional level I am very new and I am facing many problems. These probllems are...
by: Alf P. Steinbach | last post by:
The third part of my attempted Correct C++ tutorial is now available, although for now only in Word format (use free Open Office if no Word), and also, it's not yet been extensively reviewed -- ...
by: Chad | last post by:
I'm in an intro to VB.net class. I'm haveing trouble with this assignment, if anyone could help me please let me know. thanks! Coding Assignment 7-Chapter 8 OOP-CSCI-171 Intro to VB.NET ...
by: Guy Middleton | last post by:
A friend want to learn C, and is already an experienced programmer -- she knows VB and Java, and some application-specific HLLs (e.g. ToolBook). Could somebody recommend an intro C text I could...
by: RedSon | last post by:
Originally published on www.developer.com/ws/proto/article.php/1377381 Edited by RedSon Learning WML - WAP Basics By Steve Schafer June 26, 2002 What Is WAP?
by: shapper | last post by:
Hello, When styling a DIV as follows: <div id="intro" class="Intro">Some intro text</div> Should I use a class: ..Intro {...} Or:
by: annabel59 | last post by:
I made a Flash intro for my website but when I open it in IE7 it gives error : expected object. It works fine in Mozilla. This is the code of the index.html file : <html> <head>...
by: babu8880 | last post by:
www.convensysglobal.com/elearn You can login and attend courses and similar resources ask your doubts from experienced engineers in iphone and Objective C Domain You can attend live classes...
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.