XML and Wireless Technologies: WML
- XML and Wireless Technologies
- WML2 in Details
- Future Wireless Directions
- Additional Resources
In this chapter
XML and Wireless Technologies
WML2 in Details
Future Wireless Directions
XML and Wireless Technologies
It took just a few years for XML to penetrate just about everywhere in the Internet. But the triumph of XML has continued even after thatto wireless technologies.
Need for Wireless Web
Users have long been able to receive messages on mobile devices. It makes sense that devices made for communicating would someday be extended to interact with the World Wide Web. Mobile solutions needed a lightweight markup language that can be used within a small device with limited computational resources, such as a mobile phone to access resources made available through the Wireless Application Protocol (WAP).
It is very tempting to be able to do almost everything you can do with the Internet using your cell phone. Cell phones are now part of our everyday life. At the same time, the need for constant access to the information and services of the Internet has become so strong that the Internet was finally opened to cell phones and other devices through the Wireless Web.
Mobile Commerce and WAP
Since the introduction of wireless access to the Internet, various e-commerce service providers have looked at cell phones as one more means of performing online transactions and started introducing m-commerce (mobile-commerce) services.
For customers, m-commerce services are attractive because the only thing you must have to be able to shop online is a WAP-enabled cell phone. Since introduction of m-commerce services, WAP phones have become more than just e-mail clients and micro browsers.
To name just a few, typical m-commerce applications of the Wireless Web could be
Ordering theatre tickets
Feeding a parking meter
Paying your electric bill
Obtaining stock quotes
And many, many more
Wireless Web and WAP
Just as the Internet would be impossible without HTTP, the Wireless Web requires some special protocol for transferring data. The HTTP is a monster for wireless applications because of the hardware limitations. That is why the Wireless Application Protocol has been developed by the WAP Forum. Like HTTP, WAP provides the means for wireless devices to communicate with other devices or servers. However, it generally isn't necessary to understand how the Wireless Application Protocol works to develop applications for mobile devices. Most developers will work within the Wireless Application Environment (WAE), which provides the user environment for interacting with applications and the set of tools that developers use to build them. An important part of the WAE is the markup languages, XHTML Mobile Profile (XHTMLMP) and Wireless Markup Language (WML).
WML: Simplicity and Power
WML is analogous to and is based on HTML: The only difference is that WML has been specially adopted for mobile devices. It's simple for parsing by the software that can be fit into a small device with limited computational resources.
50000 Feet View on WML
WML is an XML-based markup language designed specially for mobile devices as a result of the joined efforts of the WAP Forum (founded by Nokia, Phone.com, Motorola, and Ericsson) and the W3C Consortium.
In this chapter, we discuss WML version 2.0 (WML2), which became an approved specification in January 2002. The WML2 is based on an entire family of technologies and specifications, such as
WML 1.3 A markup language optimized for mobile devices
XHTML Basic An XML based descendant of HTML4
CSSMP CSS Mobile Profile
Why Not HTML?
HTML, which is so good for the World Wide Web, is not suitable for wireless applications for one very simple reason. It was not designed with any mobile applications in mind. The differences between the hardware on which HTML pages are usually accessed and mobile devices are so huge that there is no way to use either HTML as a wireless markup protocol or HTTP as a data transfer protocol in mobile devices.
Here are just a few reasons why HTML is not suitable:
Memory of mobile devices is extremely low. Not only will the HTML parser not fit into the memory of most mobile devices, but also loading an HTML page could be problematic.
Most cell phones can display just a few lines and simple icons on screen. Most HTML pages simply cannot be displayed on a mobile device.
There is no 101-key keyboard or mouse, just a numeric keypad. Navigating lengthy HTML pages could be extremely difficult.