XML and Open Source Deliver Device-Independent Dynamic Content by dfhdhdhdhjr

VIEWS: 3 PAGES: 43

									Wireless I.T. 2000
XML and Open Source Deliver
    Device-Independent
     Dynamic Content

          Keith Bigelow
        Lutris Technologies
Speaker Highlights

• Lutris
   – Open Source Enterprise Software and Services
   – Founded: July 1995
   – Headquarters: Santa Cruz, CA
   – Employees: ~200
   – Investors: Chase Capital Partners, Intel, Compaq, NEC, DB Alex
     Brown, Chase H&Q, TransCosmos

• Keith Bigelow
   – Director of Product Mgmt @ Lutris for Enhydra & Wireless

   – Keith.Bigelow@Lutris.com
                     Agenda
•   Which Types of Wireless Apps to Build?
•   Overview of Open Source and Wireless
•   Wireless Protocols & Standards
•   Open Source Options for Wireless Development
•   Tutorial in Authoring a Wireless Application
Why Wireless?
• Growth of internet capable cell phone adoption
   –   2 billion SMS messages sent in October 1999 Forrester
   –   5 billion SMS messages sent in March 2000 - Forrester
   –   1 billion mobile internet access devices by 2003 Yankee
   –   BlueTooth technology widely available in 2002 Durlacher
   –   GPS federally mandated in 2001, location based services
       become real FCC

• Analyst predictions for Mobile Commerce
   – $323 Million in 1998 - Durlacher
   – $23 Billion in 2003 - Durlacher
What Types of Wireless Apps?
• Early Consumer Applications
   –   Chat – Instant Messaging using SMS
   –   Portals – News, sports, weather, entertainment, travel
   –   Entertainment – tickets, games, music, betting
   –   Financial apps – Stock trading in HK today
   –   Email
• Early Opportunities in Business Applications
   –   eSalary – ADP sends email & SMS alert re: funds xfer
   –   Mobile supply chain integration [exchanges, auctions, etc.]
   –   Telemetry / Remote control
   –   Job Dispatch / Fleet Mgmt.
   –   Mobile CRM / SFA
Why Were B2C Wireless Apps First?
• Uncertain costs of service - expected move to fixed costs
  for data, but not there yet – IT hates a variable cost…
• Security issues - handoff between provider & back end
  apps currently is exposed – IT hates security holes…
• Businesses themselves have not historically embraced
  personal productivity devices due to IT [Palm Pilot, etc.] –
  IT is already too busy and overtasked…
• Initial lack of available phones & infrastructure for
  business applications
• Homogeneous messaging [SMS] standards created a large
  base of commonly connected consumers
Which Wireless Apps Will Be Home Runs??




                                 Forrester 12/1999
Open Source and Location Technology
• US FTC E-911mandate location for operators by 2001.
  Geocoding in public domain. Only in the US.
• GPS – Global Positioning System
   –   10 meter precision + altitude
   –   Earth is covered by 24 satellites.
   –   May 1 2000 SA (Signal Availability) dithering was turned off.
   –   2 minute acquisition times
• http://www.locationforum.org/ is the new forum created
  by handset firms to share location information, join!
So Why Build Wireless Apps With
Open Source?
• Open source is a software development methodology
   – Harnesses the power of the Internet to build community
   – Brings the best minds in the world together, not just the best in a
     single company
• Open source software is often superior to closed source
   – More robust, feature rich, and adaptable / Quickest method of
     addressing bugs and deficiencies
       • Ex: Linux, Apache, SendMail, TCP/IP, HTTP, Perl, etc
• Wireless leverages all the Open Source benefits
   – Standards based (e.g., XML, Java…)
       • WAP – the USA/Europe emerging standard is moving to the W3C
       • iMode – the Japanese standard is already on W3C
       • J2ME / MIDp – offered as an open standard by Sun and Handset firms
Wireless Open Source Value
• Developers
   – 24x7 worldwide code review process
   – 24x7 mail list / newsgroup support
   – Learning through community monitoring & involvement
• ISV/Product Companies
   – Favorable licensing/cost model for redistribution
   – Licenses to protect IP
• End Users
   – Self-supporting through source code access
   – Features driven by discussion, contribution and consensus, not
     proprietary product managers
   – More sources for support and services
   – Places control in the hands of the customer
          What Wireless Protocol for
           Europe/North America?
• WAP is the Wireless Application
  Protocol, as is moving into Open Source
• WAP allows delivery from a server or
  other application-host to a wireless
  device, using standard (agreed-upon)
  specifications for transmission of data.
• WAP is all about providing an experience
  on a phone entirely different from a
  typical web-browsing session.
• Typical phones (that’s right, typical ones)
  now support either WAP or WML
  through the phone.com gateways (via
  HDML).
• Outside USA/EUROPE? You’re
  probably looking at cHTML/iMODE
  (Japan), or localized WAP (China)
          How Does WAP Work??




  It’s all about conversion – the WAP Gateway does the “hard stuff”.
WAP device requests get translated into web requests, and web responses
            Get translated back into WAP-specific data streams.
 Internet and WAP Technologies
                    Wireless Application Protocol

 Internet
  HTML                     Wireless Application          Other Services and
JavaScript                 Environment (WAE)                Applications

                             Session Layer (WSP)
  HTTP
                             Transaction Layer (WTP)


 TLS - SSL                   Security Layer (WTLS)

                            Transport Layer (WDP)
   TCP/IP
   UDP/IP       Bearers:
                    SMS    USSD   CSD   IS-       CDMA   CDPD PDC-P    Etc..
                                        136

Source: Phone.com
                   What Is WML?
• WML is the Wireless                     Markup-isms
  Markup Language.
                                 •   HTML (Most Web – W3C)
• Cards, Decks, and micro-
                                 •   DHTML (Some Web – W3C)
  views into the world           •   WML (Phone.com)
   – WML is about shoving        •   HDML (Phone.com proprietary
     more into less.                 – broadest use today in the
   – WML is about sending data       USA)
     to anticipate customer’s    •   cHTML (Phones in Japan)
     needs.                      •   XHTML (All Web – HTML
   – WML is about being              rewritten in XML)
     concise, not flashy.        •   XML (Anything)
                                 •   And a host of others…
                Is It Like HTML, or XML?
              (X)HTML                                              WML
                                               <wml>
<html>
                                                <card id="index" title="Home Page">
 <head><title>Home Page</title></head>
                                                 <p align="left">
 <body>                                           <i>Main Menu</i><br />
  <p align=“left”>                                <a href="#title">Title Page</a><br />
   <i>Main Menu</i><br />                         <a href="#myPage">My Page</a><br />
   <a href=“title.html”>Title Page</a><br />     </p>
   <a href=“myPage.html”>My Page</a><br />      </card>
  </p>
 </body>                                        <card id="title" title="My Title Page">
</html>                                          Welcome to my Title Page!<br />
                                                 So happy to see you.
                                                </card>
     (And other HTML pages…)
                                                <card id="myPage" title="Hello World">
                                                 <p align="center">
                                                  Hello World!
                                                 </p>
                                                </card>
                                               </wml>
Constraints Drive Wireless
Application Architectures
• Constraints of current environment
   –   Bandwidth -19,200 is max speed today (improving)
   –   Screen Size - fewer than 7 rows, 14 characters
   –   Keyboard - just 0-9 + menu options
   –   Processing power - batteries / chips not optimized
• Implications
   –   Server side logic – minimize data xfer, client processing
   –   Screen sensitive – specialized menus, reduced content
   –   Context sensitive / Personalized – desirable & relevant
   –   Actionable applications – workflow driven
What Wireless XML Technology is
Coming?
• VoiceXML
  – 2 billion rotary phones can’t be wrong
  – Approved by the W3C 05/2000
• J2ME
  –   Every major cellular handset mfg will release on in Q4
  –   Palm, Handspring, and RIM
  –   No UI failure resulting from incompatible gateways!
  –   Simple XML datasets over HTTP
• XHTML-Basic
  – The new protocol for WAP 2.0 in 2001
  – The new protocol for i-mode 3.0 in 2001
  – See the W3C now for final review
            Open Source Wireless
            Application Solutions
• Apache Cocoon                   • Enhydra
  – Web Publishing Framework        – Java/XML Application Server
  – Specific Needs                  – General Needs
      • Dynamic translation of          • Servlets/JSP/Security/Mgmt/
        XML to *ML                        Database Access/Scalability
  – Excellent File Serving          – Excellent Overall Performance
    Performance                     – Commercial Support (through
  – No Commercial Support             Lutris)
  – Excellent concepts that may
    become future products
Lutris Enhydra Wireless Device Support


     VoiceXML      SMS     WML/Java   HTML/Java C++/Java/HTML
                   Pager    cHTML


  • VoiceXML provides access by any user via any phone in any
    geographic location – existing infrastructure play
  • SMS/Pager support allows for any network’s notification/alert
    mechanism – existing infrastructure play
  • WML/cHTML/Java support allows for support of any mobile data
    standard [WAP, iMODE, MIDp, etc.] – emerging play
  • C++/Java/HTML support for industrial devices – emerging play
Enhydra Momentum
• #1 Java/XML Open Source Application Server
   – 85,000+ Downloads
   – 10s of thousands of copies distributed by SCO, HP, SUN, RedHat
   – 3,000 Contributing Developers
   – Enhydra Key for Wireless Internet Applications
• Product & Distribution Partnerships
   – RedHat, TurboLinux, VA Linux, SuSE, Sun, IBM, HP, SCO, eLinux
• Technology Collaboration Partners
   –   Intel IA64 - 64-bit porting resources to Win2k-64, Monterey, Linux64
   –   BullSoft & France Telecom: Enterprise Java Bean / CORBA projects
   –   Apache/Xerces & Tomcat: XML Parser, Servlet 2.2/JSP 1.1
   –   Cygnus, Inprise JBuilder, Sun/Forte for Java, WAPtor, WinWAP,
       Yospace
 Role of Application Servers For
 Wireless
                                 Browsers             Wireless Devices
• Application servers
                                Static Content      Dynamic Content
  turn web sites into
                                 Complete Open Source Platform
  Internet applications
                                Web                         App Servers

• They allow for               Servers                      (Enhydra*)

                                                   Back-End Connectivity
  dynamic, interactive        Databases

  applications                   Legacy Systems               E-Commerce
                                                                Systems
• They implement                                 Back-End
                                                  Systems
  “business” logic in
                          * Enhydra runs over any operating system that
  the Internet              supports Java (Linux, NT, Windows, Solaris,
                            Macintosh, AS/400, HP/UX, etc.).
 Enhydra
• Scaleable, robust, proven
  Java application server
• Leading features in key
  areas:
   – Management
   – Wireless
   – XML
• "Lutris has created the
  perfect marriage of
  openness and commercial
  requirements for
  reliability, standards
  compliance, and support.”
   – InfoWorld, April 10, 2000
Wireless Solutions – Room33

•The Need: Build a wireless
solutions portal – email,
weather, stocks, calendar,
entertainment, etc. directly to
your cell phone – in 20
languages!

•Why Enhydra?: Cost to
deploy, community support,
wireless application support,
multi-language support,
extensibility, quick bug
resolution, upgradeability/cost
Wireless Application Development

     A Practical Discussion
Key Wireless Application Concepts
• Provide HTML views for heavy duty data entry,
  and allow the Wireless views to make use of
  preference settings created in the HTML session
• Cleanly separate all logical levels of your
  application
   – Presentation
   – Business
   – Data
• Plan ahead to de-couple all layers
Simple Tutorial – An Address Book
• Tutorial authored by Victor Brilon
   and edited by yours truly
• Is Open Source, so share it!
• Is easily extensible for other needs
   – it’s a simple database query app
      •   United’s flights and whether they’re on time
      •   Local restaurants [query by city & type]
      •   Local movies [query by city & time]
      •   Your UPS package, etc.
Sample Application Architecture



Client                                         Enhydra Server
                    WAP Gateway
 WML                                             Presentation
                     WML Encoder
 WML-     WSP/WTP                       HTTP
 Script               WMLScript                  Biz Logic
                       Compiler
 WTAI
                    Protocol Adapters            Data Logic
  Etc.




 Emulators simulate the two boxes on the left
How Does the Sample App Work?
• Simple Presentation Directories for WML and HTML
   – HTML and WML forms can be viewed in any text editor
   – Or download WAPtor from http://www.waptop.net/
• Business Logic Directory for requests
   – Use Sun’s command line tools in the JDK 1.2.2
   – Or download NetBeans/Forte For Java, an open source Java IDE, to
     view this source code and modify it
• Data Logic Directory for database access
   – The Data Object Design Studio that comes with Enhydra will create
     your data objects for you, visually
   – The database is InstantDB, an Open Source Java RDBMS
   – You can easily migrate the data into any JDBC database
The Data Layer
• Use DODS (Data Object Design Studio) to create
  data objects to encapsulate access to the database.
• Great introduction to DODS at:
  http://www.enhydra.org/software/documentation/enhydra/DODS.html
• DODS helps you generate DOs (Data Objects)
  through which you can access your Data Layer
• Focus on persistence and storage at this layer
The Business Layer
• Focus on business logic at this level.
   – Decision making processes.
   – Main workflow should be clear throughout this layer.


• Do not be tempted to put any presentation or data
  specific code into this layer.
The Presentation Layer
• This is the logical place in the program where you
  find out what kind of client is accessing the
  application.
• This is where you create unique presentations for
  different presentation technologies [WML,
  HTML, VoiceXML, etc.]
• The decision as to which content to serve this
  client should be made by a business class and
  delivered to the presentation layer.
Instrumental in Authoring the
Wireless Presentation is XMLC
• Learned key lessons from hands-on use of JSP
   – Embedding Java in HTML is a kludge
       • HTML and Java are incompatible languages
       • A 100% object-oriented application architecture is not possible
   – Leads to unmaintainable application presentations
   – Assumes browser-only display device
   – Required HTML designers to become too technical and too
     dependent on Java developers
       • Awkward handcuffs to project schedules
• Lutris Consulting Services needed a way to build
  maintainable Web applications
• …while allowing HTML designers to be designers and
  Java developers to be developers
When Did Lutris add Wireless Support?
• We didn’t! - The Open Source Community did!
   – Room 33 in Sweden
   – DigitalSesame in Taiwan
• A requirement born out of worldwide demand
   – Wireless market is advanced in Europe, Taiwan
   – Open Source community members leveraged Open Source
     Enhydra and Enhydra XMLC to add support for Wireless
     presentations…
   – …Then contributed the feature enhancements (a la source code)
     back to Enhydra.org
• Validation of the Open Source model
   – Features driven by real world requirements, not marketing
     requirements documents.
Enhydra XMLC Open Source Elements
 • XML – more than just data transport
    – Defined by W3C
    – Foundation for evolving standards, e.g. VoiceXML, WML, xHTML
 • DOM – Document Object Model
    – Defined by W3C
    – How a program stores an XML/HTML document in memory
    – A hierarchical representation of an XML/HTML document as represented
      in a software programming language, e.g. Java
    – Library for traversing, pruning, accessing portions of the DOM “tree”
 • XML Parser (from Apache Xerces Project)
    – Translating an XML text file into a Java DOM tree in memory.
Enhydra Development Process

• Typical development steps involve:
   •   Create database schema
   •   Create data access objects
   •   Create business objects
   •   Create presentation objects
                                       Dynamic
        • One set per UI device
                                        HTML




                                       Dynamic
                                        WML
Wireless Example Application

• Goal:
  Display rows from a SQL query to an RDBMS on a cell phone
• Objects:                                          Enhydra Multiserver


  –   Application:    Demo.java
  –   Data:           PersonDO.java
  –   Business:       Phonemanager.java
                                   HTTP Request

  –   Presentation:   Index.java       WML Result

  –   Presentation:   Index_wml.java



                                      Example Java code…
Example Code: Index.html

<html>
  <head>
    <title>
       Search for a name in the phone book
    </title>
    <!-- Changed by: Victor Brilon, 11-May-2000 -->
    </head>
  <body>
                                                       + XMLC
    <form method="POST" action="Searchhtml.po">
       Enter a first name and/or a last name to search for<br>
       First Name: <input type="text" name="firstName"><br>
       Last Name: <input type="text" name="lastName"><br>
       <input type="submit">
    </form>
  </body>
</html>


                                        = IndexHTML.java
                                              (DOM)
Our Code Under HTML is the Same
Example Code: Index.wml
<?xml version="1.0"?>
 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
 "http://www.wapforum.org/DTD/wml_1.1.xml">
 <!-- Source Generated by WML Deck Decoder -->
  <wml>
   <card id="search" title="Phone Search">
     <p>
         First Name:
        <input name="firstName" title="First Name"/>
                                                       + XMLC
         Last Name:
        <input name="lastName" title="Last Name"/>
     </p>
     <do label="Confirm" type="accept">
        <go

href="/Searchwml.po?firstName=$(firstName:escape)&amp;lastName=$(lastNa
me:es
 cape)" method="get"/>
      </do>
   </card>                             = IndexWML.java
  </wml>                                     (DOM)
   Write Once, Test EVERYWHERE…

No app title


Breaks up page
by input fields

Menu missing

7 lines of real-
estate vs. 4…


Right menu not
always under
developer
control
Installing / Configuring
•   Install Enhydra [www.enhydra.org]
•   Install JBF / Forte / emacs as the IDE [www.sun.com]
•   Install phone emulators [www.yospace.com]
•   Install the sample tutorial [wireless.zip]
•   Follow the “QuickStart” guide

• Then, configure
    – Config.mk in the \enhydra3.0.1\examples\..\demo directory to
      point to your installation directory
    – Make the project
    – Start the sample app in the \output directory
    – View the app in your emulator http://localhost:9000/
  Resources:
www.enhydra.org
      Keith Bigelow
    Lutris Technologies
Keith.Bigelow@Lutris.com

								
To top