I recently blogged a tutorial (part 1, part 2, part 3, and postface) that takes you through the process of building a CRUD application using HTML and the Backbone.js framework. The application used in this tutorial is a Wine Cellar management app, and I thought it would be fun to create a Mobile version using PhoneGap.
PhoneGap — if you are not familiar with it — is an open source platform that allows you develop cross-platform Mobile applications using HTML and JavaScript. Specifically, it allows you to:
- Package an HTML application as a native app on all the key mobile platforms (iOS, Android, BlackBerry, Windows Phone, WebOS, Symbian, Bada).
- Access your device capabilities (Camera, GPS, database, accelerometer, etc) using a cross-platform JavaScript API.
Backbone.js is a great framework to give structure to your web application regardless of where it is running: in a traditional Web Browser, or as an app packaged with PhoneGap.
So, here is the app…
The UI is intentionally plain to keep the focus on the architectural framework. This is a simple ‘consumer’ version of the application: It allows you to look for wines in your Wine Cellar. The tutorial application mentioned above is an ‘admin’ version: You can create, update, delete wines in your Wine Cellar. Most of the code is shared between the Mobile ‘consumer’ version and the browser-based ‘admin’ version.
In this version, the application gets the data from RESTful services hosted on my server. In my next post, I will provide another version of the application that gets the data using a local database on your device.
Download
I added the source code for the mobile application to the backbone-cellar GitHub repository. You can download the zip file here. For your convenience, I created an iOS directory with the Xcode project and an Android directory with the Eclipse project. The core application is in the www directory (iOS and android) and it is the same code for both iOS and Android.
If you want to run the application on your Android device without installing the project, you can also download the apk file available in the bin directory.
Pingback: Sample Mobile App with Backbone.js, PhoneGap, and a Local Database()
Pingback: CityGrid Media Developer Center – Wine Cellar Mobile Starter Application with PhoneGap and Backbone.js()
Pingback: Cheatsheet: 2012 02.01 ~ 02.08 | 编程()
Pingback: Sample Mobile App with Backbone.js and PhoneGap - Rendition Multimedia()
Pingback: Build mobile apps faster with PhoneGap - Maxoffsky |Maxoffsky()
Pingback: Node.js « irakasle ibiltaria()