WAP, WML - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

WAP, WML

Description:

Az 1. card-on do-accept-go-val juthassunk el a 2. card-ra ... card-ot, melyen k t do-accept-go-setvar-ral egy v ltoz t m dos tunk: a ... – PowerPoint PPT presentation

Number of Views:191
Avg rating:3.0/5.0
Slides: 34
Provided by: ladnyi
Category:
Tags: wap | wml | gogo

less

Transcript and Presenter's Notes

Title: WAP, WML


1
WAP, WML
  • Felhasznált források
  • Developers Guide v1.2 (Nokia WAP Toolkit)
  • WML Reference v1.1

2
WAP network protocol structure
  • The WAP is similar to a Web model, and operates
    as follows
  • 1 The user presses a phone key that has an URL
    request assigned to it.
  • 2 The user agent sends an URL request to a WAP
    gateway using the WAP protocol.
  • 3 The WAP gateway create an conventional HTTP
    request for the specified URL and sends it to the
    web server.
  • 4 The HTTP request is processed by the web
    server. The URL may refer to a static file or to
    a CGI or other script application. In the first
    case, the web server fetches the file and adds an
    HTTP header to it. If the URL specifies a script
    application, the web server runs the application.
  • 5 The web server returns the WML deck with the
    added HTTP header or the WML output from the CGI
    or other script application.
  • 6 The WAP gateway verifies the HTTP header and
    the WML content and encodes them to binary form.
    The gateway then creates a WAP response
    containing the WML and sends it to the user
    agent.
  • 7 The user agent receives the WAP response. It
    processes the WML response and displays the first
    card of the WML deck to the user.

3
Content MIME type extensions
  • Before creating your own WML and WMLScript
    services, configure your web server to support
    the following MIME types
  • Content MIME type Extension
  • WML source text/vnd.wap.wml wml
  • Wireless bitmaps image/vnd.wap.wbmp wbmp
  • Compiled WML application/vnd.wap.wmlc wmlc
  • WMLScript source text/vnd.wap.wmlscript wmls
  • Compiled WMLScript application/vnd.wap.wmlscriptc
    wmlsc

4
Disadvantages of HTML/HTTP/TCP
  • HTML content and HTTP headers are textual, their
    encoding is not size-optimal
  • TCP is too general for browsing-type
    applications. It sets up a two-way general stream
    with sequence numbers in both directions.
    Browsing requirement is only request-reply. It
    could be done with one transaction identifier and
    a less general protocol.
  • HTML is optimized for large-screen devices, it
    can be rendered quite inefficiently on small
    screens (frames)
  • HTML is quite complex, an acceptable browser
    takes a lot of application space.
  • Characteristics of mobile network/devices
  • Bandwidth is restricted (9.6KBaud on GSM)
  • Device memory is small (2MByte total code for a
    6110)
  • Device display is small and generally only
    blackwhite

5
Expectations towards WAP
  • It should be traffic and size-optimized
  • It should use whatever mobile network we have
    (SMS, CDMA, IS-136 )
  • It should be open standard
  • It should be integrated with the Internet
  • WAP and Internet will merge as soon as phones are
    powerful enough and mobile networks have
    sufficient capacity

6
Overwiev of the WML
7
WML Structure
  • The first line specifies the XML version number.
  • The second line specifies the SGML public
    document identifier.
  • The third line specifies the location of the WML
    document type definition (DTD). The DTD can be
    located in the network, or you can store it
    locally to make accessing it faster. The Nokia
    WAP Toolkit includes the DTD file wml.xml, found
    in the directory ltinstallation directorygt\dtd.
  • The fourth line is the root element of the XML
    document of which there may only be only one and
    it must match the root element name as indicated
    in the first argument of the document type. All
    WML documents must begin with a ltwmlgt tag.
  • The following lines define a card containing a
    start and an end tag and text to be displayed to
    the user.
  • All WML decks must end with a lt/wmlgt tag.

8
The elements of WML
  • Text Formatting
  • Anchors, Images, Timers
  • Events
  • Tasks
  • Variables
  • User Input

9
Character entities and special characters
(see specchars.wml)
10
Formatting text
  • em Render with emphasis.
  • strong Render with strong emphasis.
  • i Render with an italic font.
  • b Render with a bold font.
  • u Render with underline.
  • big Render with a large font.
  • small Render with a small font.
  • Use the strong and em tags where possible. It is
    not recommended to use the b, i and u tags except
    where explicit control over text presentation is
    required.

11
(No Transcript)
12
Feladat
  • Hello World oldal elkészítése, formázással

13
Text formatting elements
  • br beginning of a new line
  • p paragraph (see multicard.wml)
  • align left, right, center
  • mode wrap, nowrap
  • table table element (see weather.wml)
  • title title of table
  • align alignment
  • columns number of columns

14
Table example (weather.wml)
15
Feladat
  • Készítsen egy táblázatot, mely tartalmazza a
    barátai nevét, telefonszámát és e-mail címét!
  • Az egyes sorokat és oszlopokat különbözo módokon
    formázza!

16
Anchors, images and timers
  • anchor (see readme.wml)
  • image (see weather.wml)
  • timer (see multicard.wml)

17
Anchor example
18
Feladat
  • Készítsen egy deck-et, két card-dal.
  • Az elso card-ról egy ltanchor ... segítségével
    jussunk el a második card-ra
  • A második card-ról egy képre kattintva juthassunk
    vissza az elso card-ra

19
Tasks
  • go ltgo hrefhelp/gt
  • prev ltprev/gt
  • noop ltnoop/gt

20
Card and Deck task override
  • deck level template
  • card level card
  • (see deck2a.wml)

21
Events (1/4)
  • do
  • type accept, prev
  • label
  • name
  • (see deck2a.wml,
  • deck2b.wml)

22
Events (2/4)
  • ontimer, timer (see multicard.wml)

23
Feladat
  • Készítsünk egy olyan deck-et, mely 2 card-ot
    tartalmaz
  • Az 1. card-on egy do-accept-go-val juthassunk el
    a 2. cardra
  • A 2. card-ról egy timerrel jussunk vissza az 1.
    card-ra

24
Events (3/4)
  • onevent
  • onenterforward onenterbackward

25
Feladat
  • Készítsünk egy 3 card-ból álló deck-et
  • Az 1. card-on do-accept-go-val juthassunk el a 2.
    card-ra
  • A 2. card-ról egy onenterforward-dal jussunk át a
    3. card-ra, egy onenterbackward-dal vissza az
    1-re
  • A 3. card-on egy do-accept-prev-vel juthassunk el
    a 2. card-ra

26
Events (4/4)
  • onpick

27
Variables
  • Set (go, prev, refresh)
  • ltsetvar namevar_1 value007/gt
  • Read
  • var_1, (var_1)
  • (see deck1.wml)

28
Feladat
  • Készítsünk olyan card-ot, melyen két
    do-accept-go-setvar-ral egy változót módosítunk
    a választástól függoen vagy az a vagy a b
    betut fuzzük össze a változóval

29
Input elements
  • input
  • name name of the variable
  • value default value
  • type text password
  • format A,a,N,X,x,M,m,f,nf
  • maxlength maxiumum number of characters
  • size size of the input area
  • emptyok
  • title

30
Input elements example
31
Feladat
  • Az elso card-on kérjük be a felhasználó vezeték-
    és keresztnevét, a második card-on teljes név
    szerint üdvözöljük!
  • A card-ok közötti mozgás során hozzunk létre egy
    teljes_nev nevu változót, amibe a megadott
    vezeték- és keresztneveket összefuzzük! A
    kiiratáshoz használjuk ezt a változót!

32
Select, option, optgroup elements
  • select (see deck3.wml)
  • multiple multiple selection
  • name, value name default value of the variable
  • iname, ivalue name default value of the index
    variable
  • title title of select element
  • option
  • title
  • value
  • onpick
  • option group
  • title

33
Feladat
  • Készítsünk olyan deck-et, melyen a
    select-option-bol kiválasztott állathoz (kutya,
    macska, ló) kapcsolódó card-ra juthatunk el!
Write a Comment
User Comments (0)
About PowerShow.com