WAP is a protocol, just like HTTP (and most developers will spend as much time worrying about WAP as they do HTTP—in other words, not much at all). The truth is, WAP is pretty boring: It's a protocol, it works, and it facilitates data transfer.
Just as Web developers spend most of their time writing HTML, most of the action in WAP development is not at the WAP level; it's at the markup language used to create WAP applications. As WAP devices have special user interface requirements and restrictions, the use of HTML is not an option. For example,
WAP devices don't have pointing devices, so mouse-like interfaces are impossible.
WAP devices do not have full keyboards; they usually have simple phone keypads along with some extra keys.
WAP device screens are small. They can't support frames, complex tables, large graphics, and sophisticated color and font control.
WAP devices have no real multimedia, sound, or video support.
Knowing all these limitations and restrictions, could you even consider writing applications in HTML? Obviously wireless devices have special needs, and so a special markup language was created for WAP—WML, the Wireless Markup Language.
As an XML-based language loosely derived from HTML, WML is tag based and uses familiar tag pairs and attributes for all language features. WML uses many of HTML's tags (<p>, <table>, and <em> to name a few), but WML is not as extensive as HTML, and many of the tags that are included behave differently and have different attributes.
As WML is tag based and based on HTML, it is easy to learn and use (although it is far stricter in syntax and usage than is HTML). WML features support for
Cards (WAP pages) and decks of cards (sets of WAP pages in a single file) containing formatted text (covered in Chapter 3, "Writing for WAP in WML," and Chapter 4, "Card Navigation")
Images (in special formats, as will be discussed in Chapter 6, "Using Images")
Data entry (discussed in Chapter 7, "Working with User Input")
▸ WML is covered extensively in this book, starting with Chapter 2, "Introducing WML," and Chapter 3, "Writing for WAP in WML."
WML is complemented by a client-side scripting language called WMLScript (just like HTML is complemented by client-side JavaScript). WMLScript is far simpler in scope than JavaScript, but it does provide basic programmability that you can use to perform basic text and data manipulation.
▸ WMLScript is covered in Chapter 9, "Using WMLScript."
To help understand all the pieces in the WAP puzzle and what they mean, Table 1.3 compares WAP technology and features with their familiar Web counterparts.
Feature | Web | WAP |
---|---|---|
Transport | HTTP | WAP |
Markup | HTML | WML |
Scripting | JavaScript | WMLScript |
Note
For some reason, perhaps because it is easier to pronounce than WML, people refer to all wireless development as "WAP" (when they are usually talking about WML). When you hear WAP, remember that WAP is a transport, and what most developers concern themselves with is WML (and WMLScript).
3.17.68.14