Flying Enet College
Section I: The potential of WAP
These days, we often hear about WAP technology, a technology of mobile internet. Technically, mobile phones are unlikely to compete with PCs, and the mobile phone screen can only accommodate
Few characters, its bandwidth is also very limited, and the input is very clumsy. Then why do I have to introduce it, hey, here are two main I think WAP must have
Factors of success.
Everywhere:
As long as you have a mobile phone, you can access the WAP site everywhere.
Billing Organization:
In the near future, we will be able to through our mobile phone to pay for all our expenses, query a lot of information. We just have one more charge on our phone.
Use "WAP service charge".
So we can use the mobile phone to pay for our merchandise costs, credit cards are not, it will be able to become a new way of spending.
Section II: WAP Basics
WAP (Wireless application Protocol) v1.1 is an open specification that attempts to standardize mobile phone access to information and services. This specification is made up of
WAP Forum to develop, a civil organization. The 1.2-version WAP protocol will be considered the last WAP specification.
The basic concept of WAP is the reuse of Internet protocols, which must make it clear that WAP services are easily invoked on existing technologies.
The WAP protocol utilizes a layered structure that resembles our computer network. The lower levels are not much like our common web apps, but the top floor is still our old friend----HTTP.
The data is sent from the server, received from the server, the information can be stored on the server, the call can be CGI, or other methods, such as ASP.
It means that as long as you are an ASP, you can easily write your first WAP application.
Of course, in terms of cell phone bandwidth and user capabilities, mobile phones need different (more stringent) devices, so under current conditions, HTML can not adapt to WAP
The bandwidth available.
The location of WAP Forum is WML (Wireless mark-up Language), an XML-formatted language. WML is thin HTML.
WAP Forum also specifies the WMLScript, much like JavaScript, which is used only for mobile phones, which can handle client-side programs.
Section III: WML
Although I have explained the phone to the server communication, but the real client is not a mobile phone. A software (WAP gateway) actually Yundang the role. It
Convert a phone request to an HTTP request and return the server's response to the phone, and the WML file is compiled into a binary file by the WAP gateway at this time. Although some
WAP Geteway can convert HTML directly to WML, but don't expect them to arbitrarily convert HTML to anything we can read on the phone.
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 phone's screen. Figure One WAP structure
WAP Emulator
In order to use WAP services, like our poor can not afford to buy a mobile phone, we need a WAP emulator. You can go to Nokia website to download a Nokia Toolkit
1.2, and you also have to install Java Virtual Machine 1.2.2, which can be downloaded from Sun Company for free, here is an example.
WML structure
A WML document is made up of plates, and a plate contains a lot of cards. In practice, you can think of a plate as a number of labels with names.
Html.
The mobile phone downloads a complete plate, but only one card can be displayed at a time. Browse through links to different places.
We're going to see a simple WML document, and you need to know some of the most 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.
</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 soft button on the left, you see the second card.