ASP technology in WAP (1)
Author:Eve Cole
Update Time:2009-05-30 19:54:49
Section 1: The potential of WAP
These days, we often hear about WAP technology, a technology for mobile Internet access. Technically speaking, it is impossible for mobile phones to compete with PCs. Mobile phone screens can only accommodate few characters, their bandwidth is very limited, and input is clumsy. So why do I still introduce it? Hehe, there are two main factors that I think WAP must have success.
Anywhere:
As long as you have a mobile phone, you can access WAP websites wherever you go.
Billing agency:
In the near future, we will be able to pay for all our expenses and query a lot of information through our mobile phones. It's just that there is another fee "WAP service fee" added to our mobile phone charges.
In this way, we can pay for our goods with mobile phones without using credit cards. It will definitely become a new way of consumption.
Section 2: WAP Basics
WAP (Wireless Application Protocol) v1.1 is an open specification that attempts to standardize mobile phone access to information and service industries. This specification is provided by
Developed by WAP Forum, a non-governmental organization. Version 1.2 of the WAP protocol will be considered the final WAP specification.
The most basic concept about WAP is to reuse the Internet protocol. This protocol must clearly call WAP services easily on existing technology.
The WAP protocol utilizes a layered structure much like our computer networks. The lower levels are not like our commonly used web applications, but the top level is still our old friend-HTTP.
Data is also sent and received from the server. The information can be stored on the server. The call may also use CGI or other methods, such as ASP. In other words, as long as you know ASP, you can easily You can easily write your first WAP application.
Of course, in terms of mobile phone bandwidth and user capabilities, mobile phones require different (more stringent) equipment, so under current conditions HTML cannot adapt to the bandwidth that WAP can provide.
The positioning of WAP Forum is WML (Wireless Mark-up Language), a language in xml format. WML is stripped down HTML.
The WAP Forum also specified WMLScript, which is much like JavaScript, but for mobile phones, and can handle client-side programs.
Section 3: WML
Although I have explained the communication between the phone and the server, the real client is not the phone. A piece of software (wap gateway) actually fulfills this role. It converts the mobile phone's request into an HTTP request, and also returns the server's response to the mobile phone. At this time, the WML file is compiled into a binary file by WAP GateWay. Although some
WAP geteway can convert HTML directly to WML, but don't expect them to arbitrarily convert HTML into something we can understand on our mobile phones.
Of course, the emulator does not need a WAP gateway to work. It will download the WML file directly from the server (or open WML directly on the local machine) and display it on the screen of the mobile phone. Figure 1 WAP structure
WAP emulator
In order to use WAP services, poor people like us who cannot afford a mobile phone need a wap emulator. You can go to the Nokia website to download a Nokia Toolkit
1.2, you also need to install Java Virtual Machine 1.2.2, which can be downloaded for free from SUN. Here is an example.
WML structure
A WML document is composed of sections, and a section contains many cards. In practice, you can think of a section as a collection of named tags
HTML.
Mobile downloads a complete section, but only one card can be displayed at a time. Browse different places through links.
We'll look at a simple WML document, and you'll need to know some basic XML.
<?xml version="1.0"?>
<!DOCTYPE WML PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<!-- root element -->
<card id="card1" title="Example 1">
<p> <!-- Cards can only support p and do blocks-->
<do type="accept" label="go to card 2">
<go href="#card2"/>
</do>
This is the first card.
</p>
</card>
<card id="card2" title="Example 1">
<p>
This is the second card.
</p>
</card>
</wml>
Once the phone receives the block, it displays the first card, and when you press the left soft key, you'll see the second card.