WML programming for AD
Editor's Note: Each month, this column discusses various aspects of the advanced administration of e-business sites. This month's column examines WAP and WMLspecifically, how to host wireless applications on your IIS Web site.
The Internet is going wireless. Wireless technology has become crucial for transmitting and receiving up-to-the-minute information. Wireless Application Protocol (WAP) is one of the simplest implementations of wireless technologies; it's a standard for linking WAP devices to the Internet. WAP devices, such as cellular phones, Research In Motion (RIM) email devices, and pagers, have small screens that display as few as five lines of text, each line with approximately 10 characters. WAP uses Wireless Markup Language (WML), which is similar to HTML but doesn't require the use of a keyboard or mouse.
WAP devices use a WAP gateway to translate WML data into HTML data and relay the HTML data to the Web server. The server sends the information back to the WAP gateway, which converts it to WML so that the WAP device can understand it, as Figure 1, page 2, shows. How do you implement a WAP gateway? Commercially available gateways, such as the Nokia gateway, exist that let developers test and deploy customized WAP applications and services.
However, you don't need to install a private gateway, which would take a lot of time, money, and effort. Instead, you can use a WAP gateway that is available through wireless network operators, such as Sprint PCS, whose services you usually subscribe to when you buy a wireless device. A variety of WAP tools are also available that let you test your WAP applications in local mode.
WML is mainly a text-based language that uses tags. However, unlike HTML, WML has strict syntax rules because the content is compiled into a binary form when you transmit the data over the wireless network. (See Related Reading, page 5, for resources about WML, WAP, and Microsoft Active DirectoryAD.) A WML document consists of a deck, which contains a series of sections called cards. Each card holds the data for one screen in a WAP browser, as Figure 2, page 2, shows. (Note that the size of a WML deck is limited. Some phones can't display a deck larger than 1.4KB.)
Changing MIME Types for IIS
You can store WML pages on your Web site; IIS can interpret these pages when you configure a few WAP MIME types. MIME types specify the format of the data sent over the Internet so the Web server can recognize and correctly process that data. To configure MIME types in IIS 5.0, follow these steps:
- Choose Start, Programs, Administrative Tools, Internet Services Manager.
- Right-click the machine name in the Internet Information Services folder, and select Properties.
- On the Internet Information Services tab under Computer MIME Map, click Edit, as Figure 3, page 2, shows.
- On the File Type dialog box, click New Type.
- On the File Type dialog box, which Figure 4 shows, enter the information in Table 1.
After you configure your WAP site and MIME types in IIS, place your WML documents in your WAP site IIS document tree, where you can access them through a WAP device or WAP emulator.
Wireless Tools
If you don't have a WAP device, don't worry. WAP emulators and software development kits (SDKs) are available that let you write, preview, and test your WAP applications from a desktop PC, simulating all aspects of a WAP device. Phone.com provides a free SDK called UP.SDK (really just a WAP emulator) that lets developers create WAP applications and includes several emulators for different types of phones.
In addition, WAP emulators are powerful tools for debugging because you can view source, which is unavailable on an actual WAP device.
You can install Phone.com's UP.SDK from the upsdkw40e.exe file, which you can download from http://www.phone.com. When you've installed the SDK, start UP.Simulator by choosing Start, Programs, UP.SDK 4.0, UP.Simulator. The simulator displays the phone emulator and a Phone Information window, which Figure 5 shows, that provides detailed error messages when there is invalid WML code. To test your WAP site, type the site's URL in the Go text box of the UP.Simulator dialog box.
The Business Case for the Employee White Pages WAP Application
Directory Services (DSs) such as AD are perfect for storing user data that needs to be available enterprisewide (e.g., email addresses, phone numbers). We wrote a WAP application called Employee White Pages that lets our employees browse the company employee list, select an employee, and email or directly dial that employee's cell phone right from their WAP device. AD dynamically derives the data.
The UI is crucial because WAP devices have so little screen real estate. We designed the opening UI of the Employee White Pages WAP application to list company employees in two waysA through L and M through Z. The company has only 30 employees, so scrolling 15 names is effective in our case. If you work at a large company such as Microsoft, you won't want to list the 30,000 employees that represent A through L. You want to implement a simple search that restricts the amount of data returned to the device. Because a WAP device has limited input capabilities (i.e., the lack of a keyboard), you need to consider carefully how users will enter the search criteria.
You can download the five Active Server Pages (ASP) pages that make up the Employee White Pages WAP application (select_employees.asp, employees.asp, email.asp, call.asp, and do_email.asp) from the SQL Server Magazine Web site (http://www.sqlmag.com). To use the application, you need to populate the Email Address and Mobile Phone Number attributes in AD, which you can do in the Microsoft Management Console (MMC) Active Directory Users and Computers snap-in.
Prev. page  
[1]
2
3
next page