Over a million developers have joined DZone.
Platinum Partner

Mobile Website Development with WAP 2.0

· Java Zone

The Java Zone is brought to you in partnership with ZeroTurnaround. Discover how you can skip the build and redeploy process by using JRebel by ZeroTurnaround.

Earlier mobile websites were developed using WML and WMLScript. Developers were required to learn these languages to develop mobile websites. The acquired skill-set was useful only for mobile websites development (also called WAP applications), it was all based on WAP 1.x standard. WAP 2.0 introduced new languages, called XHTML-MP, WCSS and also remained backward compatible. Which means if one knows the HTML and CSS, he can now develop WAP applications easily.

Below I explain different concepts and terminologies to make you comfortable with WAP applications development. In general, this post describes Mobile Simulator, WAP Gateway, WAP 1.x and WAP 2.0 differences and its importance for WAP application developers.

Mobile Simulator is a software which simulate a mobile device. So, to develop WAP application you need to install mobile simulator on your computer so that you can view, test and debug WAP application during development. In addition to development ease, it enables you to view how your WAP application will look on mobile device.

In simple terms, WAP standard consists of WAP applications development languages and a set of communication protocols. For example, WAP 1.x consist of WML, WMLScript and uses WSP, WTP, WDP protocols, these protocols enables the mobile device to communicate with mobile company infrastructure. There is a protocol for security too, named WTLS.

WAP Gateway work as intermediary between the mobile device and a web server. WAP 2.0 has decreased the importance of WAP gateways. Why!, WAP Gateways are required for WAP applications written using WAP 1.x based languages (e.g. WML). WAP 1.x based mobiles do not understand XHTML, nor they implement TCP/IP stack, nor they can communicate with the web server directly. Then how they communicate with the web server! They communicate using WAP 1.x communication protocols to WAP Gateway located in mobile company. WAP gateway receives the requests from mobiles, communicate with the web server, and serve the contents back to mobile device in a format the mobile can understand.

WAP 2.0 based mobile devices can communicate directly with web server without using any gateway, so WAP 2.0 enables end-to-end HTTP. That is why audio and video streaming is now possible on mobiles devices. WAP 2.0 continue to support WAP 1.x development languages (e.g. WML) but introduced another language called Extensible Hyper Text Markup Language - Mobile Profile (XHTML-MP). Note that WAP gateways can still be used for performance optimization and security in WAP 2.0.

XHTML-MP is subset of XHTML and replaces the WML. XHTML-MP drops the tags and attributes of XHTML which do not make sense on mobile devices (e.g. mouse events related attributes). WAP 2.0 also defines WAP Cascading Style Sheet (WCSS), a subset of CSS which excludes the properties not required or feasible on mobiles devices.

In conclusion I would say, if you know the HTML only, you can develop the WAP applications. The things you need is a Simulator (e.g. Nokia Mobile Browser Simulator, Openwave Phone Simulator), a web server (e.g. Apache, IIS, or Tomcat), and your favorite IDE (or just Notepad). I will explain how different java frameworks can facilitate the WAP applications development in next articles.

Asif Shahzad's Blog

The Java Zone is brought to you in partnership with ZeroTurnaround. Discover how you can skip the build and redeploy process by using JRebel by ZeroTurnaround.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}