views:

91

answers:

1

Hi all,

This may seem like a basic/stupid/obviously-answered question, but I wanted to check: why use a mobile-oriented javascript library (e.g. jqtouch) instead of straight jquery?

The context:

We're looking at enriching the mobile-view of our web-app. I tried the various jqtouch demos on my android 2.1 (Motorola droid). Many of the UI "feature" demos failed (e.g. animation), though the demo applications (todo and world clock) worked very well.

Similarly, I tested the "full" version of our web-app using the same phone. This 'full-version' downloads a boat-load of javascript including full jquery 1.3.2. The site worked pretty well (including ajax gets and posts) and didn't feel too terribly slow. (Caveat: I had to download the full site, then pinch-to-zoom so I could read the text. This added a lot of overhead.)

The Questions

So, I ask these "obvious" questions:

  • What are the downsides of including the basic jquery library, ? i.e. and using standard html/css to render ui (i.e. rather than jqueryui or jqtouch). Assumption: users are fine with a 'standard html' web app and do not need/want the look-and-feel like a 'native' application.

  • If I understand correctly, jqtouch's main benefits include: -smaller .js file size -nicer UI widgets. Please set me straight.

  • From the "in theory communism works" department, I assumed that "large .js size" would not cause a problem as the mobile-browser would cache it. (i.e. download big 120Kb file once, then use it forever-and-ever). Rumour has it, however, that on the i-phone a big file will push out other cache entries..so the browser may indeed have to re-download the big.js file each time. What's the lowdown on mobile browser caching of .js files?

  • Can anyone comment on cross-browser (android/blackberry) downsides of current (august 2010) mobile libraries? From what I see, the purpose-built-for-webkit jqtouch does not play nicely with modern blackberry browsers.

thanks

bill

+2  A: 

jqTouch is a jQuery plugin. So you include the standard jQuery with or without it. So your JS is bigger, not smaller. jQuery (as opposed to jQuery UI) includes no UI widgets. jqTouch has widgets which look more "native" on a mobile device. I can't comment on Blackberry.

Note that there is a mobile-optimized version of jQuery planned for later this year.

Craig Stuntz