Comments
bruce.armstrong wrote: Somebody just said it better than I did, and with more chops to say it: Open Letter to Mark Zuckerberg, Sheryl Sandberg & Facebook Mobile
Cloud Expo on Google News


2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
SYS-CON.TV
Top Links You Must Click On


WebSphere Portal Mobile Access Portlets for WAP Devices
WebSphere Portal Mobile Access Portlets for WAP Devices

IBM's WebSphere Portal currently supports mobile devices by generating portal pages in three markup languages: HTML for desktop computers and some PDAs, WML for WAP devices, and cHTML for devices in the NTT DoCoMo i-mode network. This article focuses on portlet development for WAP devices, including a brief introduction to WAP and WML, and discusses various WAP emulators for portlet testing. The article's source code is not necessarily driven by best practices or performance considerations.

WAP and WML
WAP (Wireless Application Protocol) is a communication protocol designed for wireless devices just as HTTP is for desktop Web browsers. WML (Wireless Markup Language) is a markup language for wireless device microbrowsers as HTML is for browsers on desktop computers. WML content is read and interpreted by a microbrowser built into the WAP device. WML is similar to HTML, but less forgiving because it was designed using XML as a base.

Decks are WML documents and each deck consists of one or more cards. Decks begin with the <wml> and end with the </wml> tag, and cards begin with the <card> and end with the </card> tag. The WAP device's microbrowser reads the whole deck while accessing it in order to navigate its cards without having to load more data. Once a deck is loaded, the cards inside the deck remain in the WML microbrowser's memory until the browser is asked to reload the whole deck. Listing 1 (Listings for this article can be found at www.sys con.com/websphere/sourcec.cfm) will give you a taste of WML and WAP devices; Figure 1 shows the output on a RIM BlackBerry device.

Mobile Access Portlets for WAP Devices
Now that you have an understanding of WAP and WML, we're ready to develop the following portlets:

  • Personal bookmark-setting
  • WAP URL surfing
  • XML and XSLT
  • User-agent displaying
Personal Bookmark-Setting Portlet
The personal bookmark-setting portlet can configure an unlimited number of bookmarks to be inserted and deleted, for example, to the portlet deployment descriptor (portlet.xml) file. To develop the portlet, you need to understand the WML <anchor> tag. A WML card can be set up to display WML's anchor functions. The <anchor> tag always has a specified task ("go," "prev," or "refresh") that defines what should be done when the user selects the link. In the example shown in Listing 2, when the user selects the "Die Bahn" link, the task goes to http://wap.bahn.de.

Note that I'm using the Bookmark-Portlet_04.java example described in the Portlet Development Guide, Introduction to the Portlet API (see the references section). The portlet deployment descriptor is shown in Listing 3 - I've slightly modified the program for WAP device support application; the modified portion appears in bold type. Listing 4 shows the source portlet WAPBookmarkPort-let_04.java. The output is shown in Figure 2.

WAP Site Surfing on the Internet
The WAP URL surfing portlet provides unrestricted WAP site surfing. The user enters any URL of a WAP site. Once the portlet accesses the first page of an external WAP site, consequent links will work as long as the subsequent WML pages are well formed. You can arrange the predefined site with the bookmark-setting portlet. In addition to the following code, see Listings 5 and 6.

<jsp:useBean id="url"
class="java.lang.String" scope="request"/>
<p>
<anchor><go
href="http://<%=url%>"/>
http://<%=url%></anchor>
<br/>
</p>
The output is shown in Figure 3.

XML Access URL Portlet
The XML access URL portlet can access an external site that produces XML content. Using stylesheets, the same XML content can be displayed in a variety of formats applicable for different browsers and devices. This way, a single content source can be used to create content in different formats, such as WML, cHTML, and HTML (see Listings 7 and 8). In this case, you don't have to keep multiple content sources based on different markup languages. In this example the XML content will be applied by an XSLT stylesheet and converted to WML. Note that although I use the FlightInfo.xml and FlightInfoFor-WML.xsl files (see Listings 9 and 10) as provided by the WebSphere Transcoding Publisher, I developed the other necessary source code using XML and XSL stylesheets. The portlet will use the following XML and XSLT sources:

  • XML URL: http://home.nc.rr.com/sungik/flightinfo.xml

  • XSLT URL : Inside the portlet

    The output displayed by the different devices is shown in Figure 4.

    Portlet Displaying User-Agent Values
    A client device with a specific browser sends the user-agent value to the Web server when requesting a Web page. Since WAP devices vary in capability and features such as image support, deck size, and color support, the Web server can use the user-agent value to decipher the specific browser and device making a request, then adjust the content accordingly. Please refer to www.thewirelessfaq.com/useragents.asp for the user-agent values of different devices. The portlet shown in Listing 11 will display the user-agent value to your specific device. Figure 5 shows the output displayed by Nokia and Openwave devices.

    Mobile Access Portlets by PDA
    To access the WAP portal site using Palm devices, use the Blazer Palm browser, which supports multiple Internet standard protocols including HTML, cHTML, and WML. The AnywhereYouGo.com WAP browser by 4thPass is also good for viewing WAP-enabled sites from any mobile device running the Palm OS. To access the WAP portal site using PocketPC or Win CE devices, use the Klondike WAP Browser. Please refer to the reference section for information on downloading these browsers.

    WAP device emulators are software programs that simulate WAP devices on your desktop computer (see Figure 6). The following work well with the IBM WebSphere Portal portlets developed for WAP devices:

  • Nokia Tool: http://forum.nokia.com/main.html. Select Programs -> Nokia Mobile Internet Toolkit -> Mobile Internet Toolkit.

  • OpenWave SDK WAP Edition 5.0, 22.5 MEG: http://developer.openwave.com.

  • Klondike WAP Browser: www.apachesoftware.com/download_kwpe.html.

  • Yahoo Germany: http://de.mobile.yahoo.com.

    Conclusion
    WAP's popularity arises from the fact that it's been adopted and supported by major computing and communications industry players. IBM WebSphere Portal provides developers with the environment to develop WAP applications and build portal Web sites for wireless use. You can develop simple portlets to handle WAP devices and test their outcomes by using various WAP device emulators.

    References
    IBM products referenced here:

  • WebSphere Portal: www-3.ibm.com/software/webservers/portal.

  • WebSphere Transcoding Publisher: www.ibm.com/software/webservers/transcoding.

    SIDEBAR
    FOR MORE INFORMATION

  • "Portlet Development Guide, Introduction to the Portlet API": www-3.ibm.com/software/webservers/portal/doc/ PortletDevelopmentGuide.doc.

  • Nokia WAP Toolkit: www.nokia.com/corporate/wap/sdk.html.

  • Palm OS 3.1 Emulator: www.palmos.com/dev/tools/emulator.

  • Openwave SDK WAP Edition: (http://updev.phone.com)

  • Klondike WAP Browser: www.apachesoftware.com/download.html.

  • Blazer Palm Browser: www.handspring.com/software/blazer_overview.jhtml.

  • The AnywhereYou Go.com WAP browser, powered by 4thPass: www.anywhereyougo.com/images/palm35.zip.

  • Yahoo Germany: http://de.mobile.yahoo.com.

  • "WebSphere Solutions for XML, XSL Stylesheet, and Transcoding for Web Application Data Accessible by Various Devices": www7b.boulder.ibm.com/wsdd/techjournal/0111_son/son.html.
    About Sung Ik Son
    Sung-Ik Son is a Senior Software Engineer in the Application and Integration Middleware division of the IBM Raleigh Lab. He has been a key developer for more than 12 years in IBM's system and application software development organizations, and has worked for the past three years on the WebSphere Enablement and Consulting team. He holds a B.S. in Computer Science from the University of New Brunswick in Canada and an M.S. in Computer Science from Purdue University. Sung-Ik is a co-author of the IBM Redbook, WebSphere V3.5 Handbook (SG24-6161-00).

  • In order to post a comment you need to be registered and logged in.

    Register | Sign-in

    Reader Feedback: Page 1 of 1

    Enterprise Open Source Magazine Latest Stories . . .
    Before embarking on using open source cloud technology for your web property, a basic understanding of cloud, as it’s used in the industry, is essential. While there might be exceptions, here are the definitions. A software application delivered on the web instead of installing standa...
    Businesses today generate billions of events or 100s of TBs of data in a month. These data contain valuable insights into customer behavior, key trends, buying patterns, etc. If these are successfully mined, they can lead to successful decision-making to maximize revenue and traffic fo...
    Grid Dynamics, an eCommerce technology solutions company, and GridGain Systems, makers of an open source in-memory platform for Big Data processing, on Wednesday announced the expansion of their partnership which began in 2008. Grid Dynamics provides personalization and big data solut...
    Private clouds solve many problems for enterprises and bring unique operational challenges along with them. There are dozens of companies of all sizes that will build you a private cloud and turn over the keys – then what? Trying to convert a traditional enterprise IT operations team t...
    The networking industry has gone through different waves over last 30+ years. In the ’80s, the first wave was all about connecting and sharing; how to connect a computer to other peripheral devices and other computers. There were many players who developed technology and services to ad...
    If your organization already uses virtualized infrastructure, you are well on your way to providing IT as a Service. But as businesses demand faster results in today’s competitive market, organizations look to gain more benefits from cloud computing than just virtualized infrastructure...
    Subscribe to the World's Most Powerful Newsletters
    Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
    Click to Add our RSS Feeds to the Service of Your Choice:
    Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
    myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
    Publish Your Article! Please send it to editorial(at)sys-con.com!

    Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


    SYS-CON Featured Whitepapers
    ADS BY GOOGLE