wireless application protocol wapricci/ms/slides-2009-2010/11-wap.pdfwap - wireless application...
TRANSCRIPT
Content
Web and mobility
Problems of HTML in the mobile context
Wap 1.x
Motivations
Features
Architecture
Examples of WML (Wireless Markup Language) pages
Wap 2.0 XHTML MP
Examples
Differences with Wap 1.x
World Wide Web and mobility
Protocol (HTTP, Hypertext Transfer Protocol) and language (HTML, Hypertext Markup Language) of the Web have not been designed for mobile applications and mobile devices, thus creating many problems!Typical transfer sizes
HTTP request: 100-350 byteresponses avg. <10 kbyte, header 160 byte, GIF 4.1kByte, JPEG 12.8 kbyte, HTML 5.6 kbytebut also many large files that cannot be ignored
The Web is not a file systemWeb pages are not simple files to downloadstatic and dynamic content, interaction with servers via forms, content transformation, push technologies etc.many hyperlinks, automatic loading and reloading, redirecting a single click might have big consequences!
HTML and mobile devices
HTMLdesigned for computers with “high” performance, color high-resolution display, mouse, hard disktypically, web pages optimized for design, not for communication
Mobile devicesoften only small, low-resolution displays, very limited input interfaces (small touch-pads, soft-keyboards)
Additional “features”animated GIF, Java AWT, Frames, ActiveX Controls, Shockwave, movie clips, audio, ...many web pages assume true color, multimedia support, high-resolution and many plug-ins
Web pages ignore the heterogeneity of end-systems!e.g., without additional mechanisms, large high-resolution pictures would be transferred to a mobile phone with a low-resolution display causing high costs.
HTTP 1.0 and mobility
Characteristicsstateless, client/server, request/responseneeds a connection oriented protocol (TCP), one connection per request (some enhancements in HTTP 1.1)primitive caching and security
Problemsdesigned for large bandwidth (compared to wireless access) and low delaybig and redundant protocol headers (readable for humans, stateless, therefore big headers in ASCII)uncompressed content transferusing TCP
huge overhead per request (3-way-handshake) compared with the content, e.g., of a GET requestslow-start problematic
DNS lookup by client causes additional traffic.
WAP Programming Model
Aligned with the Web Programming Model, uses the Pull Model
Add telephony support with WTA (Wireless Telephony Application) and enabling a Push Model, where a server can proactively send content to the client.
WAP optional Proxy Model
In WAP1.* (1998-2000) a WAP proxy (in the middle) was used (still required for push)
WAP - Wireless Application Protocol
Goalsdeliver Internet content and enhanced services to mobile devices and users (mobile phones, PDAs)independence from wireless network standardsopen for everyone to participate, protocol specifications will be proposed to standardization bodiesapplications should scale well beyond current transport media and device types and should also be applicable to future developments
Platformse.g., GSM (900, 1800, 1900), CDMA IS-95, TDMA IS-136, 3rd generation systems (IMT-2000, UMTS, W-CDMA, cdma2000 1x EV-DO, …)
Forumwas: WAP Forum, co-founded by Ericsson, Motorola, Nokia, Unwired Planet, further information www.wapforum.orgnow: Open Mobile Alliance www.openmobilealliance.org(Open Mobile Architecture + WAP Forum + SyncML + …)
WAP - scope of standardization
Browser
“micro browser”, similar to existing, well-known browsers in the Internet
Script language
similar to Java script, adapted to the mobile environment
WTA/WTAI
Wireless Telephony Application (Interface): access to all telephone functions
Content formats
e.g., business cards (vCard), calendar events (vCalender)
Protocol layers
transport layer, security layer, session layer etc.
WAP Push
This service allows content to be sent or "pushed" to devices by server-based applications via a Push Proxy
WAP Push messages are specially formatted SMS messages that display an alert message to the user, and give the user the option of connecting directly to a particular URL via the mobile phone's WAP browser
Push functionality is especially relevant to real-time applications – e.g. that send notifications as messaging, stock price and traffic update alerts
Without push, these applications would require the devices to poll application servers for new information or status
In wireless environments such polling activities would constitute inefficient and wasteful use of the resources of wireless networks.
WAP 1.x - reference model and protocols
Bearers (GSM, CDPD, ...)
Security Layer (WTLS)
Session Layer (WSP)
Application Layer (WAE)
Transport Layer (WDP)TCP/IP,UDP/IP,media
SSL/TLS
HTML, Java
HTTP
Internet WAP
WAE comprises WML (Wireless Markup Language), WML Script, WTAI etc.
Transaction Layer (WTP)
additional services and applications
WCMP
A-SAP
S-SAP
TR-SAP
SEC-SAP
T-SAP
WAP - network elements
wireless networkfixed network
WAPproxy
WTAserver
filter/WAPproxyweb
server
filter
PSTN
Internet
Binary WML: binary file format for clients
Binary WML
Binary WML
Binary WML
HTML
HTML
HTML WML
WMLHTML
WAE - Wireless Application Environment
Goalsnetwork independent application environment for low-bandwidth, wireless devicesintegrated Internet/WWW programming model with high interoperability
Requirementsdevice and network independent, international supportmanufacturers can determine look-and-feel, user interfaceconsiderations of slow links, limited memory, low computing power, small display, simple user interface (compared to desktop computers)
Componentsarchitecture: application model, browser, gateway, serverWML: XML-Syntax, based on card stacks, variables, ...WMLScript: procedural, loops, conditions, ... (similar to JavaScript)WTA: telephone services, such as call control, text messages, phone book, ... (accessible from WML/WMLScript)content formats: vCard, vCalendar, Wireless Bitmap, WML, ...
Wireless Markup Language (WML)
WML follows deck and card metaphor
WML document consists of many cards, cards are grouped to decks
a deck is similar to an HTML page, unit of content transmission
WML describes only intent of interaction in an abstract manner
presentation depends on device capabilities
Features
text and images
user interaction
navigation
context management
Hello World (WML)<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="card1" title="WML Tutorial">
<p>Hello World</p>
</card>
<card id="card2" title="WML Tutorial">
<p>Welcome to the world of WML</p>
</card>
</wml>
http://www.developershome.com/examples/wap/wml/helloWorldEg1.wml
Fonts
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<wml><card id="card1" title="Font Style">
<p><b>Bold</b><br/><i>Italic</i><br/><u>Underline</u><br/><small>Small</small><br/><big>Big</big><br/><em>Emphasis</em><br/><strong>Strong</strong>
</p></card>
</wml> http://www.developershome.com/examples/wap/wml/fontStyleEg1.wml
Tables
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<wml><card id="page1" title="Table in WML"><p><table columns="3"><tr><td>Cell A</td><td>Cell B</td><td>Cell C</td>
</tr>
<tr><td>Cell D</td><td>Cell E</td><td>Cell F</td>
</tr></table>
</p></card>
</wml> http://www.developershome.com/examples/wap/wml/tablesEg1.wml
Links
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd"><wml>
<card id="tutorial_tc" title="WML Tutorial"><p>
Hello, welcome to our WML tutorial.<br/><br/>Table of Contents:<br/><anchor>
<go href="linksEg2.wml#tutorial_ch1"/>Chapter 1: WML Introduction
</anchor><br/><anchor>
<go href="linksEg2.wml#tutorial_ch2"/>Chapter 2: WML Deck and Card
</anchor><br/><anchor>
<go href="linksEg2.wml#tutorial_ch3"/>Chapter 3: WML Document Structure
</anchor><br/><anchor>
<go href="linksEg2.wml#tutorial_ch4"/>Chapter 4: WML Generic Metadata
</anchor><br/></p>
</card></wml>
http://www.developershome.com/examples/wap/wml/linksEg1.wml
wml page/deck
wml card
Going to a Card in the Deck
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd"><wml>
<card id="tutorial_ch1" title="WML Tutorial Ch1"><p>
<em>Chapter 1: WML Introduction</em><br/><br/>...<br/><br/><anchor>
<go href="#tutorial_ch2"/>Next chapter: WML Deck and Card
</anchor></p>
</card>
…
<card id="tutorial_ch4" title="WML Tutorial Ch4"><p>
<em>Chapter 4: WML Generic Metadata</em><br/><br/>...<br/><br/><anchor>
<go href="#tutorial_ch1"/>Back to chapter 1: WML Introduction
</anchor></p>
</card></wml>
Input
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="card1" title="WML Input Fields">
<p>
Hello, welcome to our WML tutorial.<br/>
What's your name?
<input name="myname" maxlength="16"/>
</p>
</card>
</wml>
Events and Variables
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml><card id="card1" title="WML Variable"><onevent type="onenterforward"><refresh><setvar name="var1" value="variable 1"/>
</refresh></onevent><p>
What's your name?<input name="name" maxlength="16"/><br/>
Which part of our WML tutorial do you like?<select name="tutorial_part"><option value="Part 1">Part 1</option><option value="Part 2">Part 2</option><option value="Part 3">Part 3</option>
</select><br/><br/>
<a href="#card2">Next Card</a></p>
</card>
<card id="card2" title="WML Variable"><p>Your name is $(name).<br/><br/>You like $(tutorial_part) of our WML tutorial.<br/><br/>The value of var1 is <i>$(var1)</i>.
</p></card>
</wml>
Variable declaration and initialization
Variable assignment
Variable declaration
WMLScript
Complement to WMLProvides general scripting capabilitiesFeatures
validity check of user inputcheck input before sent to server
access to device facilitieshardware and software (phone call, address book etc.)
local user interactioninteraction without round-trip delay
extensions to the device softwareconfigure device, download new functionality after deployment
WMLScript - example
function pizza_test(pizza_type) {
var taste = "unknown";
if (pizza_type = "Margherita") {
taste = "well... ";
}
else {
if (pizza_type = "Vulcano") {
taste = "quite hot";
};
};
return taste;
};
Wireless Telephony Application (WTA)
Collection of telephony specific extensionsExtension of basic WAE application model
content pushserver can push content to the client
handling of network eventsclient side there is a table indicating how to react on certain events from the network
access to telephony functionsany application on the client may access telephony functions
Examplecalling a number (WML)wtai://wp/mc;07216086415
calling a number (WMLScript)WTAPublic.makeCall("07216086415");
WTAI - example with WML only<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml"><wml>
<card id="card_one" title="Tele voting"><do type="accept">
<go href="#card_two"/></do><p> Please choose your candidate! </p>
</card><card id="card_two" title="Your selection">
<do type="accept"><go href="wtai://wp/mc;$dialno"/>
</do><p> Your selection:<select name="dialno">
<option value="01376685">Mickey</option><option value="01376686">Donald</option><option value="01376687">Pluto</option>
</select></p>
</card></wml>
associate to the "accept" button the action to go to href="#card_two"
associate to the "accept" button the action to dial dialno
The mapping between a <do> element and a user interface element depends on the actual wireless device.Often associated to softkeys or items in the options menu that is brought up by pressing a softkey.
WAP 2.0 (July 2001)
XHTML MP (XHTML Mobile Profile) is the markup language of WAP 2.0. XHTML MP is a subset of XHTML (XHTML Basic + specific add-ons)
In addition to the WAP stack, adds a stack based on common Internet stack based on TCP, TLS and HTTP (with „Wireless Profile“)
New applications
Color graphics
Animation
Large file download
Location based services
Synchronization with PIMs
Pop-up/context sensitive menus
Goal: integration of WWW, Internet, WAP, i-mode
Hello World in WAP 2
<?xml version="1.0"?><!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>XHTML MP Tutorial</title>
</head>
<body><p>Hello world. Welcome to our
XHTML MP tutorial.</p></body>
</html>
http://www.developershome.com/examples/wap/xhtmlmp/helloWorldEg1.xhtml
Advantages of WAP 2
If you are familiar with web technologies such as HTML, XHTML, and CSS, you can start developing your WAP site almost immediatelyThe same development tools can be used to develop both web sites and WAP sitesOrdinary web browsers can be used to view your WAP site during the development processHTML / XHTML pages on your web site can be converted to XHTML MP documents with minor changes or even without any changesXHTML MP supports WAP CSS, which enables the separation of content and presentation in different filesWith XHTML MP and WAP CSS, you have more control over the presentation: e.g., you can control borders, backgrounds, margins, padding, font sizes, font families and font colours.
WAP 2.0 Enhancements
User Agent Profile (UAProf) – This service provides a mechanism for describing the capabilities of clients and the preferences of users to an application server
Based on the Composite Capabilities / Preference Profiles (CC/PP) work of the W3C, UAProf supports the client-server transaction model by sending client and user information to servers with the request
This information permits the servers to adapt their content accordingly in preparation for the response
Recognizing the importance of user's privacy, personal information submitted in these requests may be controlled by the user
Data Synchronization – The SyncML messages are supported over both the WSP (Wireless Session Protocol) and HTTP/1.1 protocols.
UAProf
UAProf (User agent profile) is an XML document that contains information about the user agent type and device capabilitiesUser agent profiles are stored in a server called the profile repository (often maintained by a mobile device manufacturer)The URL that points to the user agent profile of a mobile device can be foundin the headers of requests sent by the mobile device: x-wap-profileheader
Example, the UAProf of Nokia N95 8Giga:
http://nds.nokia.com/uaprof/NN95_8GB-1r100.xml
WML Features Lost in XHTML MP
XHTML MP does not support decks and cards
XHTML MP does not support timers
XHTML MP does not support events
XHTML MP does not support variables
XHTML MP does not support client-side scripting
XHTML MP does not support programmable softkeys
XHTML MP does not support the format attribute for input fields (to restrict the input type)
XHTML MP does not support posting of data with anchor links (it uses forms)
http://www.developershome.com/