Getting started in WAP technology (2)

xiaoxiao2021-03-06  186

Chapter II Mobile Simulation Development Environment

The so-called mobile phone simulation development environment is the use of various simulators to simulate the real environment of the mobile phone in the ordinary PC machine, thereby facilitating the development of the WAP website. The currently popular simulator has the following: First, Nokia Toolkit 1.2 / 1.3 can download this simulation development environment from this address: http://www.nokia.com Currently, the highest version of this WAP toolkit is 1.3beta, Nokia's development package is written in Java. So you first install JRE 2.2 or more before installation, JRE can download (http://www.sun.com) on Sun's homepage. The Nokia's development tool is an integrated environment that can be easily compiled for WML / WMLScript, and has a detailed WML / WMLScript development document, and users can load local WML files locally through the address bar, or browse the WAP above the Internet. Website; but Nokie Toolkit's operating conditions are more demanding. If your machine memory is less than 128 megabytes, then the speed of running will be greatly reduced, there is no way, the program written by Java is coming so, this is a little regret. 1.2 version of the version does not simulate the actual model, and the version 1.3 has the simulation environment of the analog product 7110. Second, Ericsson Wapide4 Ericsson Company launched a WAP development package, similar to Nokia's development package, Ericsson Company's tool is also an integrated development environment, more convenient, can be downloaded from this address: http://www.ericsson.com / WAP.

Compared to the WAP development tools of Nokia, Ericsson's development tools are relatively simple, and its development document is very small, but its running speed is much more faster than the development kit of Nokia, especially There is more than about 64 megabits. Third, UP. SDK 4.0 Phone. COM company's UP. The SDK products are not integrated with the two development tools than the above development tools. This development tool can be obtained at http://www.phone.com. From the above description, in these three popular WAP development tools, the most attractive is of course the Nokia's simulation simulation environment, graphical interfaces, and rich development documents, independently. In addition, there are some software that can browse WAP websites, such as WINWAP, WAPMAN, and more, they can directly browse the WAP website directly on the PC, it is worth mentioning that Opera has launched 4. The 0 version of the browser has supported it directly to access the WAP website directly, this compact browser feature is very strong. I believe that Microsoft will not sit down, and it is possible to add functions that support the WML file in subsequent versions of IE. The above WAP simulation development environment installation is relatively simple, and it can be seen in some English. Chapter III WML / WMLScript Design Now let's formally design our WAP site. As the current web site is based on HTML language, the WAP website is based on WML language, and the WML language is actually following the current XML technology, but you. If you don't understand XML, you can get started quickly.

The greatest difference between WML and past HTML languages ​​is that the WML language is very strict, and it is manifested in the following aspects: 1. All tags in WML, attributes are case-sensitive 2, for continuous spaces, WML compiler It will be considered to be a 3, all the attributes of all labels need to be enclosed in two quotes. 4, all tags must be closed, for labels that are not pairs, must be "/", such as "
" > "Be sure to pay attention to the above points, otherwise it is very likely that the mobile phone cannot browse WML. To do this, just the habit of habits, mainly our "lazy" habit of developing in the HTML era is not very good, all the compatibility of IE is too compatible, ^ _ ^ in WML, the most basic unit Called "Card", he was used to provide the user with an interactive interface. In fact, it is also designed to take care of the screen of the mobile phone, and the mobile phone's processing power is limited, it is impossible to use the IE we often use. Load the entire page, in use the scroll bar to view the content, the WML file designed for mobile phone, one maximum can not exceed 1.4K, so we will divide the large foliar as a number of CARDs, come once again; Multiple "card" constitutes a "decker", even if a "level", one level is allowed in a WML file, just like only one " " tag in HTML. Also remember, just want to display some text to the phone, you must use the "

" tab to enclose this paragraph. No longer Luo Wei, let's take a look at a simple example: HelloWorld = "Hello" title = "WAP">

Hello! World! This file is bought in the Nokia Simulation browser, you can see you to greet the WAP world. We can see that the annotation method in WAP is the same as HTML.

It is important to note that the ID attribute of each Card is not allowed, and in the default, the phone shows the first "card" of this "level", of course, we can also specify specific "cards to be browsed). ", We will mention later. How, look at this first example, I feel that WML is not very hard, it is more simple than HTML, but it's a little more, let's take a look at other useful tags in WML: label : Description: Define the start and end of "Level", a WML file only allows one level tag: Description: Define the start and end of "card", multiple cards "Make up a" level "ID attribute must be given to distinguish between different" card "Title attributes indicate prompt information tag:

description: Tag tag for displaying text:  Description: The alt property is used to specify the message when the image is not normal display, the SRC property specifies The image of the image is above two attributes that must be other properties similar to HTML language.

Tags: Description: Perform some actions, where the attribute type is required. TYPE Value Trigger Event Accept Trigger Confirm Delete Trigger Delete Help Trigger Help Options Trigger Select Prev Back Previous Page Reset Clear Current Status Tags: Description: After the user clicks the DO label, you can use this tag. Connect to other "card" or "level" to specify its "href" attribute. Tags: Description: Set the time of the timer, in 0.1 seconds, the same "card" can only have a Timer tag. The ONTIMER event label is triggered after the specific time is reached: Description: Similar to the same label tag:

转载请注明原文地址:https://www.9cbs.com/read-128084.html

New Post(0)