Asif Shahzad has posted 2 posts at DZone. View Full User Profile

Mobile Website Development with WAP 2.0

12.09.2008
| 13112 views |
  • submit to reddit

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
Published at DZone with permission of its author, Asif Shahzad Ch..

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Tahir Akram replied on Tue, 2008/12/09 - 2:27pm

Informative article on WAP2.0. I got informed about it now.

Just a question: Those mobile who supports xHTML so if the WAP version of that site didnt exists how they format the gigantic HTML contents for small mobile screen. Well I am sorry I didnt have tested this thing myself. Or I need to more information about my question itself?

 Thanks.

Asif Shahzad Ch. replied on Mon, 2008/12/15 - 6:58am

Thank you so much for your comments.

Basically the devices that support XHTML-MP look for specific header, and parse the document when the header exist. Othewise they can throw some error. In the case of XHTML-MP supported device, such header is: 

<?xml version="1.0"?>

<!DOCTYPE html      
<?xml version="1.0"?>    
 <!DOCTYPE html          
 PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"         
  "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">     
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 

For other devices, the above header may not be required. For example the mobile device which support CHTML doest not require this header (and even any header). And for others there can different header required, for example when your mobile device support WML, it expect to see:

 <?xml version="1.0"?>
<!DOCTYPE wml PUBLIC  
 "-//WAPFORUM//DTD WML 1.1//EN"   
 "http://www.wapforum.org/DTD/wml_1.1.xml"> 
 

You might think it is difficult to develop and maintain WAP application with so much diverse supported mobile devices. The good thing is there is nothing like that, it is easy. I will explain some frameworks in next articles which helps us to generate the header and the body content according to user-agent (i.e. type of mobile device) which have requrested the contents, and add the appropriate header dynamically at run time. You can also select specific set of device to support (e.g. only mobile which support xhtml-mp) if you dont want to be so diverse. For your further study, check Mobile JSF and WURFL frameworks.

And as far as "gigantic HTML content" is concern, basically we know that for what mobile devices we are developing the WAP application. So we put the contents accordingly to that (e.g. mobile device resolution, memory parameters etc).

Jose Maria Arranz replied on Wed, 2008/12/10 - 4:26am

Don't hesitate but your article seems to be a bit outdated, WAP is dead, today mobile browsers are almost so capable as desktop counterparts including JavaScript, of course with some limitations.

Nokia Mobile Browser Simulator is a 2003 based technology we are on 2008 and OpenWave has abandoned the web mobile world some years ago.

Today mobile browsers are:

- Pocket Internet Explorer 6 (Windows Mobile 6)

- Internet Explorer Mobile 6 (WM 6.1.4) not devices yet. Engine is based on MSIE 6

- NetFront 3.4 and 3.5 (included on some Sony Ericsson mobile phones, PSP and PS3).

- Opera Mini 4.1 : backed by Opera 9 in the server. Opera Mini can be installed virtually in any phone.

- Opera Mobile 8.6+ based on Opera 8

- Opera Mobible 9.5 using the same engine as Opera 9  

- iPhone: based on WebKit the engine of Safari

- Android: based on WebKit

- S60WebKit (S60 3rd and S40 6th Nokia phones): based on WebKit

- BlackBerry Bold and Storm: now including AJAX.

- Fennec (FireFox Mobile): based on FireFox engine.

- SkyFire: backed by FireFox 2 in the server.

- Iris Browser: based on WebKit

- QtWebKit: based on WebKit

All of them (not including Pocket Internet Explorer) can render almost any desktop oriented web page, of course with some problems. Let me explain, this is the objective of these mobile browsers, left behind the mobile profiles.

Try all of them with this AJAX (demo) application developed with ItsNat and designed for desktop browsers, it works too with almost all of these mobile browsers.

 

Asif Shahzad Ch. replied on Wed, 2008/12/10 - 8:00am

Thanks for your comments. Yes, you are right that the mobile browsing had been so advance. And there are devices (with such browsers that) support xhtml even with AJAX. Definitely, XHTML based mobile devices are much better than those which only support XHTML-MP or WML.

I would like to say, in the article I didnt said that WAP 2.0 is technology of 2008, but just explained the differences between WAP 1.x and WAP 2.0, and what advantage we get using WAP 2.0 over WAP 1.x. 

And (the most of browsers) you written as examples ships with relatively expensive sets. And the generally available sets are still very limited in screen resolution and memory and can't support the extremely content rich HTML pages, thats why we must take care of these parameters while devleloping WAP applications. And even there are a lot of mobile sets still which support XHTML-MP and not just XHTML.

So I don't think the WAP (specifically the mobile profiles concept) is dead. Yes we can say, as we are moving ahead, its importance may decrease (as there are very few who are using WML only). I would say the large and active user base of WURFL framework is good example of how the mobile profiles are still there and effecting the WAP applications development. I am personally using WURFL for a WAP CMS project. The latest release of Mobile Front Controller (by Ericsson) also support XHTML-MP.

I have not checked the Mobile JSF architecture, but surely it must also be compatile with different mobile profiles and XHTML in general too (as Mobile JSF is recently initiated by Erricsson and in incubation yet at java.net community).

 

Jose Maria Arranz replied on Wed, 2008/12/10 - 9:46am

I agree with you most of them are deployed on expensive phones, in spite of this there are some interesting facts:

- Almost only people with smartphones use web (BlackBerry, iPhone, Windows Mobile devices, high end Nokia phones...).

- Opera Mini can run virtually in any phone, this browser is basically a viewer of a Opera 9.x in Opera's server.

- NetFront 3.4 runs almost in any Sony Ericsson phone. NetFront is not the best browser but is capable.

Yes, WAP is not dead but is going to die in anytime soon. This doesn't avoid the need of web sites developed specifically for mobile, because as you say there are limitations on memory and screen resolution (and speed in the case of JavaScript intensive applications) but these limitations are not going to be a matter of standards.

 

Jose Maria Arranz replied on Wed, 2008/12/10 - 10:00am

Sorry, I mean "NetFront 3.4 is included almost in any Sony Ericsson phone"

All of browsers listed support JavaScript and AJAX.

Asif: "Mobile JSF is recently initiated by Erricsson and in incubation yet at java.net community"

And discontinued by Ericsson.

 

Asif Shahzad Ch. replied on Thu, 2008/12/11 - 2:01am in response to: Jose Maria Arranz

Yes, discontinued by Ericsson because it is now moved to java.net where one can contribute directly. And Yes, it was initiated by Ericsson some years back, whats wrong with it? Have a look at announcement.

I think now we are converging at common point, i.e. the WAP 2.0 XHTML-MP is decreasing its importance day by day because more and more high performance computing is available in mobile devices. As there are still a lot of sets of Nokia that support XHTML-MP, so we can't say it is dead. Yes, might be dead after 5-10 year.

Sergio Carabetta replied on Thu, 2008/12/11 - 4:18pm in response to: Jose Maria Arranz

José María, don't kill a technology (at least you finally admit it's not so dead yet) because you and your friends don't touch anything less capable than an iPhone. I found this article very useful for those of us mere mortals having to address humble non-Windows Mobile sets. And if we do our job right, more people will be able to browse and use mobile apps without having to invest in an expensive device.

That said, I look forward to read your Mobile Website Development with... (and get an excuse to buy my own iPhone)

 

Best regards,

Jose Maria Arranz replied on Fri, 2008/12/12 - 4:18am in response to: Sergio Carabetta

I don't have so much power to kill a technology :)

scarabetta: I found this article very useful for those of us mere mortals having to address humble non-Windows Mobile sets

Yes, most of listed browsers are for Windows Mobile however the following browsers aren't Windows Mobile specific:

* NetFront 3.x included in average mobile phones like Sony Ericsson and Samsung.

* Opera Mini runs almost in any phone

* Opera Mobile is included in some non-Windows Mobile phones (for instance UIQ based like Sony Ericsson).

* S60WebKit runs on Symbian based phones and Nokia has recently included WebKit in the newest S40 based phones (S40WebKit).

* Android, BlackBerry, iPhone ... of course not WM (yes I know they are very expensive).

* QtWebKit will be included in Nokia devices (Trolltech is owned by Nokia)

The mobile world is changing quickly.

scarabetta: because you and your friends don't touch anything less capable than an iPhone

I'm just talking as a "technologist", I'm showing some facts around mobile browsing, the same you currently ignores MSIE 5.x when you design a web site, WAP (and web without JavaScript in general) is going to be deprecated very soon.

 

Manuel Zubiria replied on Sat, 2011/09/03 - 12:01pm in response to: Jose Maria Arranz

Hey guys I would like to ask you if you know where I can develop a software for mobile devices that would work on multimedia phones as well as SmartPhones. Thank you very much in advance for you advice.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.