Wireless Internet by zhouwenjuan

VIEWS: 2 PAGES: 44

									            Wireless Internet &
               m-Business
Objectives :
§Toprovide an overview of wireless technologies and
applications
§Toexamine various wireless standards,platforms and
programming languages
§To   introduce Wireless Markup Language (WML)
§Toexplore the use of WML elements in creating
Wireless Application Protocol (WAP) applications
  understand the relationship between WML and
§To
WMLScript
§Toreview aspects of writing simple WMLScript
                                                   1
programs
1.1 M-Business

p   M-Business or mobile business, e-business
    enabled by wireless communications
p   Able to reach users effectively and allow them
    instant access to business-critical information and
    communication capabilities at any time, from
    almost anywhere
p   Give benefits to businesses, employers
    ,employees and consumers.



                                                      2
WAP and WML

p   1997- WAP (Wireless Application Protocol) was
    developed by dominant-cell phone manufacturers
    Nokia, Ericsson, Motorola and others to facilitate
    the introduction and standardization of Wireless
    Internet Access.
p   WAP- a set of communications protocols that are
    designed to enable wireless devices to access the
    Internet.


                                                         3
WAP and WML (cont..)

p   WAP applications can be used on Palm OSS,
    Windows CE, Mac OS and Java 2 Micro Edition
    (J2ME) devices.
p   WAP communications involves many components.
p   Focus on 3 – WAP-enabled mobile device, WAP
    gateway and Web Server.




                                               4
 WAP and WML (cont..)
                                                           Process
                                                           request :
                           Send                            Search
   WAP-enabled
                           requested                       through
   mobile device
                           information                     existing
                                                           databases
Request                                   Web              and
             WML                          Server           information
informati-                    HTTP
on from                                                    resources, i.e
Internet                        connect                    web pages

                                          has connection
             WAP gateway
                                                                  Int
             WML - HTTP                                           ern
                                                                  et
                                                                        5
WAP and WML (cont..)

p   WML (Wireless Markup Language) –markup
    language used to create Web content delivered to
    wireless handheld devices.
p   WML tags –markup commands that specify how a
    web page should be formatted for viewing on a
    wireless device.
p   WAP supports WML to deliver the content.



                                                   6
WAP and WML (cont..)

p   A WML document is called a deck; each contains
    one or more pages, called cards.
p   One of WML’s most important capabilities is its
    ability to create hyperlinks between WML
    documents on the web. Both text and images can
    be used as links to other decks.




                                                  7
WAP and WML (cont..)


                       Example of linking to
                       external card




                                           8
WAP and WML (cont..)
p   WAP also have may opponents.
p   Disadvantages cited by WAP opponents:
    n   Protocol
        possible security breaches, limited bandwidth,
        unreliability
p   Limited bandwidth – WAP-enabled devices unable
    to handle transmission of multimedia, but can
    also become overloaded during peak hours
p   Above limitations cause B2B and B2C application
    developers to anticipate the release of faster 3G
    technologies and new WAP specification.

                                                         9
Phone Simulator and Setup Instructions

p   There are two most popular WAP browsers used
    for the development and testing of WAP
    applications.
     n Nokia®
     n Openwave
p   Setup instructions can be obtained from Cyber
    Tech web page.




                                                    10
Creating WML documents
1.   WML documents will be saved in .wml file
     extension.
2.   Install the WAP browsers - Nokia® / Openwave
3.   Example : Openwave
4.   To simulate WAP applications by using the
     Openwave browser, WAP documents must be
     requested from a Web server., such as Apache
     or IIS.
5.   Install a Web server – example : IIS



                                                    11
Creating WML documents (cont..)
6.   After IIS has been installed, copy the WML files
     to \Inetpub\wwwroot folder.
7.   Configure IIS to respond to requests for WAP
     documents
8.   To request a document, it is necessary to launch
     the Openwave Simulator. This is achieved by
     typing localhost/file name.wml ,in the Openwave
     Simulator’s address field.




                                                    12
Simple WML Documents
1)    <? xml version = “1.0” ?>
2)    <!DOCTYPE wml PUBLIC “-//WAPFORUM??DTD WML 1.2//EN”
3)       “http://www.wapforum.org/DTD/wml112.dtd”>
4)
5)    <wml>
6)       <card id = “index” title = “WML Title”>
7)       <p>
8)              Welcome to wireless programming!
9)       </p>
10)      </card>
11)   </wml>
                                  This text will be displayed in the
                                  browser window.                      13
Program Output




                 14
Creating WML documents (cont..)

p   The root element for every WML document is
    wml.
p   Line 6 contains the opening card element.
p   Card element has two important attributes.
     n id – uniquely identifies the card
     n title – displays a title at the top of most
       browser windows



                                                     15
Creating WML documents (cont..)
p   All text in a WML document is placed between
    <p> tags that are nested within <card> tags.

Common Programming Error

p   WML element and attribute names are case
    sensitive, must be written in lower case
p   Writing a WML tag in uppercase – syntax error
p   Every WML document requires a minimum of one
    card element
p   Failure to include – syntax error

                                                   16
WMLScript Programming
p   WMLScript – enhance the functionality of WML
    documents
p   Relationship between WML and WMLScript =
    XHTML and JavaScript
p   Difference of above relationship – WMLScript is
    placed in a separate document and cannot be
    embedded inside a WML document.
p   WMLScript documents will be saved in .wmls file
    extension.


                                                  17
WMLScript Programming (cont..)
     1)    // welcomeDoc.wmls
     2)   extern function welcome()
     3)    {
     4)   // creating a browser variable and assigning it a
          // value
     5)    WMLBrowser.setVar( "welcome",
     6)    "Welcome to WMLScript programming!" );
     7)    // refresh the display window
     8)    WMLBrowser.refresh();
     9)    }                    Method setVar creates a browser variable
                                   welcome with the value of the string
Method refresh refreshes the       “Welcome to WMLScript
                                                                          18
browser and all variable values.   programming”.
WMLScript Programming (cont..)
p   Openwave’s browser contains a WMLScript
    interpreter for the execution of WMLScript
    commands.
p   Line 2-9 define function welcome.
p   Keyword extern denotes that the function is
    externally accessible to other WML and
    WMLScript documents.
p   WMLScript provides objects for performing
    common mathematical calculations, string
    manipulations, browser manipulations and other
    functions.
                                                     19
WMLScript Programming (cont..)
p   WMLScript provides the WMLBrowser object for
    interacting with the browser.
p   Line 5-6 call the WMLBrowser object’s setVar
    method to create a browser variable named
    welcome and to assign it a string.
p   Line 8 calls the WMLBrowser object’s refresh
    method to update (refresh) the values of all
    browser variables.




                                                   20
WMLScript Programming (cont..)
1)   <!-- Fig. 23.7: fig23_7.wml -->
2)   <!-- Printing a line of text -->    Dereferencing browser
                                         variable welcome displays its
                                         value.
3)   <wml>
4)   <card id = "Line" title = "Line">

5)   <onevent type = "onenterforward">
6)   <!-- call function welcome -->
7)   <go href = "welcomeDoc.wmls#welcome()" />
8)   </onevent>

9)  <p>$welcome </p>
10) </card>
                                                                   21
11) </wml>
Program Output




                 22
WMLScript Programming (cont..)
p   Above WML document invokes function welcome
    in welcomeDoc.wmls
p   The result of function welcome is displayed by
    the WML document.
p   Line 5 contain the onevent element that invokes
    WMLScript function welcome.
p   The onevent element is an event element that
    executes a task element, such as the go element
    (line 7),which is wrapped in its tags.


                                                  23
WMLScript Programming (cont..)
  p   Above attribute type is set to
      “onenterforward”.
  p   This executes the task element go when the
      card is loaded.
  p   Function welcome in welcomeDoc.wmls is
      invoked in Line 7 by assigning to attribute
      href the WMLScript document name
      followed by a # sign and the function name.




                                                    24
WMLScript Programming (cont..)
Common Programming Error

p Failure to enclose link addresses in quotes
  –syntax error
p When referencing a function from an href
  attribute’s value, failure to precede a
  function name with a pound sign (#) –
  runtime error.


                                            25
WMLScript Programming (cont..)
Common Programming Error

p   When referencing a function from an href
    attribute’s value, failure to follow the
    function name with a set of parentheses –
    logic error.




                                            26
Wireless Protocols, Platforms and
Programming Languages
p   Programming languages, platforms and protocols
    are pivotal development and implementation
    tools for wirell communications.

p   Often , several programming languages,
    platforms and protocols are used simultaneously
    in a single wirelless technology development.




                                                      27
WAP 2.0
p   Released in 2001

p   Specifies XHTML Basic to replace WML as the
    markup language used by wirelless devices to
    render web content

p   Give benefits to wirelless device manufacturers,
    web content developers and users




                                                       28
WAP 2.0 (cont..)
p   Wirelless device manufacturers – allowing them
    to develop compatible mobile devices and
    applications

p   Web content developers – able to create Web
    pages for such platforms as diverse as mobile
    phones, PDAs,pagers,webTV and desktop
    computers

p   Users – able to access to a wider selection of
    cotent that is easier to navigate
                                                     29
WAP 2.0 (cont..)
p   WAP 2.0 will likely include WML extensions that
    allow programmers to embed WML within the
    XHTML Basic markup

p   Features such as soft keys that are not supported
    by XHTML Basic will be implemented using WML

p   Expected to include specifications for
    color,animation and multimedia features as MP3
    audio and MPEG video streaming
                                                      30
Handheld Devices Markup
Languages ( HDML )
p   HDML was one of the markup languages used to
    deliver content handheld devices

p   Originally developed in 1996 by a company called
    Unwired Planet ( known as Openwave )

p   Similar to HTML, which is used to design and
    format web pages



                                                   31
Handheld Devices Markup Languages
( HDML ) (cont..)

p   However, HTML is not effective for use on devices
    with limited screen sizes and viewing capabilities

p   Although HDML was implemented in millions of
    devices when it was first introduced, it has been
    replaced with other emerging standards that
    support 2.5G and 3G technologies

p   HDML eventually evolved into WML

                                                        32
Handheld Devices Markup Languages
( HDML ) (cont..)
p   Japan and parts of Europe – consumer wirelless
    devices function using WAP and no longer support
    HDML

p   However, some CDMA-based phones in US and
    Canada still support WML and HDML

p   The conversion of HDML to WML code is not
    difficult, and Openwave is currently working to
    replace HDML with WML

                                                      33
Compact HTML (cHTML ) and
i-mode
p   NTT DoCoMo and its popular i-mode service
    employ Compact HTML (cHTML ) to format web
    pages

p   cHTML a subset of HTML that is designed for
    mobile devices, uses a limited set of HTML tags
    and attributes

p   With the exception of i-mode phones and devices,
    cHTML is not widely used
                                                      34
Java and Java 2 Micro Edition
(J2ME)
p   Java is one of the most popular programming
    languages in the software development industry

p   Sun Microsystems created Java to facilitate the
    development of Intenet and Web-based
    applications that run consistently on any
    operating systems without requireing alteration

p   Sun coined the term,”write once,run anywhere”
    to describe this feature
                                                      35
Java and Java 2 Micro Edition (J2ME)
(cont..)
p   Over the past few years, Java has matured into
    the Java 2 paltform, which provides an even
    higher level of consistency among different
    systems

p   Java 2 has evolved intp three platforms:
       - Java 2 Standard Edition ( J2SETM )
       enables developers to create standalone
       programs and client-side applications
       - Java 2 Enterprise Edition ( J2EETM )
       enables developers to create powerful
       enterprise systems for the management of
       entire businesses
                                                     36
Java and Java 2 Micro Edition (J2ME)
(cont..)
       - Java 2 Micro Edition ( J2METM )
       enables developers to create applications
       targeted to consumer devices

p   J2ME is the newest option for Java programming

p   This platform enables developers to write
    applications for such consumer devices as set-top
    boxes, web terminals and embedded systems

p   Much popular – ability to write applications for
    wireless devices
                                                       37
Java and Java 2 Micro Edition (J2ME)
(cont..)
p   J2ME also offers programmers tools to create
    user interfaces, connect to networks and save
    various programs information




                                                    38
Binary Run-Time Environment for
Wireless (BREW)
p   The market for wirelless devices, especially cell
    phones ,is exploding. Great demand exists for cell
    phones to support more functions ; however
    ,there are problems adapting applications on the
    devices varying runtime environments

p   Possible solution – manufactures should improve
    the hardware of mobile devices,enabling devices
    to support a larger number of applications


                                                      39
Binary Run-Time Environment for
Wireless (BREW) (cont..)
p   However, the costs are extremely high

p   To solve this problem, Qualcomm has come out
    with BREW in May 2001

p   BREW – a layer of code that works with
    Qualcomm chips and other cell phone operating
    systems that allow cell phones to run application
    progrmas written using BREW development kits

p   Applications developed with the BREW standard
    development kit are platform-independent ,
    allowing them to run devices with varying           40
    runtime environments
Binary Run-Time Environment for
Wireless (BREW) (cont..)
p   Also reduce costs and shorten development
    timetables of manufactures

p   In addition, enables software developers to
    create applications, including navigation
    assistance , instant messaging, e-mail, e-wallets,
    games and personal information management,
    taht are be accessible thriugh a variety of
    wireless devices


                                                     41
Bluetooth Wireless Technology
p   Bluetooth is a computing and
    telecommunications industry specification
    that describes how mobile phones,
    computers, and personal digital assistants
    (PDAs) can easily interconnect with each
    other and with home and business phones
    and computers using a short-range wireless
    connection.



                                            42
Bluetooth Wireless Technology (cont..)
 p   Using this technology, users of cellular
     phones, pagers, and personal digital
     assistants such as the PalmPilot will be able
     to buy a three-in-one phone that can
     double as a portable phone at home or in
     the office, get quickly synchronized with
     information in a desktop or notebook
     computer, initiate the sending or receiving
     of a fax and, in general, have all mobile and
     fixed computer devices be totally
     coordinated.
                                               43

 Source : searchNetworking.com
Reference
p   Internet & WWW : How To Program ,Deitel &
    Deitel Nieto – page 735 - 777




                                                44

								
To top