Wednesday, October 19th, 2005

Ajax for Mobile Devices: MIL

Category: Editorial

Over on the Moblets blog they are talking about MIL as an option for ajax architectures on the mobile phone.

Moblet Instruction Language (MIL) is a declarative language that enables a developer to author a cross-platform mobile applications (a.k.a. Moblets) using only XML, Script, and XPath. MIL is compiled into byte-code by a hosted gateway server and delivered to any device capable of running the Moblet Runtime Environment (MRE). Data requests from a device can be defined synchronously or asynchronously using the <xmlservice> and <soapservcie> tags declarations. These services are invoke in response to events trigged by the system and the results are then “data-bound” to UI elements using an XPath expression syntax.

Where does the mobile world fit into Ajax? Can we rely on these devices “catching up” with their browsers? Or do we need to use technologies such as MIL? Is anyone doing mobile Ajax?

Posted by Dion Almaer at 4:46 am
3 Comments

+++--
3 rating from 6 votes

3 Comments »

Comments feed

I just finished a demo project where I had to port a couple of small applications, that used AJAX heavily, to Pocket PC’s. It wasn’t that hard once I realized that the ActiveX XMLHTTP object was available in the IE version runnning on them. It seems to be buggy, always called the onreadystatechange == 4 && status == 200 twice, but was easy to work around. I used the On-Demand Javascript pattern (see http://www.ajaxpatterns.org/On-Demand_Javascript#XMLHttpRequest-Based_On-Demand_Javascript ) so, I didn’t have to worry about parsing a lot of XML. Just send back a populated JS object and use it.

As far as Animation or even style changing, i.e. different background color based on weather impact, was a no go.

Comment by John Christopher — October 19, 2005

Hi John –

Thanks for sharing that experience. Glad to hear that you could encapsulte any differences and that it still made sense to use the app close to how it was, versus a rewrite of some kind.

Where there any latency issues?

Cheers,

Dion

Comment by Dion Almaer — October 19, 2005

Once I noticed that it was duplicating effort, updating data fields twice, and fixed that, the performance was actually pretty nice. This was all tested on a local wireless LAN or an ActiveSync connection share so, network connectivity wasn’t a big player.

I did notice that making sure that the request object and the JS object being eval()’ed were set to null after the current operation was over, which loops on a timer, made a big difference. Memory leaks are more apparent on these smaller devices especially since applications stay running, in the background, even after they are closed.

Comment by John Christopher — October 19, 2005

Leave a comment

You must be logged in to post a comment.