View Full Version : Awesome MVC Tutorial (+ PhoneGap Integration) by James Pearce

Jeff Blake
27 Jan 2011, 1:30 PM
Hi everyone, I stumbled across this tutorial via google and it was gold. Unfortunately I was looking through the sencha site to see as to where one could possibly browse to it - and I couldnt figure out a way ... so I thought it's so good that I'm going to repost the link here in the hopes it helps folks build an MVC style Sencha Touch App.


29 Jan 2011, 10:52 PM
Have you managed to get it working? The article talks about PhoneGap 0.9.4 but I cannot find that anywhere. I have followed the instructions for downloading and creating the installer etc using the latest git clone but that appears to only be 0.9.3. I cannot get anything working unfortunately. I will keep plugging away, hopefully find the silly mistake of mine sooner rather than later!

3 Feb 2011, 6:09 PM
Had the same problem. Discovered that Phonegap 0.94 was scheduled to be released today (02/03/2011), but is delayed due to outstanding fixes.

8 Feb 2011, 12:09 AM
Get it here:

9 Feb 2011, 1:38 AM
This is a great tutorial, thanks so much.
It works perfectly on the simulator (iOS 4.2), but on my iPhone (iOS 4.2.1) the contacts are not showing up.
Perhaps the problem has to do with PhoneGap 0.9.4, which I downloaded from github and compiled it.
However, it works on the Simulator...

Thank you for helping me...

12 Feb 2011, 9:08 AM
Despite compiling and installing PhoneGap 0.9.4, I still can't get this to run on iPhone 4.3 or iOS Simulator 4.2.

It simply shows a blank screen.

Any help to get it to run will be appreciated.

18 Feb 2011, 12:17 PM
I've yet to get the PhoneGap 0.9.4 code from github (next on my todo list), but I thought I'd mention a handy little tool I ran across (and had not seen mentioned anywhere here): Ripple (http://ripple.tinyhippos.com/) - it provides the only way I've seen to debug your js code in the "context" of the PhoneGap.js (it mimics the device resources to which phonegap provides access.)

18 Feb 2011, 5:40 PM
I think the older version of the phone gap were causing navigator.service.contacts.find(....) not to return the callback function.

Also, you need to make sure to close the xcode when installing the new version of the phone gap.

18 Feb 2011, 8:25 PM
I've managed to run the tutorial app after reinstalling PhoneGap and restarting the whole project from scratch while copy and pasting code from the examples.

BTW, I feel that the phonegap + sencha app is pretty slow when run on an actual iPhone (tested on iPhone 4). Not only is the animation sluggish, even the scrolling isn't smooth.

Is there a way to make it smoother? I've also disabled accelerometer and geolocation support by toggling the value on plist and also commenting out the related code on PhoneGap's source.

5 Nov 2011, 1:54 AM
Link points to old article, updated article can be found here:

r (http://www.sencha.com/learn/a-sencha-touch-mvc-application-with-phonegap/)gds