I recently came across Objective Resource for developing iPhone applications that talk with a Rails backed website. According to the site,
ObjectiveResource is an Objective-C port of Ruby on Rails’ ActiveResource. It provides a way to serialize objects to and from Rails’ standard RESTful web-services (via XML or JSON) and handles much of the complexity involved with invoking web-services of any language from the iPhone.
I’ve had a chance to play with it this weekend and have found it to be pretty easy to work with. The developers of Objective Resource have created a pretty good Getting Started Guide you can follow, or you can watch a screencast of it as well. They even offer an example project for you to work with that gives you both the iPhone app (via Xcode) and the Rails app so you can see how everything works together.
One thing the example project does not include is accessing a Rails app that has authentication. Of course I was thinking I was all setup for this, but soon realized that I did not add my Active Resource functions in so that my app would work with XML/JSON requests. Luckily, while I was out in Denver, CO for iPhone Development Training (by Pragmatic Studio) I was able to get my hands on a copy of Advanced Rails Recipes by Mike Clark. I was extremely pleased that Mike graciously gave me the copy he had laying there for free. The particular recipe in the book that helped me was the Authenticate REST Clients. After I rewrote my authentication piece of my Rails app, I was getting data back and into my iPhone app. It was a very good feeling!
I thought I would include the screencast that the Objective Resource developers created. It runs about 6 minutes and is definitely worth a watch if you are looking at using Objective Resource for your next iPhone app backed by a Rails app.
Here’s my attempt at packing tonight before I head over to the airport in the morning. What I did while I was packing was try to put together “packages” so that it would make it easier to pack. I then went from that to packing the packages where they would fit best. I’m still not sure I want to risk taking my Rebel XTI without a protective case of some sort (see what I used in the video. ) So I might end up replacing that with my point and shoot since it saves space. We’ll see though.
I’m getting ready to take a trip out to Denver, CO for the week to go to an iPhone SDK Training class held by Pragmatic Studio and thought it was a perfect time to give Ultralight Packing a try. Andrew Hyde recently wrote about his adventures last month and after reading his story I thought I would give it a try. I’m planning on capturing my adventures with Qik and my iPhone so you can get a feel for what it’s like. Feel free to track that progress on my Qik account. I’ll be posting a video of my packing abilities once I pack up tomorrow. But I thought I’d give you a little insight on what I was planning on taking.
Update: So I’ve made some updates to my list above, you’ll notice them in bold. I’m going to wear a little more than I thought since when I land in Denver the weather is supposed to be around 28F. Of course the remaining days the weather is pushing high 40s, low 50s, so the rest of my clothes should suffice.