WAP Development with WML and WMLScript

WAP Development with WML and WMLScript

by Ben Forta, Ronan Mandel, Amy O'Leary
     
 
  • WAP has captured the attention of industry professionals, trade press, and Wall Street for its ability to support wireless devices and platforms
  • Developing applications for WAP requires a thorough understanding of WAP and its markup language, WML
  • Written by the developers of some of the very first WAP applications created
  • Contains instructions

Overview

  • WAP has captured the attention of industry professionals, trade press, and Wall Street for its ability to support wireless devices and platforms
  • Developing applications for WAP requires a thorough understanding of WAP and its markup language, WML
  • Written by the developers of some of the very first WAP applications created
  • Contains instructions for generating WAP content in all major languages, including ColdFusion, ASP, Perl, Java, and JSP

Editorial Reviews

bn.com
A practical, hands-on guide for every web developer who wants to wireless-enable a web site -- now or down the road. WAP fundamentals and nuances, scripting with WMLScript, security, alerts, writing for HTML and WML concurrently, porting HTML code to WML, and more -- including a full chapter on "best practices" for wireless web developers. The highlight: complete walkthroughs of four complete wireless web applications.

Product Details

ISBN-13:
9780672319464
Publisher:
Sams
Publication date:
09/22/2000
Series:
Sams Professional Series
Edition description:
Book and CD-Rom
Pages:
586
Product dimensions:
7.28(w) x 9.00(h) x 1.48(d)

Read an Excerpt


Chapter 2: Introducing WML

This chapter introduces Wireless Markup Language (WML) by discussing its origins, functionality, and similarity to other common programming languages you may already know. This chapter also helps you get started developing your own WML code by showing you how to configure your Web server for WML content and how to view that content with several common devices and device emulators. Finally, we'll show you how to determine what kinds of applications are relevant to the special capabilities of WML, while covering basic development concepts, such as syntax and WML's particular card and deck structure.

What Is WML?

Wireless Markup Language (WML) is a markup language used for describing the structure of documents to be delivered to wireless devices. WML is to wireless browsers as HTML is to a browser on a desktop computer. WML was created to address the display, bandwidth, and memory limitations of mobile and wireless devices, such as cellular phones and wireless handheld computers. Because it was designed to run on a variety of devices, WML assumes very little about the device running the application and provides much less control over output formats than you might be used to with HTML.

WML's Origins

In the early 1990s, Unwired Planet created HDML (Handheld Device Markup Language) to serve as the development standard for wireless applications. By June 1997, Unwired Planet had changed its name to Phone.com and, along with Nokia, Motorola, and Ericsson, launched the WAP Forum-a nonprofit organization dedicated to the development and proliferation of a single standard protocol for wireless applications. Using Phone.com's HDML as the basis for its own standard markup language, the forum created and distributed WML-a language different from, but in many respects similar to, HDML. The WAP Forum and detailed specifications for WML can be found on the Web at http: / /www.wapforum.org/.

Although WML will certainly look familiar to Web developers accustomed to HTML, the two languages are really more like cousins than brothers. SGML (Standardized Generalized Markup Language) can really be thought of as the father of both HTML and XML (Extensible Markup Language). HTML is designed to handle a lot of objects, pictures, and other multimedia, which makes it too bulky for the bandwidth limitations of current mobile devices; therefore, HTML was rejected as the basis for WML, which needs a simple architecture that structures data to aid the parsing of a document. That need, and the desire for a language that would survive the demands and fluctuations of turbulent standardization discussions, was the reason that WML was based on XML. By using XML as a base, WML was designed to be a lightweight protocol that would meet bandwidth limitations of existing mobile devices.

WML's Functionality

WML supports six key areas: Text presentation and layout-Although specific devices and WML browsers vary in their output of WML code (very much like output differences between Netscape Navigator and Internet Explorer), line breaks, text formatting, and alignment are all supported by WML.

Images-Although WAP-compliant devices are not required to support images, WML supports the Wireless Bitmap (WBMP) image format and image alignment on the screen. Wireless Bitmap is a graphic format created by the WAP Forum which is optimized for mobile devices.

For more on using images in WML, see Chapter 6, "Using Images." User input-WML supports choice lists, multilevel choice lists, text entry, and task controls.

Card and deck organization-User interactions are divided into cards, and navigation occurs between cards. Decks are related sets of cards which constitute a single tile, like a single HTML file. In HTML, viewing one page is akin to viewing one card in WML. However, instead of each HTML page constituting one HTML file, multiple WML cards constitute one WML deck, which is then saved as a single file. Navigation-WAP supports the standard Internet URL naming scheme and anchored links, allowing navigation between cards in a deck, between decks, or between other resources on the network.

State and context management-To maximize network resources, WAP allows for variables to be passed between WML files. Instead of sending a complete string, variables can be sent and substituted at runtime. The user agent can cache both variables and WML files, minimizing cache hits and server requests. It is also possible to pass variables between different cards in the same deck; this is an important way to minimize network usage.

Similarity to HTML and XML

If you are already familiar with HTML, SGML, or XML, you should recognize WML syntax, which is based on XML but is more formally defined than a general XML application...

Meet the Author


Ben Forta is a member of WAP Forum, the organization that maintains the WAP/WML specification. He is a recognized authority on Web development and is a frequent lecturer and I columnist. Ben is Allaire Corporation's Product Evangelist and the author of several bestselling books on Internet and application development.

Keith Lauver and Robert M. Juncker are from Minneapolisbased Gearworks, a consulting and development firm that specializes in WAP development.

Paul Fonte is a published author and accomplished developer, who wrote one of the very first phone-based calendaring products.

Ronan Mandel is Phone.com's Lead Developer Engineer. He lectures frequently on WAP-related topics.

Dylan Bromby is Director of Wireless Strategy for Got Systems Inc., a location-based directory and information services provider. Got is also a member of the WAP Forum.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >