wap and wml. wap wap = wireless application protocol 웹을 통해서 무선 어플리케이션을...

66
WAP and WML WAP and WML

Upload: rosanna-evans

Post on 28-Dec-2015

230 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WAP and WML WAP and WML

Page 2: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WAPWAP

• WAP = Wireless Application Protocol

• 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Page 3: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WAPWAP 에 대한 요구에 대한 요구

• Wireless networks and phones – have specific needs and requirements

– not addressed by existing Internet technologies

• WAP enables any data transport – TCP/IP, UDP/IP, GUTS (IS-135/6), SMS, or USSD

• The WAP architecture – several modular entities

– together form a fully compliant Internet entity

– all WML content is accessed via HTTP 1.1 requests

Page 4: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WAP WAP 의 이점의 이점

• 표준 XML 기술을 이용• Content 와 airlink 프로토콜사이 최적화• The WML UI components map well onto

existing mobile phone user interfaces– no re-education of the end-users– leveraging market penetration of mobile

devices

• WAP 은 HTTP SERVER1.0 표준을 따름 .– CGI, ASP, JAVA, Servlets, etc.

Page 5: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

The Specification Includes The Specification Includes

• WAP Architecture

• Wireless Application 환경• 프로토콜 Layers

• 운영 / 이용• 보안

Page 6: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WAP ArchitectureWAP Architecture

Web Server

Content

CGIScripts

etc.

WM

L D

ecks

wit

h W

ML

-Scr

ipt

WAP GatewayWML Encoder

WMLScriptCompiler

Protocol Adapters

Client

WML

WML-Script

WTAI

Etc.

HTTPWSP/WTP

인터넷 액세스기능WML 1.0 버전시 인터넷접속을

하기 위한 게이트웨이가필요

cf) WML2.0

Page 7: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Internet vs. WAPInternet vs. WAP

Internet

HTMLJavaScript

HTTP

TLS - SSL

TCP/IPUDP/IP

SMS USSD CSD IS-136 CDMA CDPD PDC-P Etc..

Bearers:

Wireless Application Protocol

Wireless ApplicationEnvironment (WAE)

Session Layer (WSP)

Security Layer (WTLS)

Transport Layer (WDP)

Transaction Layer (WTP)

Other Services andApplications

Page 8: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Big Pipe - Small Pipe Syndrome

Wireless network<HTML><HEAD><TITLE>NNN Interactive</TITLE><META HTTP-EQUIV="Refresh" CONTENT="1800, URL=/index.html"></HEAD><BODY BGCOLOR="#FFFFFF" BACKGROUND="/images/9607/bgbar5.gif" LINK="#0A3990" ALINK="#FF0000" VLINK="#FF0000" TEXT="000000" ONLOAD="if(parent.frames.length!=0)top.location='http://nnn.com';"> <A NAME="#top"></A><TABLE WIDTH=599 BORDER="0"><TR ALIGN=LEFT><TD WIDTH=117 VALIGN=TOP ALIGN=LEFT>

<HTML><HEAD><TITLE>NNN Interactive</TITLE><META HTTP-EQUIV="Refresh" CONTENT="1800, URL=/index.html">

Internet<WML><CARD><DO TYPE="ACCEPT"><GO URL="/submit?Name=$N"/></DO>Enter name:<INPUT TYPE="TEXT" KEY="N"/></CARD></WML>

010011010011110110010011011011011101010010011010

Content encoding

HTTP/HTML WAP

위치 : WAP GATEWAYWAE 에서 태그별로지정된 해당 핵사값으로 인코딩한 후에 무선단말기로 전송 ,

무선단말기로부터전송받은 헥사값을 wml 로 디코딩하여

wap 무선사이트로 전송

Page 9: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WAP Application WAP Application 환경목표환경목표

• Network- neutral application environment

• For narrowband wireless devices

• With an Internet/WWW programming model

• And a high degree of interoperability

Page 10: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Device-Side ProblemsDevice-Side Problems

• Device Independent• Network Independent• Different vendors – requires interfaces• Initial focus on phones

– Slow reactions– Small memory– Limited CPU– Small screen– Limited input model

Page 11: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WMLWML

Wireless Markup Language

Page 12: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WMLWML

• Tag-based browsing language:– Screen management (text, images)– Data input (text, selection lists, etc.)– Hyperlinks & navigation support

• Based on XML

Page 13: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WML (cont.)WML (cont.)

• Card metaphor– User interactions are split into cards– Navigation occurs between cards– Cards are put in to decks

• Explicit inter-card navigation model– Hyperlinks– User interface Event handling– History

• State management and variables– Reduce network traffic– Results in better caching

Page 14: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

모든 모든 deck deck 꼭꼭 ! ! 아래를 포함아래를 포함……

• Document prologue– XML & document type declaration

• <WML> element– Must contain one or more cards

<?xml version="1.0“?><!DOCTYPE WML PUBLIC "-//WAPFORUM//DTD WML 1.0//EN"

"http://www.wapforum.org/DTD/wml.xml">

<WML> ... </WML>

Page 15: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Hello World ExampleHello World Example

<?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="Card1" title=“ 교원양성코스 ">

<p>

<!-- Hello World example -->

Hello World

</p>

</card>

</wml>

Page 16: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

기본 기본 TagsTags

• <wml> </wml>, <html> </html> 이것과 같이 ‘ deck’ 시작과 긑에 정의

• <card> </card> , card 시작과 긑에 정의

Page 17: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

폰 결과폰 결과

Page 18: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

환경설정기본환경설정기본

• WML text content type: text/vnd.wap.wml

• 서블릿에서 아래 함수를 통해 생성된 wml file 을 전송할 수 있다 .– setContentType(“text/vnd.wap.wml”) in a

servlet– 톰캣 환경설정에 정확하게 타입이 설정필요

Page 19: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Tomcat Tomcat 환경설정환경설정

• /conf/web.xml

• web.xml file 에 content type 세팅

Page 20: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Content Type Content Type 세팅세팅

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-appPUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN“ "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app> <mime-mapping> <extension> wml </extension> <mime-type> text/vnd.wap.wml </mime-type> </mime-mapping></web-app>

Page 21: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Text FormatsText Formats

<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN“

"http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card title=“Text Formats"> <p> normal,

<strong>strong</strong>, <em>emphasized</em>, <b>bold</b>, <i>italic</i>, <u>underline</u>, <big>big</big> and<big><big>very big</big></big>, <small>small</small><br/>

</p> </card>

</wml>

Page 22: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

deck

Page 23: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

TablesTables

<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN“

"http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>

<card title=“Table">

<p>

<table columns="2">

<tr><th><b>Name</b></th>

<th><b>Phone</b></th></tr>

<tr><td>Bart</td><td>123</td></tr>

<tr><td>Lisa</td><td>321</td></tr>

</table>

</p>

</card>

</wml>

Page 24: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )
Page 25: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

AnchorsAnchors

• <anchor> tag 는사용자가 링크를선택했을대 무엇을 할것인지 정의– Comes with a task: go, pre, refresh– For example, <anchor>Login page

<go href=“login.wml"/>

</anchor>

Page 26: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

A TagA Tag

• The <a> tag 는 항상 “ go” task 를 실행한다 .

• For example,

<a href=“login.wml">Login page</a>

Page 27: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

ExampleExample

<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD

WML 1.1//EN“

"http://www.wapforum.org/DTD/

wml_1.1.xml">

<wml>

<card title=“Using A Tag">

<p>

<a href=“hello.wml">To Hello World</a>

</p>

</card>

</wml>

Page 28: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

User Input User Input 처리처리

• Select lists– Choose from a list of options

• Input fields– Enter a string of text or numbers

• KEY variables– Set by SELECT and INPUT elements– How user input is passed to other cards and the

application server

Page 29: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Select From OptionsSelect From Options

<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN“

"http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>

<card title=“Tutorials">

<p>

<select>

<option value="htm">HTML Tutorial</option> <option value="xml">XML Tutorial</option> <option value="wap">WAP Tutorial</option> </select>

</p>

</card>

</wml>

Page 30: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Select From OptionsSelect From Options

<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN“

"http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>

<card title=“Tutorials">

<p>

<select multiple="true“ default=“htm; xml”>

<option value="htm">HTML Tutorial</option> <option value="xml">XML Tutorial</option> <option value="wap">WAP Tutorial</option> </select>

</p>

</card>

</wml>

Page 31: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Input FieldsInput Fields

<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN“

"http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>

<card title="Input">

<p>

Name: <input name="Name" size="15"/><br/>

Age: <input name="Age" size="15" format="*N"/><br/>

Sex: <input name="Sex" size="15"/> </p>

</card>

</wml>

Page 32: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Other INPUT AttributesOther INPUT Attributes

• DEFAULT=key_value

– Default KEY variable (displayed to user)

• FORMAT=format_specifier

– If omitted, free-form entry is allowed

• EMPTYOK="TRUE"

– Browser will accept null input, even with format

• TYPE=TEXT | PASSWORD

– Special entry mode handled by the browser

• MAXLENGTH=number

– Maximum number of allowed characters

Page 33: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

FORMAT Control CharactersFORMAT Control Characters

– N Numeric character

– A, a Alphabetic character

– X, x Numeric or alphabetic character

– M, m Any character

• Leading backslash specifies forced characters• Forced characters included in KEY variable value

• Leading * specifies 0 or more characters• Password: FORMAT=“mmmm*m”

• Leading number specifies 0..N characters• Zipcode: FORMAT=“NNNNN\-4N”

Page 34: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

TasksTasks

• The <go> task represents the action of switching to a new card

• The <prev> task represents the action of going back to the previous card

• The <refresh> task refreshes some specified card variables– If any of the variables are shown on the screen,

this task also refreshes the screen

• The <noop> task says that nothing should be done

Page 35: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

do Actiondo Action

• The <do> tag can be used to activate a task when the user chooses a word/phrase on the screen

<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card> <p>

<do name="back" type="prev" label="Back"> <noop/> </do>

</p> </card> </wml> Overrides the Back link to noop

Page 36: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

<DO TYPE="ACCEPT" LABEL="Next"> <GO URL="http://www.mysite.com/file.wml"/></DO>

DO ElementDO Element

• Binds a task to a user action– Action type: ACCEPT, OPTIONS, HELP

PREV, DELETE, RESET– Label: Text string or image (optional)– Task: GO

PREV, REFRESH, NOOP– Destination: URL– Post data: if METHOD=POST

Page 37: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Task Binding RulesTask Binding Rules

• User actions are scoped at three levels• Deck • Card • Anchored links & select list options (ACCEPT)– When tasks are bound to an action at different levels,

the action with narrower scope takes precedence

• Default task bindingsUser Action TaskACCEPT, PREV PREV Others NOOP

Page 38: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

변수변수

• Variables store data when a user switches from card to card in a deck

• WML variables are case sensitive

• Setting a value to a variable:<setvar name="i" value="500"/>

Set a value to i

Page 39: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

입력 받은 변수값 세팅입력 받은 변수값 세팅

<card id=“card1"> <select name=“i"> <option value=“500">The Number

500</option> <option value=“Five Hundred">500 in Text</option> </select>

</card>

i 에 변수값 세팅 <card id="card2"> <p>You selected: $(i)</p> </card>i 값 가져오기

Page 40: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

클릭한 부분 찾기클릭한 부분 찾기<?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=“Card1” title=“The DBI Course”>

<do type=“accept” label=“Next”>

<go href=“#Card2”/>

</do>

<p> Select Next to go to Card 2. </p>

</card>

<card id=“Card2” title=“The DBI Course”>

<p> I'm Card 2. </p>

</card>

</wml>

Page 41: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )
Page 42: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

EventsEvents

• 3 가지 이벤트 타입 :– onenterbackward – Occurs when the user

navigates into a card using a “prev” task– onenterforward – Occurs when the user

navigates into a card using a “go” task– ontimer – Occurs when the "timer" expires

Page 43: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

TimerTimer

<?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="Intro" ontimer="#Main" title=“DBI Course"> <timer value="150"/> <p> Welcome to the dbi site!! We will bring you to our main page after 15 seconds. </p> </card> <card id="Main" title="Menu"> <p> This is our main page. Under construction. </p> </card>

</wml>

Page 44: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

After 15 seconds

Page 45: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

== DBI Course ==Welcome to the dbi site!! We will bring you to our main page after 15 seconds.

___________________________ Back

== DBI Course ==Welcome to the dbi site!! We will bring you to our main page after 15 seconds.

___________________________ Back

=== Menu ===This is our main page. Under construction.

___________________________ Back

=== Menu ===This is our main page. Under construction.

___________________________ Back

Page 46: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

입력입력

<?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="main" title=“DBI Example">

<do type="accept" label="Next">

<go href="#wel"/> </do>

<p> Please enter your name:

<input type="text" name=“iname"/> </p> </card>

<card id="wel" title="Welcome">

<do type="prev" label="Back"> <prev/> </do>

<p> Your name is $(iname).

Click Back to go to previous page.

</p> </card> </wml>

Page 47: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

이름 입력 옵션선택

“Next” 선택

Page 48: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )
Page 49: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )
Page 50: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

서버로 데이터 보내기서버로 데이터 보내기

<?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="main" title=“DBI Example">

<do type="accept" label=“Send">

<go method=“POST"

href=“dbi/registerServlet">

<postfield name="firstname"

value="$(first)"/>

<postfield name=“course" value=“dbi"/>

</go> </do>

<p> Please enter your first name:

<input type="text" name="first"/> </p>

</card>

</wml>

Page 51: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

서버로 데이터 보내기서버로 데이터 보내기<CARD> <DO TYPE="ACCEPT"> <GO URL=“dbi/myServlet?id=$(sno)"/> </DO> <SELECT KEY=“sno” MULTIPLE="TRUE"

DEFAULT="1;3;5"> <OPTION VALUE="1">Bart</OPTION> <OPTION VALUE="2">Lisa</OPTION> <OPTION VALUE="3">Homer</OPTION> <OPTION VALUE="4">Marge</OPTION> <OPTION VALUE="5">Milhouse</OPTION> <OPTION VALUE="6">Nelson</OPTION> <OPTION VALUE="7">Smithers</OPTION> <OPTION VALUE="8">Maggie</OPTION> <OPTION VALUE="9">Burns</OPTION> <OPTION ONCLICK="#card2">More...</OPTION> </SELECT></CARD>

Page 52: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

11 개이상의 개이상의 CardCard

<CARD> <DO TYPE="ACCEPT" LABEL="Next"> <GO URL="#card2"/> </DO> First name: <INPUT KEY="fname"/></CARD>

<CARD NAME="card2"> <DO TYPE="ACCEPT" LABEL="Done"> <GO URL=“dbi/myServlet" METHOD="POST" POSTDATA="first=$fname&amp;last=$lname"/> </DO> Last name: <INPUT KEY="lname"/></CARD>

Page 53: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

<CARD> <DO TYPE="ACCEPT"> <GO URL="#c2"/> </DO> Continue <IMG LOCALSRC="righthand" ALT="forward..."/></CARD>

<CARD NAME="c2"> <IMG SRC="../images/logo.bmp" ALT="Unwired Planet"/> <BR/>Welcome!</CARD>

Images Images 보기보기

• It is possible to insert images or local icons within display text– 1-bit BMP format

• Images are ignored by non-bitmapped devices

Page 54: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Image Image 속성속성

• alt=“..” – ‘Names’ the image – If the image is not displayed by the browser

the label is displayed instead

• src=".. – Image source - where the image is located

• width=".. • height="..

– Sets the dimensions of the image. – For example, the screen sizes of the devices

is Nokia 7110 (48 x 96 pixels)

Page 55: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WBMPWBMP

• Wap supports WBMP (Wireless Bitmap Picture) 2 bit images

• It is possible to convert existing images to wbmp

• The MIME type of the images is declered with the following header:

Content-type: image/vnd.wap.wbmp

Page 56: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

<?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="main" title="Where are you?">

<timer value="10"/>

<img src="snail2.wbmp" alt="A search snail"/>

</card>

<card id="look" title="I found you">

<img src="snail3.wbmp" alt="A looking snail"/>

</card>

</wml>

Page 57: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Images Images 추가추가

Page 58: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Special WML CharactersSpecial WML Characters

• Use character entities in display text&quot; "&amp; &&apos; '&lt; <&gt; >&nbsp; Blank space&shy; Soft hyphen (discretionary line break)

• Replace the “&” character in URL strings URL=“myServlet?first=$fname&amp;last=$lname”

• Use “$$” to display a single “$” character

Page 59: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

<head><head> Tag Tag

• <head>tag 는 문서정보 포함

<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"><wml> <head> <access domain="www.konkuk.ac.kr"/> <meta name="keyword" content="WAP"/> </head>.... .... </wml>

Page 60: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WML WML 추가적인 사용추가적인 사용

• Setting card styles to create forms

• Using variables to cache user data

• Using card intrinsic events to trigger

transparent tasks

• Using timers

• Securing WML decks

• Bookmarking decks

Page 61: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WMLScriptWMLScript

• Scripting language:– Procedural logic, loops, conditionals, etc.– Optimized for small-memory, small-cpu devices

• Derived from JavaScript™• Integrated with WML

– Reduces overall network traffic

• Bytecode-based virtual machine– Stack-oriented design– ROM-able

Page 62: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WMLScript Standard LibrariesWMLScript Standard Libraries

• Lang – VM constants, general-purpose math functionality, etc.

• String – string processing functions

• URL – URL processing

• Browser – WML browser interface

• Dialog – simple user interface

• Float – floating point functions

Page 63: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WMLScript Example UsesWMLScript Example Uses

• Reduce network round-trips and enhance functionality

• Field validation– Check for formatting, input ranges, etc.

• Device extensions– Access device or vendor-specific API

• Conditional logic– Download intelligence into the device

Page 64: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

Functions

WMLScript ExampleWMLScript Example

ProgrammingConstructs

Variables

function currencyConvertor(currency, exchRate) { return currency*exchRate; }

function myDay(sunShines) { var myDay; if (sunShines) { myDay = “Good”; } else { myDay = “Not so good”; }; return myDay;}

Page 65: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WMLScript ExampleWMLScript Example

<?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=“card1" title="Go to URL"> <do type="options" label="Go"> <go href="check.wmls#go_url(‘abc’)"/> </do> </card> </wml>

Page 66: WAP and WML. WAP WAP = Wireless Application Protocol 웹을 통해서 무선 어플리케이션을 연결할 규약 ( 프로토콜 )

WMLScript ExampleWMLScript Example

function go_url(val){

if (val==“abc") { WMLBrowser.go("http://wap.google.com/start.wml")

} }