jQuery Mobile with Backbone.js and PhoneGap

We've received a few requests about mobile app development in the past few weeks. We were looking for different options and wanted to use something which could be written once and used on different devices including iOS and Android. We found two solutions: one called Titanium Mobile and another one called PhoneGap. If you are wondering what the differences between them are, you can read more here.

We decided to stick with PhoneGap for now mostly because it looked simpler to start with. PhoneGap provides a set of project templates and a common JavaScript API for building "native" mobile applications. It supports iOS, Android, Blackberry, Symbian, and Palm. The JavaScript API allows for interaction with the native API's for things like contact management, camera, GPS and other.

In our previous projects we used a lot of JavaScript. Our code was structured around a great tool called Backbone.js. We also used a lot of jQuery. We wanted to bring this experience to our mobile solution and decided to give jQuery Mobile a try. As a proof of concept we created a simple project called Happy Pointer.

The app makes use of the data coming from awesome SimpleGeo and it's integrated with Google Maps. It basically searches for things near you. (it searches for coffee places by default).

You can find the code for the app on github here: https://github.com/incandescent/happypointer or check the demo.

jQuery Mobile is very easy to learn. You don't have to write any JavaScript to start with something simple. It comes with numerous useful widgets and components. In order to use them you have to add a "data-role" to your html elements. For example if you want to render a button you can do:

<a href="index.html" data-role="button">Link button</a>

or lets say you want a list:

<ul data-role="listview"></ul>

Overall we think PhoneGap and jQuery Mobile are great solutions for people who already have experience with web technologies and don't want to fight with Android or Cocoa Frameworks. We plan to write more about our experience with Backbone.js and more about our adventures with mobile development in the future so please stay tuned.