Windows Mobile, AJAX, and ASP.NET AJAX

You Can Take it With You

Syndication

News

  • Don't miss the next Windows Mobile Webcast... Unit Testing for Mobile Devices: http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032382824&EventCategory=4&culture=en-US&CountryCode=US.

I've recently developed a lot of interest in AJAX as it applies to Windows Mobile because I think they can make a great combination. The fit is pretty natural.

The Web makes exposing applications easy but traditional web pages can have difficulty on mobile devices due to the need to always exchange full web pages. With AJAX, one gets the ease of exposing an app on the web but with a substantial reduction in the amount of data exchanged over the network. Also, the user is at least somewhat shielded from the considerable network latency that can occur on mobile networks. Architected appropriately, AJAX-based Mobile web apps can even ride through brief losses in network connectivity.

I'm currently working on a webcast and a paper covering AJAX on Windows Mobile. The webcast, Building ASP.NET AJAX Applications for Windows Mobile, is scheduled for Wednesday 12-Sept-2007 at 11 AM PDT (2 PM EDT, 18:00 GMT). The paper should also come out around that same time or shortly after (paper has a longer editorial & publishing process).
To be completely honest, before starting the investigation for the paper/webcast, I didn't really have much experience in AJAX development so I find myself learning AJAX, how ASP.NET does AJAX, and how IE Mobile does AJAX all at the same time.

Given the very sparse information available on the nuances of AJAX within IE Mobile, this investigation is turning out to be quite an exercise in trial-and-error. Basically the process goes… write some code, run it, figure out why it didn't do what you expect, use Google/MSDN to find some more information, modify the code, run it, figure out why it didn't do what you expect… (basically lather-rinse-repeat).

As I work through the process of investigating AJAX on IE Mobile and preparing the paper/webcast, I'm definitely finding little things along the way that have been useful for me. Here's some of the first things I found that helped me - I hope you find them useful.

Telling IE Mobile to display script errors
Locate the registry key HKCU\Software\Microsoft\Internet Explorer\Main add a DWORD value named ShowScriptErrors with the value set to 1.

Allowing XMLHttpRequest to communicate to a domain different from the page's source
Locate the registry key HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3 and set the value named 1406 to 0.
Note that this one is really only useful during development or where you control the end-user devices

Difficulties with JSON requests to a domain different from the page's source
IE Mobile will not allow cross-domain JSON requests when the view is set to "One Column". Cross-domain JSON requests work fine when the view is set to "Fit to Screen" or "Desktop".
You can change the view setting interactively in IE Mobile by selecting Menu | View. I'm still working on how to change the view programmatically.

I imagine that many of you already know this stuff but a lot of it was new for me - hopefully it'll be helpful for others starting the process. I'll post some more AJAX-related hey-I-didn't-know-that stuff shortly.

Posted Aug 29 2007, 01:37 PM by jim-wilson

Comments

George Kapsambelis wrote re: Windows Mobile, AJAX, and ASP.NET AJAX
on 08-30-2007 6:15 AM
Jim, looking forward to the presentation and the paper. I just signed up!
Richard Jones wrote re: Windows Mobile, AJAX, and ASP.NET AJAX
on 08-30-2007 11:22 AM
I've been doing a whole bunch of mobile AJAX stuff of late on Pocket IE

Please check out my blog (mobile AJAX version at)
http://www.binaryrefinery.com/mobile

Full version
http://www.binaryrefinery.com

anothr user wrote Anothr feed track -Pluralsight Blogs
on 09-03-2007 7:36 PM
One new subscriber from Anothr Alerts

Add a Comment

(required)  
(optional)
(required)  
Remember Me?