Docstoc

Wap Layers

Document Sample
Wap Layers Powered By Docstoc
					Serving Content &
Applications with WML
   Serving Wireless Content
   What is WAE?
   What is WML?
   What is WMLScript?
   Simple WML Page: The Source
   Simple WML Page: Viewed
   The Input Device
   The Input Device: Keypad
   The Demo: Setup
   The Demo: What You Missed?
   The Demo: What It Shows
    Serving
    Wireless Content
   How do I serve content to wireless devices?
       HTML
         •   No changes to content on your web server
         •   Accessed through Internet/WAP gateways
         •   Sloppy, not formatted for smaller displays, bad UI
         •   Problematic: JavaScript, Java, etc. won’t work right
       WML
         • Content formatted for small displays & limited input
         • Define “decks” of related pages in WML
         • WMLScript gives interactivity, WAE gives access to
           phone environment
       Sites can sniff user agents (browsers)
         • On hitting homepage, scripts detect if HTML or
           WAP/WML browser and serve the right files
    What Is
    WAE?
   WAE (Wireless Application Environment)
   It’s an “umbrella” of specifications for developers
    creating wireless apps
   Consists of the following specifications:
       WML (Wireless Markup Language)
       WMLScript (WML Script)
       WBXML (WAP Binary XML Format)
       WAEStdLib (WMLScript Standard Libraries)
       WTA (Wireless Telephony Application)
       WTAI (WTA Interface)
   Specify behavior of wireless applications
       How static & dynamic content/applications are created
       How they interact with the physical devices, such as to
        initiate a call or receive input from a button
    What Is
    WML?
   WML (Wireless Markup Language)
       Used to create static content for wireless devices
         • Markup language similar to HTML, but based on XML
         • The WAP Forum defined an XML DTD for WML:
            • http://www.wapforum.org/DTD/wml_1.1.xml
       WML DTD defines elements and attributes that
        make up UI components called “cards”
         • In HTML, we go from page to page; in WML, we go
           from card to card (or screen to screen)
         • Cards include formatted text, input elements, select
           elements, and organizational containers; limited state
         • A “deck” is a collection of related cards and is sent as
           one file (*.wml), usually representing one application
    What Is
    WMLScript?
   Provides client-side scripting capabilities in
    a WAP environment
   Has elements similar to JavaScript & Java
       Complements WML as JavaScript complements
        HTML to provide dynamic client-side content
       Not embedded in page as JavaScript, but
        referenced by URLs
       Code must be compiled into WMLScript bytecode
        before it can be run on a WAP client
       Requires a WMLScript Virtual Machine on the
        client to run the compiled script (similar to Java)
    Simple WML
    Page: The Source




   1: XML declaration, says it conforms to XML 1.0
   2: Document type declaration, says it’s WML
   3: Location of WML DTD, needed to understand WML syntax
   4: Begins the WML deck (deck header)
   5-9: A card with one paragraph: “Hello, Unwired World!”
   10: Ends the WML deck (deck footer)
    Simple WML
    Page: Viewed
   WML page saved as
    “hello.wml” on web server
   Web server configured
    with WML & WMLScript
    MIME types:
       text/vnd.wap.wml *.wml
       text/vnd.wap.wmls *.wmls
   URL entered into phone
    simulator
   Page fetched and shown
The Input
Device
   Constraints:
       Small display
       Limited user
        input facilities
       Narrowband net
        connection
       Limited memory
        and processor
The Input
Device: Keypad
   Phone keypad can be in numeric, alpha or symbol mode
   Multiple characters assigned to keys
        You cycle through by clicking the same key quickly
        In alpha mode, usually the first letter is in caps automatically; some
         have caps keys or are all in caps
   To enter “Hello”:
        [4][4]+[3][3]+[5][5][5]+(pause)+[5][5][5]+[6][6][6]
        (Makes you wish you had a Palm V and a stylus, but I suppose it IS a
         sure way to strengthen finger muscles!)
    The Demo:
    Setup
   Download UP.SDK 4.0 and save to disk:
       http://www.loudcloud.com/wml/upsdkW40e.zip
   Unzip this, and run “upsdkW40e.exe” to install the SDK
   From Windoze, click Start -> Programs -> UP.SDK 4.0 ->
    UP.Simulator
   The graphical phone simulator will now appear
   On the file menu above the phone, click Settings -> UP.Link
    Settings -> select "UPLink 1:“
   Enter URL in “Go:” box above graphical phone
       http://www.loudcloud.com/wml/class.wml
   Hit “Enter” to security messages, re-enter URL if needed
   When you see “What’s your name?” you’re in the deck I
    created for the class demo
The Demo:
Partial Source
The Demo:
What You Missed?
    The Demo:
    What It Shows
   A. Input of variables, such as “name” in the opening card
   B. Variables accessible from different cards (“name” shows up
    elsewhere)
   C. Menu selection of items that go to cards in the deck or URLs
   D. Menu selection of items that set variables
   E. Displaying plain text messages (note from Jim!)
   F. Links to external sites (class home page)
   G. Link to external site with user agent detection (Google, it points
    to www.google.com, but you get a WML page back, not ugly HTML,
    and search results are all formatted for WML, it's really cool! – what
    to do!)
   H. Link to normal web site not prepared for wireless (Loudcloud, my
    site, home page appears okay, but not designed for wireless devices
    and successive links break – what not to do in a wireless world!)

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:7
posted:10/9/2011
language:English
pages:13