(Tue Nov 03, 2009) [/iPhone] #
While at the 360iDev conference, Dan Grigsby of Mobile Orchard arranged short podcast interviews (MP3) with a number of attendees. He asked me to give an overview of my iPhone on Rails talk, and we ended up chatting about how to choose between various Objective-C libraries to communicate with REST data sources. My part starts in around 16:00, but they're all well worth listening to.
Enjoy!
(Tue Oct 06, 2009) [/iPhone] #
I find myself living in two worlds these days. On one hand, I'm a web
programmer writing centralized applications mostly with Rails. On the other
hand, I'm an iPhone developer creating mobile applications. My iPhone
apps live in my pocket; my web apps live on the 'net.
Sometimes I want the best of both these worlds: mobile applications that
periodically exchange data with their mother ship in the sky. In fact, one of
my first iPhone apps was a companion to a Rails app that I'd built many years
ago. Suddenly I had a way to access some of our small-business data while on
the go. Then recently I started working on a new iPhone application that ended
up needing a backend web app to share data with a larger community. Along the
way, I hacked up a couple prototype applications just as learning
opportunities.
I gave a tutorial on what I've learned at the 360iDev conference last week. The short version is that REST conventions make this type of integration a lot easier. For the longer version, I've posted the tutorial presentation and sample projects:
-
iPhone on Rails (PDF): This being an iPhone developer conference, I started with an overview of the REST conventions in Rails. Then, to get the iPhone app talking to the Rails app, I incrementally coded a solution starting with a simple, hand-rolled library and ending up using the excellent ObjectiveResource library. You kinda had to be there...
-
Expenses: A bare-bones, no-frills iPhone app that creates, reads, updates, and deletes a single resource (expenses) living in a scaffold-generated Rails app. It's a simple example of how to use ObjectiveResource. I deliberately left out any bells and whistles so they didn't get in the way of the fundamentals. (screenshot)
-
Budgets: Something a bit more realistic. This iPhone-Rails app combo manages budgets and their related expenses (nested resources). It also demonstrates a few techniques you'll want to consider in your application, including asynchronous networking, authentication, and error handling. (screenshot)
Of course, you don't have to use Rails or ObjectiveResource. Sometimes a JSON parsing library and a Sinatra app are a better fit. Or perhaps Django is more your style. The point is that conventions matter.
I thought I'd share these resources in the event they give you a jump-start on your next project. I may screencast the tutorial if there's enough interest. (Vote by leaving a comment!)
Enjoy!
iPhone Training: I hope you'll join us for 4 full days of hands-on iPhone SDK training in Long Beach, CA on December 1-4. It's a lot of fun!
(Tue Jun 23, 2009) [/iPhone] #
If you're programming in Xcode, it pays to know some keyboard shortcuts. Of
course, there are a ton of shortcuts you could learn. And some guys
know them all. I'm not one of those guys. I tend to use a fairly small, high-impact set of essential shortcuts. Through repeated use on my day-to-day work, they become automatic. Then once in a while I'll discover a new shortcut, and if I use it often enough it'll stick.
If you're feeling a tad overwhelmed by all the Xcode shortcuts, here's a place to start: my Xcode keyboard shortcuts cheat sheet. It's relatively short by IDE cheat sheet standards (only 45 shortcuts), and I like it that way. It's the sweet spot for what I can remember. And by focusing on just these shortcuts I've become a lot more productive in Xcode. These are the same shortcuts I teach visually in my Becoming Productive in Xcode screencasts. The best way to see how I work in Xcode is to check 'em out!
On a related note, here's a chance to practice your Xcode shortcuts: Attend an iPhone Studio this summer! We have two courses scheduled in August—in Reston, VA and Denver, CO—covering the new iPhone 3.0 SDK. I think it's the best way to quickly get up to speed on iPhone development. Every time I've sat in on one, I've learned something new from the instructors. It's a fun 4 days of hands-on programming, and we promise you won't go away hungry.
(Thu Apr 02, 2009) [/iPhone] #
Folks often ask me how I got into iPhone development, where they should start,
and which resources I recommend. To be honest, I usually kinda stumble my way
through new things rather than taking a guided approach. But the iPhone
learning curve was a little different for me. It was literally a multi-year
process of learning blocks of the development stack: Objective-C, Cocoa,
Xcode, Interface Builder, and so on. It was mostly just for fun, although I
ended up writing several articles for Apple along the way. What I didn't know
was that the journey would eventually reach a crescendo with iPhone
development.
So how do you get into iPhone development? Well, that depends. If you're a seasoned C programmer, your starting point will be different from someone new to programming. But both of you will wind up learning object-oriented programming to use the Cocoa Touch libraries. And perhaps you'll even discover that programming isn't for you. That's ok. There are plenty of good iPhone programmers you can team up with to help turn your idea into an application. Everyone approaches the learning curve from a different perspective. There is no "right" way for everyone.
That being said, a general roadmap with a few landmarks might still be useful.
So, based on my experience and what I've heard from students of our iPhone
course, I've put together an iPhone Developer's
Roadmap.
It opens with some pointers to help you find a suitable place to begin your
journey. Then, for each general stage, you'll find definitions for common
lingo and resources to help you dig deeper. And what can I say: I'm a little
biased. You'll find a few Pragmatic choices in there, both free and those that
support an author. But I also mention other resources that I've found
valuable. It's not meant to be a comprehensive collection of all the fine
resources out there. So please treat all these as jumping off points.
Enjoy, and welcome to developing on the iPhone!