181 karma · joined June 1, 2009
Again, "such significant performance gains for our users" is just FUD when you're talking about arbitrary benchmarks. An app built using Forge and PhoneGap, providing the same functionality, with the same UI layer, would be a much better measure of that. I'd be happy to be proven wrong.
This is a silly benchmark - there is absolutely no reason you would put 1000 calls at once, sequential or parallel, across this sort of bridge in a real app. You probably shouldn't be calling any JavaScript API in a client-side app 1000 times at once.
The bridge in PhoneGap Android probably is slower than the one in Forge but
1) that's a tradeoff the PhoneGap devs were willing to make for wider compatibility, support for older devices, and isolation from the bizarre Android WebKit bugs that crop up in every release.
2) synthetic benchmarks aside, there's no indication this would affect the usability of the app.
Take the camera example in the article. A PhoneGap call (judging from the graphs) takes about 14ms, a Forge call about 3ms. That's for the entire round trip (JavaScript -> Native -> JavaScript), so divide each in half for each side of the trip.
With PhoneGap: * first half of the trip (7ms) * Android presents Camera activity, user picks a photo, Android returns control to original app (say, 500ms, very conservatively) * second half of the trip (7ms) = 514ms
With Forge: * first half of the trip (1.5ms) * Android presents Camera activity, user picks a photo, Android returns control to original app (500ms) * second half of the trip (1.5ms) = 503ms
This is much closer to a real-world use case - and the calls to native APIs entirely dominate the time spent on the bridge.
More knowledgable people than myself discuss it on this es-discuss thread: http://www.mail-archive.com/es-discuss@mozilla.org/msg06142....
There is a Harmony proposal for a "set prototype of operator" that would solve this problem; instead of writing:
var newObj = {__proto__: OldObject, id: 5}
You would write: var newObj = OldObject <| { id: 5 }
Detailed here:
http://wiki.ecmascript.org/doku.php?id=harmony:proto_operato...but chart.apis.google.com (which Google formerly used) does not: https://chart.apis.google.com/chart?chs=150x150&cht=qr...
Turns out I was looking at some outdated docs. Thanks!
[EDIT] I was mistaken, see andrewjshults's reply.
edit: oh, you probably mean the language name. Again, JavaScript is the correct formatting, even if it looks silly to most eyes.
At a lower level of abstractions are the middleware layers Connect http://github.com/extjs/Connect and JSGI http://github.com/kriszyp/jsgi-node
There are modules developed for most of the major open source databases (I'm not sure what the status of the async MySQL driver is, but there's definitely something you can use).
That's not really fair - there are plenty of very good motivations for writing (and reading) fiction other than immersion in a sustained imaginative world. By that criterion, "Avatar" is a better film than than, say, "Casablanca," because James Cameron knows more about the flora of Pandora than Michael Curtiz does about Morocco.
Adams is a great writer precisely because of his lack of pretension, his humility, and his irreverence -- I'd be disappointed if he didn't regard his own work with the same outlook he had for everything else.
Apple have been in touch with PhoneGap devs since and clarified the matter; there's a good blog post here regarding that: http://nachbaur.com/blog/updates-on-apple-phonegap
Since then Apple have had a much more informed stance towards PhoneGap and have approved lots of apps using the framework (there's a list on the PhoneGap site).
*full disclosure - I work for Nitobi, who sponsor PhoneGap's development. Though the original link suggests using PhoneGap in its preface, there are competing platforms, such as Rhodes and Appcelerator, that also get through to the App Store.