Transcript

XML and Open Source XML and Open Source Deliver Deliver

Device-Independent Device-Independent Dynamic ContentDynamic Content

Keith Bigelow

Lutris Technologies

Wireless I.T. 2000

Speaker HighlightsSpeaker 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

[email protected]

AgendaAgenda

• 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?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?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?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??Which Wireless Apps Will Be Home Runs??

Forrester 12/1999modified by Beaulieu 5/00

Open Source and Location Technology 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 So Why Build Wireless Apps With Open Source?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 ValueWireless 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 What Wireless Protocol for Europe/North America?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??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.

Source: Phone.com

Internet

Internet and WAP Technologies

HTMLJavaScript

HTTP

TLS - SSL

TCP/IPUDP/IP

Wireless Application Protocol

Wireless ApplicationEnvironment (WAE)

Session Layer (WSP)

Security Layer (WTLS)

Transport Layer (WDP)

Other Services andApplications

Transaction Layer (WTP)

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

Bearers:

What Is WML?What Is WML?

• WML is the Wireless Markup Language.

• Cards, Decks, and micro-views into the world– WML is about shoving

more into less.

– WML is about sending data to anticipate customer’s needs.

– WML is about being concise, not flashy.

Markup-isms

• HTML (Most Web – W3C)• DHTML (Some Web – W3C)• WML (Phone.com)• HDML (Phone.com proprietary

– broadest use today in the USA)

• cHTML (Phones in Japan)• XHTML (All Web – HTML

rewritten in XML)• XML (Anything)• And a host of others…

Is It Like HTML, or XML?Is It Like HTML, or XML?

(X)HTML<html>

<head><title>Home Page</title></head>

<body>

<p align=“left”>

<i>Main Menu</i><br />

<a href=“title.html”>Title Page</a><br />

<a href=“myPage.html”>My Page</a><br />

</p>

</body>

</html>

(And other HTML pages…)

WML<wml> <card id="index" title="Home Page"> <p align="left"> <i>Main Menu</i><br /> <a href="#title">Title Page</a><br /> <a href="#myPage">My Page</a><br /> </p> </card> <card id="title" title="My Title Page"> Welcome to my Title Page!<br /> So happy to see you. </card> <card id="myPage" title="Hello World"> <p align="center"> Hello World! </p> </card></wml>

Constraints Drive Wireless Constraints Drive Wireless Application ArchitecturesApplication 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 What Wireless XML Technology is Coming?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 Open Source Wireless Application SolutionsApplication Solutions

• Apache Cocoon– Web Publishing Framework

– Specific Needs• Dynamic translation of

XML to *ML

– Excellent File Serving Performance

– No Commercial Support

– Excellent concepts that may become future products

• Enhydra– Java/XML Application Server

– General Needs• Servlets/JSP/Security/Mgmt/

Database Access/Scalability

– Excellent Overall Performance

– Commercial Support (through Lutris)

Lutris Enhydra Wireless Device SupportLutris 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 MomentumEnhydra 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 Role of Application Servers For WirelessWireless

• Application servers turn web sites into Internet applications

• They allow for dynamic, interactive applications

• They implement “business” logic in the Internet

Browsers

Databases

Legacy Systems E-Commerce Systems

Back-End Systems

WebServers

App Servers(Enhydra*)

Back-End Connectivity

* Enhydra runs over any operating system that supports Java (Linux, NT, Windows, Solaris, Macintosh, AS/400, HP/UX, etc.).

Wireless Devices

Static Content Dynamic Content

Complete Open Source PlatformComplete Open Source Platform

EnhydraEnhydra• 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 – Room33Wireless 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 DevelopmentWireless Application Development

A Practical DiscussionA Practical Discussion

Key Wireless Application ConceptsKey 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 BookSimple 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.

Enhydra Server

Data Logic

WAP Gateway

WML Encoder

WMLScriptCompiler

Protocol Adapters

Client

WML

WML-Script

WTAI

Etc.

HTTPWSP/WTP

Sample Application ArchitectureSample Application Architecture

Biz Logic

Presentation

Emulators simulate the two boxes on the left

How Does the Sample App Work?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 LayerThe 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 LayerThe 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 LayerThe 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 Instrumental in Authoring the Wireless Presentation is XMLCWireless 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?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 ElementsEnhydra 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.

Dynamic

WML

Dynamic

WML

Enhydra Development ProcessEnhydra Development Process

• Typical development steps involve:• Create database schema

• Typical development steps involve:

• Create data access objects

• Typical development steps involve:

• Create business objects

• Typical development steps involve:

• Create presentation objects• One set per UI device

• Typical development steps involve:

Dynamic

HTML

Dynamic

HTML

Enhydra Multiserver

Wireless Example ApplicationWireless Example Application

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

• Objects:

– Application: Demo.java

– Data: PersonDO.java

– Business: Phonemanager.java

– Presentation: Index.javaHTTP Request

WML Result

Example Java code…

– Presentation: Index_wml.java

Example Code:Example Code:

<html> <head> <title> Search for a name in the phone book </title> <!-- Changed by: Victor Brilon, 11-May-2000 --> </head> <body> <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>

+ XMLC+ XMLC

Index.htmlIndex.html

= Index= IndexHTML.javaHTML.java(DOM)(DOM)

Our Code Under HTML is the SameOur Code Under HTML is the Same

Example Code:Example Code:

+ XMLC+ XMLC

Index.wmlIndex.wml

= Index= IndexWML.javaWML.java(DOM)(DOM)

<?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"/> Last Name: <input name="lastName" title="Last Name"/> </p> <do label="Confirm" type="accept"> <go href="/Searchwml.po?firstName=$(firstName:escape)&amp;lastName=$(lastName:es cape)" method="get"/> </do> </card> </wml>

Write Once, Test EVERYWHERE…Write Once, Test EVERYWHERE…

No app title

Breaks up pageby input fields

Menu missing

Right menu not always under developercontrol

7 lines of real-estate vs. 4…

Installing / ConfiguringInstalling / 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 BigelowLutris Technologies

[email protected]


Top Related