Welcome!

Ajit Jaokar

Subscribe to Ajit Jaokar: eMailAlertsEmail Alerts
Get Ajit Jaokar via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: RIA Developer's Journal, iPhone Developer, XML Magazine, OpenAjax Alliance News

RIA & Ajax: Article

Mobile AJAX - Frequently Asked Questions

The first Rich FAQ we are presenting is the long overdue Mobile AJAX FAQ

Q: How can you develop for and test on all those browsers?
A.
Much in the same way you develop for the Web today: use Web standards, then find a good reference browser (Opera Mobile, Nokia s60, Internet Explorer Mobile, etc.) and use it constantly throughout development. To maximize compatibility, plan to build a normal mobile Website (without AJAX) and progressively enhance it with AJAX as required. Test the site or application on basic phones (WAP 2.0, XHTML-MP - no DOM/XHR) to be sure it works for existing non- AJAX capable browsers.

Q: What are the (current) hurdles in implementing and running Mobile AJAX applications?
A.
The biggest obstacle is the same as on the desktop: browser support. With more browsers than on the desktop and bigger differences in their support for Web standards and technologies required by AJAX, this poses a real problem and has kept many developers from going any further than initial tests.
Another technical problem is HTTP latency. Loading only parts of the Website in a mobile Web application can take as long as loading the whole page (still traffic and rendering time in the browser will be smaller). This varies from one connection type to the other and can also be influenced by the carrier's implementation of their proxy.

Also power consumption and battery drainage of AJAX applications can be an issue. If an AJAX application constantly connects to a Web resource, e.g., to check for new data, this will not only drain the phone's battery heavily, but may also incur expensive data fees for some users. So AJAX functionality has to be applied in a responsible and meaningful way, especially in applications running on mobile devices.

Mobile AJAX and Mobile Widgets, while showing a lot of promise, are still currently geared toward simple tasks and applications.

Q: What are AHAH / AJAH?
A.
The desktop computer has much more memory and CPU power as well as different means to input data into the application. Mobile AJAX has to work on resource constrained devices and browsers, so typically most desktop AJAX libraries cannot be used on mobile browsers. Instead of sending and manipulating raw XML on constrained devices, it makes a lot of sense to leave the manipulation of XML to the server and send only XHTML to the client.

This technique, while very similar to AJAX is often called AHAH - Asynchronous HTML, and HTTP - or AJAH - (HTML instead of XML). Fundamentally both methods do not transport XML, but pre-rendered HTML or XHTML, and avoid having to process XML data on the client, which can be a very battery- and CPU-intensive operation.

Q: Is there any standardization initiative for AJAX?
A.
While not a standards body, the OpenAjax Alliance is bringing different players in the industry together (and this also includes Mobile AJAX).

Feedback Requests and Enhancements
We welcome feedback and enhancements requests. If your company is doing some interesting work in this space, we can consider adding it to this FAQ. Please contact ajit.jaokar at futuretext.com for any suggestions.

Acknowledgments
We would like to acknowledge the work of the following people/groups: Eli Dickinson, editor, FierceDeveloper, C Enrique Ortiz, Daniel K. Appelquist, and The OpenAjax Alliance

More Stories By Ajit Jaokar

Ajit Jaokar is the author of the book 'Mobile Web 2.0' and is also a member of the Web2.0 workgroup. Currently, he plays an advisory role to a number of mobile start-ups in the UK and Scandinavia. He also works with the government and trade missions of a number of countries including South Korea and Ireland. He is a regular speaker at SYS-CON events including AJAXWorld Conference & Expo.

Comments (2)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.