Trying out PhoneGap and Sencha with Eclipse on Ubuntu

Yesterday at work we discussed mobile app development on different platforms and technologies. Someone mentioned Sencha, which I hadn’t heard about before, so today I had to find out more 🙂
I came across the tutorial A Sencha Touch MVC application with PhoneGap, which I of course had to try out, despite the fact that it is marked as “hard” and I know very little about javascript and nothing about PhoneGap, and the tutorial is based on developing in xcode on a mac, I use eclipse in Ubuntu.
So here are some notes on what I did to get it to work on Ubuntu.
* I started with this list for getting started with PhoneGap
* When I wanted to install the ADT plugin in Eclipse I got an error saying “missing org.eclipse.wst.sse.core 0.0.0”. I then did the steps of post #7 here which did the magic.
* After all the installing I continued with the “Hello World”-example here, which also gives a good setup for following the Sencha tutorial. (One might name the project Contacts right away)
* I happily continued with the Sencha tutorial for a while, copy-pasting code and getting the folder structure as described. But after a while the need to test the app on a real device emerged.
* So to get my Samsung galaxy to communicate with the computer I first put the phone in developement mode in settings -> Programs -> Development, and then I did the story described in this forum post, and restarted eclipse, and then suddenly, the app ran on the phone rather than on the slow emulator.
* After that, I really wanted the app to get and display my phones contact list, but I was only getting an empty page, and an error in the log saying “Uncaught DataView requires tpl, store and itemSelector configurations to be defined.”, and of course, the order in which the js-files are included in the index.html matters! Hence, include Contact.js before ContactsList.js, and then, ta-daa, the app is listing my contact list! (The rest of the tutorial will be food for another day 🙂 )