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

The first Rich FAQ we are presenting is the long overdue Mobile Ajax FAQ and was created by Ajit Jaokar, Rocco Georgi and Bryan Rieger. We welcome comments and feedback.

Q: What is Mobile AJAX?
A.
AJAX is a browser technology that involves the use of existing Web standards and technologies (XML/XHTML, DOM, CSS, JavaScript, XHR - XMLHttpRequest) to create more responsive Web applications that reduce bandwidth usage by avoiding full page refreshes and providing a more "desktop application-like" user experience. The term AJAX was coined by Jesse James Garrett in his seminal document at Adaptive Path.

Applications created by AJAX are generally classed in the category of Rich Internet Applications (RIA).

Mobile AJAX is the extension of AJAX principles to the mobile environment, which includes other constrained devices such as gaming consoles or set-top boxes featuring Web browsers. While technologically the same thing, Mobile AJAX is looked at as a special case of AJAX, as it deals with problems specific to the mobile space including the areas of constrained devices and constrained Web browsers in general.

Q: Is there a Mobile AJAX checklist/minimum requirements?
A.
The mere existence of JavaScript in the browser is not enough. There has to be a clear distinction between JavaScript and Ajax support. There are many examples where a Web browser might very well support JavaScript, but may still be incapable of using AJAX techniques.

At a minimum, the requirements for Mobile AJAX include:

  • JavaScript support
  • XMLHttpRequest object or equivalent ActiveX (for IE only)
  • DOM manipulation functions or innerHTML support (to display request results)
Q: What does Mobile AJAX look like?
A.
On the one hand, Mobile AJAX will be transparent to the end user. For instance, all Nokia devices supporting the S60 and Opera browsers support AJAX - but that makes little difference to the end user. On the other hand, Widgets are enabled by Mobile AJAX. Thus, the visual (end user) manifestation of Mobile AJAX may be in the form of Widgets or rich browser-based applications such as we see on new Nokia phones or Opera browsers.

Q: Why should one do AJAX on mobile phones / what problem does it solve?
A.
The reasons to use AJAX are the same as those to use it on the desktop:

  • Better user experience without having to resort to proprietary runtime technologies.
  • Less data/bandwidth being consumed sending redundant wrapper code (page layout).
  • Using open standard Web technologies you are already familiar with means less training and a faster time-to-market.
  • Creation of simple, applications via Widgets
Q: What other options are there in addition to Mobile AJAX?
A.
In general almost any programming language and runtime (or virtual machine) can be used to achieve results comparable to those of Mobile AJAX techniques. The list of alternatives varies with the focus shifting to different features such as cross platform capability, open standards usage, development efforts, cost, and deployment methods, etc., depending on the vendor.

The following is a list of current alternatives to Mobile AJAX:

Java ME (J2ME)
Currently the most ubiquitous runtime available for mobile devices by far, but also the most fragmented in terms of feature and specification support between vendors and devices. Things are improving as many OEM vendors are investing heavily into making the Java "write-once-run-anywhere" dream on devices a possible future reality. The recent decision by Sun to open source Java may result in more capable and compatible versions down the road, and initiatives such as OpenLaszlo + Sun's 'Project Orbit', or JavaFx may enable developers more familiar with Web technologies (rather than mobile Java development) to deploy directly to Java-enabled devices in the future.

Flash Lite
Flash Lite is Adobe's ubiquitous runtime for the SWF format specifically designed for use on resource-constrained devices. While Flash may be installed on nearly all desktop and laptop computers today, it is currently only available on a small number of mobile devices, namely higher-end smartphones and PDAs.

Early releases of Flash Lite supported a very limited version of ActionScript, which proved frustrating to many developers. More recent releases are closely following the versions of Flash and ActionScript that are found in widespread use today on the Internet, this in turn is expected to increase developer interest in the use of the Flash Platform on devices.

Q: How do Flash Lite and Java compare with Mobile AJAX?
A.
Java often requires code variations for different devices and vendors, not to mention variations in the Java implementation itself (MIDP 1, 2, CLDC). These variations often allow Java applications to better take advantage of device hardware such as cameras, Bluetooth, and 3D graphics, but they fragment the implementation.

Flash doesn't typically require variations in code like Java, but may require variations in visual layout to provide an optimal user experience on varying devices. Newer versions of Flash Lite are working to minimize the additional visual layout work often required for varied screen sizes.

Mobile AJAX applications should work with the same code across varying devices and, through the use of cascading style sheets (CSS), the visual layout should adapt as required on a wide variety of devices. However, see limitations/hurdles of Mobile AJAX below.

Some browsers (Nokia S60) are expected to have plug-in support for Flash Lite in future releases. If such scenarios occur, Flash Lite could be used to complement Mobile AJAX applications in much the same way Flash and AJAX are often used together on the desktop Web.


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.