Sam Croft

Full-stack developer

My article for Adobe's Appliness magazine: Loading data into, and posting data from, a PhoneGap app

  • 53 comments

Filed in: android, apps, Cordova, iOS, jQuery, JSON, MySQL, PhoneGap, php, Uncategorized, zepto

In September we tweeted a photo at RITH of a PhoneGap app we’d been working on. The photo showed the app running on quite a few iOS and Android phones and an iPad. One HTML5 app, running perfectly on many devices, all with different resolutions and pixel densities.

UniApp running on iPhone and Android phones and an iPad

Following a retweet by PhoneGap we were contacted by Adobe’s new magazine, Appliness, to see if we’d like to write an article for their October issue. I jumped at the chance.

(more…)

Posting data from a PhoneGap app to a server using jQuery

  • 187 comments

Filed in: android, forms, iOS, jQuery, MySQL, PhoneGap, php, Uncategorized

Recently I’ve had several requests to create an article about posting data to a server from a PhoneGap app so I thought I’d cover the steps I go through when dealing with this kind of requirement.

The method is extremely simple providing a few important steps are followed.

(more…)

Updated: loading external data into an iOS PhoneGap app using jQuery 1.5

  • 371 comments

Filed in: iOS, jQuery, JSON, MySQL, PhoneGap, php, Uncategorized

Update: Following the release of PhoneGap 1.0 and XCode 4 I have updated the Git repository to include a version built with PhoneGap 0.9x (the original version) and a separate version for PhoneGap 1.xx+.

Update: Due to some issues with the recent versions of Cordova I have updated the Git repository to also include a version built with Cordova 1.7.0.

My 2010 post about loading data into a PhoneGap application is by far the most viewed page of my blog so I thought I’d revisit it and write an article about a more efficient method I have been using, following the release of jQuery 1.5.

Previously I had been using the wonderful JSONp jQuery plugin because jQuery 1.4 and lower did not support out of the box error handlers for JSON requests. jQuery 1.5 does, however, and it’s made things simpler and more streamlined.

(more…)