iPhone and Ajax: onpinch(), mac simulator, and Cringely
Written by on June 23rd, 2007 in Ajax News.
The iPhone Ajax buzz continues. Joe Hewitt (Firebug) writes about the new multi-touch events that he hopes show up:
I’ve read lots of people, while arguing for why iPhone web apps are lame, assert that web apps won’t be able to take advantage of the iPhone’s multi-touch screen. This is nonsense. I completely expect Apple to have extended Safari with new DOM events that allow any web page can respond to the variety of gestures the user can make with the touch screen and accelerometer.
Won’t it be fun to handle “ontilt” for when the user turns the phone from portrait to landscape mode, or “onpinch” for when the user pinches the page with multi-touch? Should the “onscroll” event include details about how fast the user dragged her finger, to indicate the speed to scroll? Developers are going to have a field day with this stuff. I am sure Apple has thought these things through and won’t let us down.
Robert Cringely has his opinion on iPhone and Ajax:
The iPhone absolutely needs AJAX applications for the phone to be a success on AT&T’s EDGE network. By pushing more functional logic into the browser, the bandwidth consumed per http round-trip is significantly reduced, making the phone apps faster and helping to justify that big price tag. The problem with this is that AJAX apps don’t always work the same (or at all) on every browser. The iPhone has real browser support, which is good, but remember AJAX is based on JavaScript, which in this case is not so good. JavaScript isn’t statically typed and each browser has its own version of JavaScript. Developers are typically forced to hand-code different versions of their AJAX apps for different browsers. With the AJAX economy dictating that browsers with big market share like IE and Firefox get most of the effort, that leaves Safari as a second-class browser and, potentially, a liability for the iPhone.
Bandwidth is one piece of the puzzle, but what about the cost of connections? If a connection across the network is painful (and I think it is!) then Ajax isn’t going to necessarily help, and can in fact become a hinderance if abused. Will the apps be so good to make you frustrated at the EDGE?
To get testing applications you can download iPhoney and simulate away. This is a Mac piece of software, but you can use the JavaScript version too.
Source: Ajaxian
Original Article: http://feeds.feedburner.com/~r/ajaxian/~3/127293681/iphone-and-ajax-onpinch-mac-simulator-and-cringely