WAP Development with WML (Wireless Markup Language)
- What Is A Markup Language?
- WML Terminology
- WML Syntax
- WAP Design Considerations
- Programming Considerations
- Creating the WML Deck
- Summary
In the last chapter, you looked at the tools needed to create WAP applications. In this chapter, you'll use these tools to begin developing WAP applications. In the process, you'll become familiar with the Wireless Markup Language (WML), which is the language you'll use in all your WAP development efforts.
If you're familiar with other markup languages, you'll find WML incorporates many of the features of these other languages. However, if you're new to markup languages, working through the next couple of chapters will get you up to speed quickly.
By the end of this chapter, you'll be familiar with the following:
Where WML came from, what it's about, and how you'll use it within your WAP applications
What WML can and can't do, and some of the similarities and differences between WML and other markup languages, such as HTML
The WML structure and syntax, which help you produce efficient code
The essential WML elements and attributes used with all WAP applications
What Is a Markup Language?
The goal of markup languages is to present information across many different systems. Most Web development languages today use markup languages in some fashion. With markup languages, text, tables, images, and user navigation display in a consistent manner. The type of platform that receives the information does not matter.
WML is a markup language and, like other markup languages, it works on several platforms. WML is also compact, working quickly and efficiently. These attributes make WML a perfect language for WAP development.
The WAP Forum (http://www.wapforum.org) originally developed the WML language. Chapter 1, "What Is WAP Development?" discussed the WAP Forum and their contributions to WAP technology and wireless development.
If you're familiar with other areas of Web development, you might find several similarities between HTML (the markup language used through Web development) and WML (the markup language used throughout WAP development). Table 3.1 details some of the similarities and differences between HTML and WML.
If you've never looked at HTML or WML before, don't worry about this table. By the time you're finished with this book, you'll have a thorough understanding of the information in Table 3.1.
Table 3.1 Similarities Between HTML and WML
Feature |
HTML |
WML |
Example |
Opening and closing tags |
√ |
√ |
<wml>...</wml> |
Self-closing tags |
√ |
√ |
<br/> |
Attributes |
√ |
√ |
<card id="Card1"> |
Nesting elements |
√ |
√ |
<wml> <card> </card> </wml> |
White space |
√ |
√ |
-<wml> <card> |
Images |
√ |
√ (WBMP format only) |
<wml> <card> <img> </img> </card> </wml> |
Nested tables |
√ |
|
<table> <tr> <td> <table> <tr> <td> </td> </tr> </table> </td> </tr> </table> |
Heading levels |
√ |
|
<html> <body> <h1>Heading 1</h1> </body> </html> |
Nested scripting languages |
√ |
|
<html> <body> <language = "vbscript"> </body> </html> |