Welcome!

AJAX & REA Authors: John Funnell, Bob Little, Kevin Hoffman, Maureen O'Gara, Onkar Singh

Related Topics: AJAX & REA, Wireless, iPhone

AJAX & REA: 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) View Comments

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.


Most Recent Comments
Dennis Riddle 10/11/07 07:09:29 PM EDT

Great article! I have to list one caveat.

OperaMini does NOT support AJAX techniques. This is unfortunate as it is the only real browser available to the majority of phones in use today.

OperaMini 3 has no XHR support, and OperaMini 4 only supports XHR in synchronous transfer mode, making desktop-like effects that rely on async impossible.

After much hands-on research, the only platforms currently supporting AJAX are OperaMobile (available on most S60 phones and Windows Mobile), iPhone's Safari browser, and the Windows Mobile 6 version of IE.

Within the next year we can expect to see competition in this space from Firefox, as the Mozilla peeps are pushing hard to develop a fully-features mobile version. Expect to see it sometime after FireFox 3 is released.

Gautam 10/01/07 07:52:43 AM EDT

Looks good, i would say an excellent compilation.