An example iPhone application that talks to a RESTful Rails application to manage budgets and their related expenses.
This application is intended as a demonstration of how to use ObjectiveResource to manage two (nested) resources living in a Rails application. I first created this application as one of the examples used in my 360iDev presentation in October 2009.
Oh, and because programming is fun. :-)
Again, this app is intended for demonstration purposes only, but it sports a few features you may want to consider in your application:
- Supports all CRUD operations of two resources (Budget and Expense)
- Nested resources
- Asynchronous network requests
- Authentication
- Error handling
For a simpler, stripped down example of how to get started with ObjectiveResource using a single resource, check out the Expenses app.
-
Fire up the Rails application:
$ cd server/budgets $ rake db:migrate $ ruby script/server
-
Point your trusty browser at the running Rails app, and create an account and a budget.
-
Open the iPhone project and run it!
$ cd client/Budgets $ open Budgets.xcodeproj
This app won't win any design awards, but that's not the point...
Of course there are alternatives to ObjectiveResource, though they aren't designed specifically to work with Rails:
Mike Clark mike@clarkware.com